Bhanu-Chander-ABB commited on
Commit
b18b7b9
·
1 Parent(s): bed3176

modified temperature

Browse files
Files changed (1) hide show
  1. app.py +12 -13
app.py CHANGED
@@ -381,22 +381,21 @@ tool_descriptions = "\n".join(f"- {tool.name}: {tool.description}" for tool in t
381
  # --- System Prompt for the Agent ---
382
 
383
  system_prompt = f"""
384
- You are a general AI assistant. I will ask you a question. Report your thoughts, and finish your answer with the following template: [YOUR FINAL ANSWER].
385
- YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings. If you don't have a valid answer, don't mention like 'I am unable to determine.....' or something similar, instead just return "no_answer".
 
 
 
386
 
387
- You have access to a set of tools that you can use to answer the question ONLY if relevant and required to input question
 
388
 
389
- tools description: {tool_descriptions}
 
 
390
 
391
- If there is a file (image, audio, or video) attached to the question, you should use the process_attachment tool to process it.
392
- 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.
393
- 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.
394
- You must use the tools only if necessary, and you must not use multiple tools in a single call. Don't hallucinate.
395
 
396
- Further instructions:
397
- - If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise.
398
- - If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise.
399
- - If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.
400
  """
401
 
402
  # system_prompt = f"""
@@ -451,7 +450,7 @@ chat_llm = ChatHuggingFace(llm=llm)
451
  chat_llm = ChatOpenAI(
452
  openai_api_key=OPENAI_KEY,
453
  model_name=OPENAI_MODEL,
454
- temperature=0.05
455
  )
456
 
457
  # chat = ChatHuggingFace(llm=llm, verbose=True)
 
381
  # --- System Prompt for the Agent ---
382
 
383
  system_prompt = f"""
384
+ You are a general AI assistant. I will ask you a question. Report your thoughts, and finish your answer with the following template: [YOUR FINAL ANSWER].
385
+ YOUR FINAL ANSWER should be a number OR as few words as possible OR a comma separated list of numbers and/or strings.
386
+ If you are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise.
387
+ If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise.
388
+ If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.
389
 
390
+ You have access to a set of tools, which you can use to answer the question. The available tools with their descriptions are:
391
+ {tool_descriptions}
392
 
393
+ 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:
394
+ - 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.
395
+ - 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.
396
 
397
+ 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.
 
 
 
398
 
 
 
 
 
399
  """
400
 
401
  # system_prompt = f"""
 
450
  chat_llm = ChatOpenAI(
451
  openai_api_key=OPENAI_KEY,
452
  model_name=OPENAI_MODEL,
453
+ temperature=0.3
454
  )
455
 
456
  # chat = ChatHuggingFace(llm=llm, verbose=True)