mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-12-03 10:33:17 +00:00
Merge branch 'main' into custom-llm
This commit is contained in:
@@ -5,6 +5,7 @@ import datetime
|
||||
from flask import Flask, request, render_template
|
||||
# os.environ["LANGCHAIN_HANDLER"] = "langchain"
|
||||
import faiss
|
||||
|
||||
from langchain import FAISS
|
||||
from langchain import OpenAI, VectorDBQA, HuggingFaceHub, Cohere
|
||||
from langchain.chains.question_answering import load_qa_chain
|
||||
@@ -77,6 +78,7 @@ def api_answer():
|
||||
c_prompt = PromptTemplate(input_variables=["summaries", "question"], template=template)
|
||||
# create a chain with the prompt template and the store
|
||||
|
||||
|
||||
#llm = ManifestWrapper(client=manifest, llm_kwargs={"temperature": 0.001, "max_tokens": 2048})
|
||||
llm = OpenAI(openai_api_key=api_key, temperature=0)
|
||||
#llm = HuggingFaceHub(repo_id="bigscience/bloom", huggingfacehub_api_token=api_key)
|
||||
|
||||
@@ -45,6 +45,7 @@ pytz==2022.7.1
|
||||
PyYAML==6.0
|
||||
regex==2022.10.31
|
||||
requests==2.28.2
|
||||
retry==0.9.2
|
||||
six==1.16.0
|
||||
snowballstemmer==2.2.0
|
||||
Sphinx==6.1.3
|
||||
@@ -60,6 +61,7 @@ tiktoken==0.1.2
|
||||
tokenizers==0.13.2
|
||||
tqdm==4.64.1
|
||||
transformers==4.26.0
|
||||
typer==0.7.0
|
||||
typing-inspect==0.8.0
|
||||
typing_extensions==4.4.0
|
||||
urllib3==1.26.14
|
||||
|
||||
Reference in New Issue
Block a user