国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

langchain-ChatGLM源碼閱讀:參數(shù)設(shè)置

這篇具有很好參考價(jià)值的文章主要介紹了langchain-ChatGLM源碼閱讀:參數(shù)設(shè)置。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

上下文關(guān)聯(lián)

上下文關(guān)聯(lián)相關(guān)參數(shù):

  • 知識(shí)相關(guān)度閾值score_threshold
  • 內(nèi)容條數(shù)k
  • 是否啟用上下文關(guān)聯(lián)chunk_conent
  • 上下文最大長度chunk_size

其主要作用是在所在文檔中擴(kuò)展與當(dāng)前query相似度較高的知識(shí)庫的內(nèi)容,作為相關(guān)信息與query按照prompt規(guī)則組合后作為輸入獲得模型的回答。

langchain-ChatGLM源碼閱讀:參數(shù)設(shè)置,自然語言處理,神經(jīng)網(wǎng)絡(luò),langchain,chatglm,知識(shí)庫問答

  • 獲取查詢句query嵌入:faiss.py
def similarity_search_with_score(
        self, query: str, k: int = 4
    ) -> List[Tuple[Document, float]]:
        """Return docs most similar to query.

        Args:
            query: Text to look up documents similar to.
            k: Number of Documents to return. Defaults to 4.

        Returns:
            List of Documents most similar to the query and score for each
        """
        embedding = self.embedding_function(query)
        docs = self.similarity_search_with_score_by_vector(embedding, k)
        return docs
  • 上下文生成:MyFAISS.py

    def seperate_list(self, ls: List[int]) -> List[List[int]]:
        # TODO: 增加是否屬于同一文檔的判斷
        lists = []
        ls1 = [ls[0]]
        for i in range(1, len(ls)):
            if ls[i - 1] + 1 == ls[i]:
                ls1.append(ls[i])
            else:
                lists.append(ls1)
                ls1 = [ls[i]]
        lists.append(ls1)
        return lists

    def similarity_search_with_score_by_vector(
            self, embedding: List[float], k: int = 4
    ) -> List[Document]:
        faiss = dependable_faiss_import()
        # (1,1024)
        vector = np.array([embedding], dtype=np.float32)
        # 默認(rèn)FALSE
        if self._normalize_L2:
            faiss.normalize_L2(vector)
        # shape均為(1, k),這步獲取與query有top-k相似度的知識(shí)庫
        scores, indices = self.index.search(vector, k)
        docs = []
        id_set = set()
        store_len = len(self.index_to_docstore_id)
        rearrange_id_list = False
        # 遍歷找到的k個(gè)最相似知識(shí)庫的索引
        # k是第一次的篩選條件,score是第二次的篩選條件
        for j, i in enumerate(indices[0]):
            if i == -1 or 0 < self.score_threshold < scores[0][j]:
                # This happens when not enough docs are returned.
                continue
            if i in self.index_to_docstore_id:
                _id = self.index_to_docstore_id[i]
            # 執(zhí)行接下來的操作
            else:
                continue
            # index→id→content
            doc = self.docstore.search(_id)
            if (not self.chunk_conent) or ("context_expand" in doc.metadata and not doc.metadata["context_expand"]):
                # 匹配出的文本如果不需要擴(kuò)展上下文則執(zhí)行如下代碼
                if not isinstance(doc, Document):
                    raise ValueError(f"Could not find document for id {_id}, got {doc}")
                doc.metadata["score"] = int(scores[0][j])
                docs.append(doc)
                continue
            # 其實(shí)存的都是index
            id_set.add(i)
            docs_len = len(doc.page_content)
            # 跟外部變量定義的k重名了,爛
            # 一個(gè)知識(shí)庫是分句后得到的一句話,i是當(dāng)前知識(shí)庫在總知識(shí)庫中的位置,store_len是總知識(shí)庫大小
            # 所以k說的是擴(kuò)充上下文時(shí)最多能跨多少個(gè)知識(shí)庫
            for k in range(1, max(i, store_len - i)):
                break_flag = False
                if "context_expand_method" in doc.metadata and doc.metadata["context_expand_method"] == "forward":
                    expand_range = [i + k]
                elif "context_expand_method" in doc.metadata and doc.metadata["context_expand_method"] == "backward":
                    expand_range = [i - k]
                else:
                    # i=4922, k=1 → [4923, 4921]
                    expand_range = [i + k, i - k]
                for l in expand_range:
                    # 確保擴(kuò)展上下文時(shí)不會(huì)造成重復(fù)
                    if l not in id_set and 0 <= l < len(self.index_to_docstore_id):
                        _id0 = self.index_to_docstore_id[l]
                        doc0 = self.docstore.search(_id0)
                        # 如果當(dāng)前字?jǐn)?shù)大于250或者是知識(shí)庫跨了文件,擴(kuò)充上下文過程終止
                        # 這一句有些問題,有一端跨文件就終止,應(yīng)該是兩端同時(shí)跨才終止才對(duì)
                        if docs_len + len(doc0.page_content) > self.chunk_size or doc0.metadata["source"] != \
                                doc.metadata["source"]:
                            break_flag = True
                            break
                        elif doc0.metadata["source"] == doc.metadata["source"]:
                            docs_len += len(doc0.page_content)
                            id_set.add(l)
                            rearrange_id_list = True
                if break_flag:
                    break
        # 如果沒有擴(kuò)展上下文(不需要或是不能)
        if (not self.chunk_conent) or (not rearrange_id_list):
            return docs
        if len(id_set) == 0 and self.score_threshold > 0:
            return []
        id_list = sorted(list(id_set))
        # 連續(xù)必然屬于同一文檔,但不連續(xù)也可能在同一文檔
        # 返回二級(jí)列表,第一級(jí)是連續(xù)的index列表,第二級(jí)是具體index
        id_lists = self.seperate_list(id_list)
        for id_seq in id_lists:
            for id in id_seq:
                if id == id_seq[0]:
                    _id = self.index_to_docstore_id[id]
                    # doc = self.docstore.search(_id)
                    doc = copy.deepcopy(self.docstore.search(_id))
                else:
                    _id0 = self.index_to_docstore_id[id]
                    doc0 = self.docstore.search(_id0)
                    doc.page_content += " " + doc0.page_content
            if not isinstance(doc, Document):
                raise ValueError(f"Could not find document for id {_id}, got {doc}")
            # indices為相關(guān)文件的索引
            # 因?yàn)榭赡軙?huì)將多個(gè)連續(xù)的id合并,因此需要將同一seq內(nèi)所有位于top-k的知識(shí)庫的分?jǐn)?shù)取最小值作為seq對(duì)應(yīng)的分?jǐn)?shù)
            doc_score = min([scores[0][id] for id in [indices[0].tolist().index(i) for i in id_seq if i in indices[0]]])
            doc.metadata["score"] = int(doc_score)
            docs.append(doc)
        # 注意這里docs沒有按相似度排序,可以自行加個(gè)sort
        return docs

