摘要: import json from langchain.llms.base import LLM from transformers import AutoTokenizer, AutoModel, AutoConfig from typing import List, Optional class 阅读全文
posted @ 2024-04-08 16:00 林** 阅读(34) 评论(0) 推荐(0) 编辑
摘要: from langchain.chains import APIChain from langchain_community.llms.ollama import Ollama llm = Ollama(model="qwen:7b") api_docs = """ BASE URL: https: 阅读全文
posted @ 2024-04-08 16:00 林** 阅读(47) 评论(0) 推荐(0) 编辑
摘要: import os from langchain.chains import RetrievalQA from langchain_community.document_loaders import TextLoader from langchain_community.embeddings imp 阅读全文
posted @ 2024-04-08 10:28 林** 阅读(41) 评论(0) 推荐(0) 编辑