Mohammad Haghir commited on
Commit ·
21d5b3a
1
Parent(s): 91edf5a
tool update
Browse files
app.py
CHANGED
|
@@ -51,6 +51,8 @@ class BasicAgent:
|
|
| 51 |
# context = self.wiki_ret(question)
|
| 52 |
context = state.get("context", "")
|
| 53 |
question = state.get("messages", "")
|
|
|
|
|
|
|
| 54 |
prompt = f"""
|
| 55 |
You are a general AI assistant. I will ask you a question.
|
| 56 |
YOUR FINAL ANSWER should be a number OR
|
|
@@ -71,6 +73,7 @@ class BasicAgent:
|
|
| 71 |
# Just make up a task_id.
|
| 72 |
# Call the LLM
|
| 73 |
messages = [HumanMessage(content=prompt)]
|
|
|
|
| 74 |
response = (llm_with_tools.invoke(messages)).content
|
| 75 |
print("response: ", response)
|
| 76 |
# cleaned_text = re.sub(r"<think>.*?</think>", "", response.content, flags=re.DOTALL)
|
|
|
|
| 51 |
# context = self.wiki_ret(question)
|
| 52 |
context = state.get("context", "")
|
| 53 |
question = state.get("messages", "")
|
| 54 |
+
print("question agent: ", question)
|
| 55 |
+
print("context: ", context)
|
| 56 |
prompt = f"""
|
| 57 |
You are a general AI assistant. I will ask you a question.
|
| 58 |
YOUR FINAL ANSWER should be a number OR
|
|
|
|
| 73 |
# Just make up a task_id.
|
| 74 |
# Call the LLM
|
| 75 |
messages = [HumanMessage(content=prompt)]
|
| 76 |
+
print("messages: ", messages)
|
| 77 |
response = (llm_with_tools.invoke(messages)).content
|
| 78 |
print("response: ", response)
|
| 79 |
# cleaned_text = re.sub(r"<think>.*?</think>", "", response.content, flags=re.DOTALL)
|