考慮到相似度計(jì)算在雙向擴(kuò)展上有一些問題,對(duì)算法做了一些修改:

 def similarity_search_with_score_by_vector(
            self, embedding: List[float], k: int = 4
    ) -> List[Document]:
        faiss = dependable_faiss_import()
        # (1,1024)
        vector = np.array([embedding], dtype=np.float32)
        # 默認(rèn)FALSE
        if self._normalize_L2:
            faiss.normalize_L2(vector)
        # shape均為(1, k)
        scores, indices = self.index.search(vector, k)
        docs = []
        id_set = set()
        store_len = len(self.index_to_docstore_id)
        rearrange_id_list = False
        # 存儲(chǔ)關(guān)鍵句
        keysentences = []
        # 遍歷找到的k個(gè)最近相關(guān)文檔的索引
        # top-k是第一次的篩選條件,score是第二次的篩選條件
        for j, i in enumerate(indices[0]):
            if i == -1 or 0 < self.score_threshold < scores[0][j]:
                # This happens when not enough docs are returned.
                continue
            if i in self.index_to_docstore_id:
                _id = self.index_to_docstore_id[i]
            # 執(zhí)行接下來的操作
            else:
                continue
            # index→id→content
            doc = self.docstore.search(_id)
            if (not self.chunk_conent) or ("context_expand" in doc.metadata and not doc.metadata["context_expand"]):
                # 匹配出的文本如果不需要擴(kuò)展上下文則執(zhí)行如下代碼
                if not isinstance(doc, Document):
                    raise ValueError(f"Could not find document for id {_id}, got {doc}")
                doc.metadata["score"] = int(scores[0][j])
                docs.append(doc)
                continue
            # 其實(shí)存的都是index
            id_set.add(i)
            docs_len = len(doc.page_content.strip())
            # 跟外部變量定義的k重名了,爛
            # 一個(gè)知識(shí)庫是分句后得到的一句話,i是當(dāng)前知識(shí)庫在總知識(shí)庫中的位置,store_len是總知識(shí)庫大小
            # 所以k說的是擴(kuò)充上下文時(shí)最多能跨多少個(gè)知識(shí)庫
            for k in range(1, max(i, store_len - i)):
                single_break_flag = 0
                double_break_flag = 0
                if "context_expand_method" in doc.metadata and doc.metadata["context_expand_method"] == "forward":
                    expand_range = [i + k]
                elif "context_expand_method" in doc.metadata and doc.metadata["context_expand_method"] == "backward":
                    expand_range = [i - k]
                else:
                    # i=4922, k=1 → [4923, 4921]
                    expand_range = [i + k, i - k]
                for l in expand_range:
                    # 確保擴(kuò)展上下文時(shí)不會(huì)造成重復(fù)
                    if l not in id_set and 0 <= l < len(self.index_to_docstore_id):
                        _id0 = self.index_to_docstore_id[l]
                        doc0 = self.docstore.search(_id0)
                        # 如果當(dāng)前字?jǐn)?shù)大于250或者是知識(shí)庫跨了文件,擴(kuò)充上下文過程終止
                        # 這一句有些問題,有一端跨文件就終止,應(yīng)該是兩端同時(shí)跨才終止才對(duì)
                        if docs_len + len(doc0.page_content.strip()) > self.chunk_size or doc0.metadata["source"] != \
                                doc.metadata["source"]:
                            single_break_flag = 1
                            if docs_len + len(doc0.page_content.strip()) > self.chunk_size:
                                double_break_flag = 2
                                break
                            else:
                                double_break_flag += 1
                        elif doc0.metadata["source"] == doc.metadata["source"]:
                            docs_len += len(doc0.page_content.strip())
                            id_set.add(l)
                            rearrange_id_list = True
                if double_break_flag == 2:
                    break
        # 如果沒有擴(kuò)展上下文(不需要或是不能)
        if (not self.chunk_conent) or (not rearrange_id_list):
            return docs, keysentences
        if len(id_set) == 0 and self.score_threshold > 0:
            return [], []
        id_list = sorted(list(id_set))
        # 連續(xù)必然屬于同一文檔,但不連續(xù)也可能在同一文檔
        # 返回二級(jí)列表,第一級(jí)是連續(xù)的index列表,第二級(jí)是具體index
        id_lists = self.seperate_list(id_list)
        keyids = indices[0].tolist()
        filter_rate = 0.05
        for id_seq in id_lists:
            seqsentences = []
            for id_index, id in enumerate(id_seq):
                if id == id_seq[0]:
                    _id = self.index_to_docstore_id[id]
                    # doc = self.docstore.search(_id)
                    doc = copy.deepcopy(self.docstore.search(_id))
                    if id in keyids:
                        seqsentences.append({'key': doc.page_content.strip(), 'rate': id_index/len(id_seq)})
                        doc.page_content = "<b>"+doc.page_content.strip()+"</b>"
                else:
                    _id0 = self.index_to_docstore_id[id]
                    doc0 = self.docstore.search(_id0)
                    if id in keyids:
                        seqsentences.append({'key': doc0.page_content.strip(), 'rate': id_index/len(id_seq)})
                        doc.page_content += " <b>" + doc0.page_content.strip()+"</b>"
                    else:
                        doc.page_content += " " + doc0.page_content.strip()
            if not isinstance(doc, Document):
                raise ValueError(f"Could not find document for id {_id}, got {doc}")
            # indices為相關(guān)文件的索引
            # 因?yàn)榭赡軙?huì)將多個(gè)連續(xù)的id合并,因此需要將同一seq內(nèi)所有位于top-k的知識(shí)庫的分?jǐn)?shù)取最小值作為seq對(duì)應(yīng)的分?jǐn)?shù)
            doc_score = min([scores[0][id] for id in [indices[0].tolist().index(i) for i in id_seq if i in indices[0]]])
            doc.metadata["score"] = int(doc_score)
            docs.append(doc)
            seqsentences.sort(key=lambda data: data['rate'])
            if seqsentences[-1]['rate'] < filter_rate:
                keysentences.append(seqsentences[-1]['key'])
            else:
                keysentences += [seqsentence['key'] for seqsentence in seqsentences if seqsentence['rate'] > filter_rate]
        docs.sort(key=lambda doc: doc.metadata['score'])
        return docs, keysentences

  • prompt生成:local_doc_qa.py
