Spaces:
Running
Running
ryanrwatkins
commited on
Commit
•
5027c65
1
Parent(s):
567b49c
Update app.py
Browse files
app.py
CHANGED
@@ -649,10 +649,10 @@ Chat History:\n{chat_history}\n
|
|
649 |
Follow Up Input: {question}\n
|
650 |
Standalone question: {question}"""
|
651 |
|
652 |
-
standalone_question_prompt = PromptTemplate(
|
653 |
-
input_variables=['chat_history', 'question'],
|
654 |
-
template=standalone_question_template
|
655 |
-
)
|
656 |
|
657 |
|
658 |
def answer_template(language="english"):
|
@@ -683,7 +683,9 @@ def answer_template(language="english"):
|
|
683 |
|
684 |
|
685 |
chain = ConversationalRetrievalChain.from_llm(
|
686 |
-
condense_question_prompt=
|
|
|
|
|
687 |
combine_docs_chain_kwargs={'prompt': ChatPromptTemplate.from_template(answer_template())},
|
688 |
condense_question_llm=instantiate_LLM(
|
689 |
LLM_provider="Google",api_key=google_api_key,temperature=0.1,
|
@@ -779,8 +781,8 @@ def submit_message(prompt, prompt_template, temperature, max_tokens, context_len
|
|
779 |
history = state['messages']
|
780 |
|
781 |
|
782 |
-
global prompt_template_name
|
783 |
-
prompt_template_name = prompt_template
|
784 |
#print(prompt_template) # prints who is responding if I move to multiple experts
|
785 |
#print(prompt_templates[prompt_template])
|
786 |
|
|
|
649 |
Follow Up Input: {question}\n
|
650 |
Standalone question: {question}"""
|
651 |
|
652 |
+
#standalone_question_prompt = PromptTemplate(
|
653 |
+
# input_variables=['chat_history', 'question'],
|
654 |
+
# template=standalone_question_template
|
655 |
+
#)
|
656 |
|
657 |
|
658 |
def answer_template(language="english"):
|
|
|
683 |
|
684 |
|
685 |
chain = ConversationalRetrievalChain.from_llm(
|
686 |
+
condense_question_prompt=PromptTemplate(
|
687 |
+
input_variables=['chat_history', 'question'],
|
688 |
+
template=standalone_question_template),
|
689 |
combine_docs_chain_kwargs={'prompt': ChatPromptTemplate.from_template(answer_template())},
|
690 |
condense_question_llm=instantiate_LLM(
|
691 |
LLM_provider="Google",api_key=google_api_key,temperature=0.1,
|
|
|
781 |
history = state['messages']
|
782 |
|
783 |
|
784 |
+
#global prompt_template_name
|
785 |
+
#prompt_template_name = prompt_template
|
786 |
#print(prompt_template) # prints who is responding if I move to multiple experts
|
787 |
#print(prompt_templates[prompt_template])
|
788 |
|