Bhanu-Chander-ABB commited on
Commit
0a04e0d
·
1 Parent(s): 015a54f

removed max_tokens

Browse files
Files changed (1) hide show
  1. app.py +2 -12
app.py CHANGED
@@ -690,23 +690,13 @@ If you are asked for a comma separated list, apply the above rules depending of
690
  You also have access to a set of tools, which you can use to answer the question. The available tools with their descriptions are:
691
  {tool_descriptions}
692
 
693
- For each question, follow this format:
694
- Question: the input question you must answer
695
- Thought: your reasoning about what to do next
696
- Action: the action to take, must be one of the tools above if required. If tool not required, just write "no_action"
697
- Action Input: the input to the action
698
- Observation: the result of the action
699
- ... (repeat Thought/Action/Action Input/Observation as needed)
700
- Final Answer: the answer to the original question, as concise as possible (number, short string, or comma-separated list, no extra explanation).
701
-
702
- If you cannot answer, respond with "no_answer".
703
-
704
  If there is a file (image, audio, or video) attached to the question, you should use the process_attachment tool to process it and follow the instructions below:
705
  - For audio or video attachments, the process_attachment tool will transcribe the audio and return the transcript, which you can use to answer the question.
706
  - For image attachments, the process_attachment tool will return a base64 encoded string of the image. You can use this encoded information to provide answer.
707
 
708
  If the question is related to sports, awards, historical facts or similar topic that can be answered from wikipedia, you should use the 'sports_awards_historicalfacts_tool' or if the question is similar or related that can be searched in wikipedia, use the more specific tool 'wikipedia_summary' to fetch relevant page information and answer from it.
709
  In general, you must use tools only if needed for the question and only if the question can be answered by one of the provided tools. Otherwise provide the answer based on your knowledge. You must not use multiple tools in a single call. Don't hallucinate.
 
710
 
711
  """
712
 
@@ -763,7 +753,7 @@ chat_llm = ChatOpenAI(
763
  openai_api_key=OPENAI_KEY,
764
  model_name=OPENAI_MODEL,
765
  temperature=0.2,
766
- max_tokens=10
767
  )
768
 
769
  # chat = ChatHuggingFace(llm=llm, verbose=True)
 
690
  You also have access to a set of tools, which you can use to answer the question. The available tools with their descriptions are:
691
  {tool_descriptions}
692
 
 
 
 
 
 
 
 
 
 
 
 
693
  If there is a file (image, audio, or video) attached to the question, you should use the process_attachment tool to process it and follow the instructions below:
694
  - For audio or video attachments, the process_attachment tool will transcribe the audio and return the transcript, which you can use to answer the question.
695
  - For image attachments, the process_attachment tool will return a base64 encoded string of the image. You can use this encoded information to provide answer.
696
 
697
  If the question is related to sports, awards, historical facts or similar topic that can be answered from wikipedia, you should use the 'sports_awards_historicalfacts_tool' or if the question is similar or related that can be searched in wikipedia, use the more specific tool 'wikipedia_summary' to fetch relevant page information and answer from it.
698
  In general, you must use tools only if needed for the question and only if the question can be answered by one of the provided tools. Otherwise provide the answer based on your knowledge. You must not use multiple tools in a single call. Don't hallucinate.
699
+ If you cannot answer, respond with "no_answer".
700
 
701
  """
702
 
 
753
  openai_api_key=OPENAI_KEY,
754
  model_name=OPENAI_MODEL,
755
  temperature=0.2,
756
+ # max_tokens=10
757
  )
758
 
759
  # chat = ChatHuggingFace(llm=llm, verbose=True)