def get_knowledge_based_answer(self, query, vs_path, chat_history=[], streaming: bool = STREAMING):
        related_docs_with_score = vector_store.similarity_search_with_score(query, k=self.top_k)
        torch_gc()
        if len(related_docs_with_score) > 0:
            prompt = generate_prompt(related_docs_with_score, query)
        else:
            prompt = query
        answer_result_stream_result = self.llm_model_chain(
            {"prompt": prompt, "history": chat_history, "streaming": streaming})

def generate_prompt(related_docs: List[str],
                    query: str,
                    prompt_template: str = PROMPT_TEMPLATE, ) -> str:
    context = "\n".join([doc.page_content for doc in related_docs])
    prompt = prompt_template.replace("{question}", query).replace("{context}", context)
    return prompt

對(duì)話輪數(shù)

langchain-ChatGLM源碼閱讀:參數(shù)設(shè)置,自然語言處理,神經(jīng)網(wǎng)絡(luò),langchain,chatglm,知識(shí)庫問答
其實(shí)就是要存多少歷史記錄,如果為0的話就是在執(zhí)行當(dāng)前對(duì)話時(shí)不考慮歷史問答

  • 模型內(nèi)部調(diào)用時(shí)使用,以chatglm為例:chatglm_llm.py
 def _generate_answer(self,
                         inputs: Dict[str, Any],
                         run_manager: Optional[CallbackManagerForChainRun] = None,
                         generate_with_callback: AnswerResultStream = None) -> None:
        history = inputs[self.history_key]
        streaming = inputs[self.streaming_key]
        prompt = inputs[self.prompt_key]
        print(f"__call:{prompt}")
        # Create the StoppingCriteriaList with the stopping strings
        stopping_criteria_list = transformers.StoppingCriteriaList()
        # 定義模型stopping_criteria 隊(duì)列,在每次響應(yīng)時(shí)將 torch.LongTensor, torch.FloatTensor同步到AnswerResult
        listenerQueue = AnswerResultQueueSentinelTokenListenerQueue()
        stopping_criteria_list.append(listenerQueue)
        if streaming:
            history += [[]]
            for inum, (stream_resp, _) in enumerate(self.checkPoint.model.stream_chat(
                    self.checkPoint.tokenizer,
                    prompt,
                    # 為0時(shí)history返回[]
                    history=history[-self.history_len:-1] if self.history_len > 0 else [],
                    max_length=self.max_token,
                    temperature=self.temperature,
                    top_p=self.top_p,
                    top_k=self.top_k,
                    stopping_criteria=stopping_criteria_list
            )):

