mirror of
https://github.com/arc53/DocsGPT
synced 2024-11-03 23:15:37 +00:00
Added settings usage to the worker
This commit is contained in:
parent
2d92e95c8a
commit
4efcb388ff
@ -194,6 +194,8 @@ def api_answer():
|
|||||||
llm = HuggingFaceHub(repo_id="bigscience/bloom", huggingfacehub_api_token=api_key)
|
llm = HuggingFaceHub(repo_id="bigscience/bloom", huggingfacehub_api_token=api_key)
|
||||||
elif settings.LLM_NAME == "cohere":
|
elif settings.LLM_NAME == "cohere":
|
||||||
llm = Cohere(model="command-xlarge-nightly", cohere_api_key=api_key)
|
llm = Cohere(model="command-xlarge-nightly", cohere_api_key=api_key)
|
||||||
|
else:
|
||||||
|
raise ValueError("unknown LLM model")
|
||||||
|
|
||||||
if settings.LLM_NAME == "openai_chat":
|
if settings.LLM_NAME == "openai_chat":
|
||||||
question_generator = LLMChain(llm=llm, prompt=CONDENSE_QUESTION_PROMPT)
|
question_generator = LLMChain(llm=llm, prompt=CONDENSE_QUESTION_PROMPT)
|
||||||
|
Loading…
Reference in New Issue
Block a user