errchh
commited on
Commit
·
2949c77
1
Parent(s):
c233fe5
debug llm, correct prompt
Browse files- __pycache__/agent.cpython-312.pyc +0 -0
- __pycache__/prompts.cpython-312.pyc +0 -0
- agent.py +1 -0
- prompts.py +1 -6
__pycache__/agent.cpython-312.pyc
CHANGED
Binary files a/__pycache__/agent.cpython-312.pyc and b/__pycache__/agent.cpython-312.pyc differ
|
|
__pycache__/prompts.cpython-312.pyc
CHANGED
Binary files a/__pycache__/prompts.cpython-312.pyc and b/__pycache__/prompts.cpython-312.pyc differ
|
|
agent.py
CHANGED
@@ -173,6 +173,7 @@ def build_graph():
|
|
173 |
|
174 |
def assistant(state: AgentState):
|
175 |
result = llm_with_tools.invoke(state["messages"])
|
|
|
176 |
# Ensure the result is always wrapped in a list, even if invoke returns a single message
|
177 |
# Add usage information if it's not already present
|
178 |
if isinstance(result, AIMessage) and result.usage_metadata is None:
|
|
|
173 |
|
174 |
def assistant(state: AgentState):
|
175 |
result = llm_with_tools.invoke(state["messages"])
|
176 |
+
print(f"DEBUG: LLM result = {result}")
|
177 |
# Ensure the result is always wrapped in a list, even if invoke returns a single message
|
178 |
# Add usage information if it's not already present
|
179 |
if isinstance(result, AIMessage) and result.usage_metadata is None:
|
prompts.py
CHANGED
@@ -1,6 +1 @@
|
|
1 |
-
system_prompt = "
|
2 |
-
Now, I will ask you a question. Report your thoughts, and finish your answer with the following template:
|
3 |
-
FINAL ANSWER: [YOUR FINAL ANSWER].
|
4 |
-
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 are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. 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. 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.
|
5 |
-
Your answer should only start with "FINAL ANSWER: ", then follows with the answer.
|
6 |
-
"""
|
|
|
1 |
+
system_prompt = "You are a general AI assistant. I will ask you a question. Report your thoughts, and finish your answer with the following template: FINAL ANSWER: [YOUR FINAL ANSWER]. 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 are asked for a number, don't use comma to write your number neither use units such as $ or percent sign unless specified otherwise. 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. 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."
|
|
|
|
|
|
|
|
|
|