向量匹配 top k

雖然放在了模型配置那一頁,但實(shí)際上還是用來控制上下文關(guān)聯(lián)里面的內(nèi)容條數(shù)k的,不知道為什么寫了兩遍。。。
langchain-ChatGLM源碼閱讀:參數(shù)設(shè)置,自然語言處理,神經(jīng)網(wǎng)絡(luò),langchain,chatglm,知識(shí)庫問答

控制生成質(zhì)量的參數(shù)

這些參數(shù)沒有在前端顯式地給出,而是寫死在了模型定義里文章來源地址http://www.zghlxwxcb.cn/news/detail-630544.html

  • 模型定義,以chatglm為例:chatglm_llm.py
class ChatGLMLLMChain(BaseAnswer, Chain, ABC):
    max_token: int = 10000
    temperature: float = 0.01
    # 相關(guān)度
    top_p = 0.4
    # 候選詞數(shù)量
    top_k = 10
    checkPoint: LoaderCheckPoint = None
    # history = []
    history_len: int = 10

參數(shù)設(shè)置心得

  • score_threshold和k設(shè)太小會(huì)找不到問題對(duì)應(yīng)的原文件,太大找到一堆不相關(guān)的
  • chunk_size設(shè)太小不能在原文件里找到問題對(duì)應(yīng)的原文,太大無法有效歸納出答案
  • temperature和top_p默認(rèn)值下生成的答案基本固定,但也很死板;過大的temperature導(dǎo)致回答的事實(shí)不穩(wěn)定;過大的top_p導(dǎo)致回答的語言風(fēng)格不穩(wěn)定;調(diào)整top_k沒發(fā)現(xiàn)結(jié)果有什么變化

