Spaces:
Sleeping
Sleeping
ryanrwatkins
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -434,7 +434,7 @@ def instantiate_LLM(LLM_provider,api_key,temperature=0.8,top_p=0.95,model_name=N
|
|
434 |
"""
|
435 |
if LLM_provider == "OpenAI":
|
436 |
llm = ChatOpenAI(
|
437 |
-
api_key=
|
438 |
model="gpt-3.5-turbo", # in ["gpt-3.5-turbo", "gpt-3.5-turbo-0125", "gpt-4-turbo-preview"]
|
439 |
temperature=temperature,
|
440 |
model_kwargs={
|
@@ -564,14 +564,14 @@ chain = ConversationalRetrievalChain.from_llm(
|
|
564 |
combine_docs_chain_kwargs={'prompt': answer_prompt},
|
565 |
condense_question_llm=instantiate_LLM(
|
566 |
#LLM_provider="Google",api_key=google_api_key,temperature=0.3,
|
567 |
-
LLM_provider="OpenAI",api_key=
|
568 |
model_name="gemini-pro"),
|
569 |
memory=create_memory("gemini-pro"),
|
570 |
retriever = compression_retriever_HF,
|
571 |
#retriever = base_retriever_HF, #base_retriever_HF
|
572 |
llm=instantiate_LLM(
|
573 |
#LLM_provider="Google",api_key=google_api_key,temperature=0.8,
|
574 |
-
LLM_provider="OpenAI",api_key=
|
575 |
model_name="gemini-pro"),
|
576 |
chain_type= "stuff",
|
577 |
verbose= True,
|
|
|
434 |
"""
|
435 |
if LLM_provider == "OpenAI":
|
436 |
llm = ChatOpenAI(
|
437 |
+
api_key=openai_api_key,
|
438 |
model="gpt-3.5-turbo", # in ["gpt-3.5-turbo", "gpt-3.5-turbo-0125", "gpt-4-turbo-preview"]
|
439 |
temperature=temperature,
|
440 |
model_kwargs={
|
|
|
564 |
combine_docs_chain_kwargs={'prompt': answer_prompt},
|
565 |
condense_question_llm=instantiate_LLM(
|
566 |
#LLM_provider="Google",api_key=google_api_key,temperature=0.3,
|
567 |
+
LLM_provider="OpenAI",api_key=openai_api_key,temperature=0.3,
|
568 |
model_name="gemini-pro"),
|
569 |
memory=create_memory("gemini-pro"),
|
570 |
retriever = compression_retriever_HF,
|
571 |
#retriever = base_retriever_HF, #base_retriever_HF
|
572 |
llm=instantiate_LLM(
|
573 |
#LLM_provider="Google",api_key=google_api_key,temperature=0.8,
|
574 |
+
LLM_provider="OpenAI",api_key=openai_api_key,temperature=0.3,
|
575 |
model_name="gemini-pro"),
|
576 |
chain_type= "stuff",
|
577 |
verbose= True,
|