摘要: from langchain.chains import RetrievalQA from langchain.evaluation import QAEvalChain from langchain_community.document_loaders import TextLoader from 阅读全文
posted @ 2024-04-07 16:48 林** 阅读(11) 评论(0) 推荐(0) 编辑
摘要: from langchain.chains import RetrievalQA from langchain_community.document_loaders import TextLoader from langchain_community.embeddings import Ollama 阅读全文
posted @ 2024-04-07 15:05 林** 阅读(23) 评论(0) 推荐(0) 编辑
摘要: from langchain.chains import load_summarize_chain from langchain_community.document_loaders import TextLoader #文本加载器 from langchain_community.llms.oll 阅读全文
posted @ 2024-04-07 10:32 林** 阅读(20) 评论(0) 推荐(0) 编辑
摘要: from langchain.chains import LLMChain, SimpleSequentialChain #简单序列链 from langchain_community.llms.ollama import Ollama from langchain_core.prompts imp 阅读全文
posted @ 2024-04-07 10:24 林** 阅读(7) 评论(0) 推荐(0) 编辑
摘要: from langchain.output_parsers import ResponseSchema, StructuredOutputParser from langchain_community.llms.ollama import Ollama from langchain_core.pro 阅读全文
posted @ 2024-04-07 10:16 林** 阅读(178) 评论(0) 推荐(0) 编辑
摘要: from langchain_community.embeddings import OllamaEmbeddings from langchain_community.llms.ollama import Ollama from langchain_community.vectorstores.f 阅读全文
posted @ 2024-04-07 10:00 林** 阅读(13) 评论(0) 推荐(0) 编辑
摘要: from langchain_community.llms.ollama import Ollama from langchain_core.prompts import ChatPromptTemplate, PromptTemplate llm = Ollama(model="qwen:7b") 阅读全文
posted @ 2024-04-07 09:54 林** 阅读(67) 评论(0) 推荐(0) 编辑
摘要: from transformers import AutoTokenizer, AutoModel modelPath = "/home/cmcc/server/model/chatglm3-6b" tokenizer = AutoTokenizer.from_pretrained(modelPat 阅读全文
posted @ 2024-04-07 09:44 林** 阅读(8) 评论(0) 推荐(0) 编辑