到了這里,關(guān)于langchain-ChatGLM源碼閱讀:參數(shù)設(shè)置的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 本地部署 langchain-ChatGLM

    本地部署 langchain-ChatGLM

    一種利用 ChatGLM-6B + langchain 實(shí)現(xiàn)的基于本地知識(shí)的 ChatGLM 應(yīng)用。增加 clue-ai/ChatYuan 項(xiàng)目的模型 ClueAI/ChatYuan-large-v2 的支持。 本項(xiàng)目中 Embedding 默認(rèn)選用的是 GanymedeNil/text2vec-large-chinese,LLM 默認(rèn)選用的是 ChatGLM-6B。依托上述模型,本項(xiàng)目可實(shí)現(xiàn)全部使用開源模型離線私有部署。

    2024年02月06日
    瀏覽(19)
  • LangChain-ChatGLM在WIndows10下的部署

    LangChain-ChatGLM在WIndows10下的部署

    1、LangChain + ChatGLM2-6B 搭建個(gè)人專屬知識(shí)庫中的LangChain + ChatGLM2-6B 構(gòu)建知識(shí)庫這一節(jié):基本的邏輯和步驟是對(duì)的,但要根據(jù)Windows和現(xiàn)狀做很多調(diào)整。 2、沒有動(dòng)過model_config.py中的“LORA_MODEL_PATH_BAICHUAN”這一項(xiàng)內(nèi)容,卻報(bào)錯(cuò):對(duì)報(bào)錯(cuò)“LORA_MODEL_PATH_BAICHUAN”提供了重要解決思路,雖

    2024年02月13日
    瀏覽(21)
  • windows環(huán)境下的langchain-ChatGLM的本地部署

    windows環(huán)境下的langchain-ChatGLM的本地部署

    首先是項(xiàng)目開源地址?https://github.com/imClumsyPanda/langchain-ChatGLM 下載這個(gè)項(xiàng)目的源碼非常簡(jiǎn)單,但運(yùn)行起來十分麻煩,各種環(huán)境的搭配簡(jiǎn)直是折磨人,尤其是電腦上缺少各種安裝環(huán)境的,我首先先列舉幾個(gè),例如conda安裝python的虛擬環(huán)境,用這個(gè)比較方便,還有Anoconda的安裝,

    2024年02月13日
    瀏覽(29)
  • 2M大小的PDF文檔上傳到LangChain-ChatGLM知識(shí)圖譜中,大致需要的時(shí)間

    對(duì)于將2M大小的PDF文檔上傳到LangChain-ChatGLM知識(shí)圖譜中,大致需要的時(shí)間如下: PDF到文本的提取轉(zhuǎn)換:若PDF內(nèi)容主要為文本,此步驟約需要1-2分鐘。 提取的文本經(jīng)過預(yù)處理與分析:此步驟需要對(duì)文本進(jìn)行分詞、命名實(shí)體識(shí)別等處理,約需要2-5分鐘。 抽取文本中的結(jié)構(gòu)化知識(shí)(實(shí)體、關(guān)

    2024年02月08日
    瀏覽(20)
  • CentOS7上部署langchain-chatglm或stable-diffusion可能遇到的Bug的解決方案

    CentOS7上部署langchain-chatglm或stable-diffusion可能遇到的Bug的解決方案

    進(jìn)入你的代碼目錄下 下載依賴 這里可能有的朋友會(huì)有問題會(huì)出現(xiàn)某些包下載不了,這里建議直接使用阿里源即可,在確定你的cuda版本之后(使用nvidia-smi確定cuda版本) 命令行執(zhí)行 卸載掉剛才pip安裝的版本!!!!因?yàn)榇颂幇惭b的版本還缺少cuda的支持,確定卸載掉之后 執(zhí)行 此處X為

    2024年02月16日
    瀏覽(32)
  • langchain源碼閱讀系列(三)之Chain模塊

    langchain源碼閱讀系列(三)之Chain模塊

    原文首發(fā)于博客文章langchain源碼閱讀 本節(jié)是langchian源碼閱讀系列第三篇,下面進(jìn)入Chain模塊??: LLM 應(yīng)用構(gòu)建實(shí)踐筆記 Chain鏈定義 鏈定義為對(duì)組件的一系列調(diào)用,也可以包括其他鏈,這種在鏈中將組件組合在一起的想法很簡(jiǎn)單但功能強(qiáng)大,極大地簡(jiǎn)化了復(fù)雜應(yīng)用程序的實(shí)現(xiàn)并

    2024年02月13日
    瀏覽(22)
  • langchain源碼閱讀系列(五)之Callback模塊

    langchain源碼閱讀系列(五)之Callback模塊

    原文首發(fā)于博客文章,詳情請(qǐng)前往博客langchain源碼閱讀 本節(jié)是langchian源碼閱讀系列第五篇,下面進(jìn)入Callback模塊??: LLM 應(yīng)用構(gòu)建實(shí)踐筆記 回調(diào)模塊允許接到LLM應(yīng)用程序的各個(gè)階段,鑒于LLM的幻覺問題,這對(duì)于日志記錄、監(jiān)視、流式處理和其他任務(wù)非常有用,現(xiàn)在也有專用的

    2024年02月13日
    瀏覽(18)
  • 阿里云部署 ChatGLM2-6B 與 langchain+ChatGLM

    阿里云部署 ChatGLM2-6B 與 langchain+ChatGLM

    更新系統(tǒng) 安裝git 克隆 ChatGLM2-6B 源碼 克隆 chatglm2-6b 模型 安裝 ChatGLM2-6B 依賴 修改模型的路徑 修改成 啟動(dòng)服務(wù) 啟動(dòng)成功后 克隆 langchain-ChatGLM 源碼 git clone https://github.com/imClumsyPanda/langchain-ChatGLM.git 克隆模型 安裝 langchain-ChatGLM 依賴 修改配置 修改一 修改成 修改二 修改成 修改

    2024年02月15日
    瀏覽(34)
  • ChatGLM-6B+LangChain實(shí)戰(zhàn)

    ChatGLM-6B+LangChain實(shí)戰(zhàn)

    目標(biāo):原始使用ChatGLM-6B可接受的文字長度有限,打算結(jié)合LangChain實(shí)現(xiàn)長文本生成摘要. 方法: step1:自定義一個(gè)GLM繼承LangChain中的langchain.llms.base.LLM,load自己的模型. step2:使用LangChain的mapreduce的方法,對(duì)文本分塊,做摘要,輸出結(jié)果. 使用的機(jī)器資源:T4顯卡(16G顯存) 附參

    2024年02月16日
    瀏覽(19)
  • 【ChatGLM】基于 ChatGLM-6B + langchain 實(shí)現(xiàn)本地化知識(shí)庫檢索與智能答案生成: 中文 LangChain 項(xiàng)目的實(shí)現(xiàn)開源工作

    【ChatGLM】基于 ChatGLM-6B + langchain 實(shí)現(xiàn)本地化知識(shí)庫檢索與智能答案生成: 中文 LangChain 項(xiàng)目的實(shí)現(xiàn)開源工作

    ? 目錄 【ChatGLM】基于 ChatGLM-6B + langchain 實(shí)現(xiàn)本地化知識(shí)庫檢索與智能答案生成: 中文 LangChain 項(xiàng)目的實(shí)現(xiàn)開源工作 1.克隆源代碼:

    2024年02月11日
    瀏覽(55)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包