Update final_answer.py
Browse files- final_answer.py +6 -3
final_answer.py
CHANGED
|
@@ -44,10 +44,13 @@ def check_reasoning(final_answer, agent_memory):
|
|
| 44 |
|
| 45 |
def ensure_formatting(final_answer, agent_memory):
|
| 46 |
# Ensure the final answer is formatted correctly
|
| 47 |
-
model_name = '
|
| 48 |
# Initialize the chat model
|
| 49 |
-
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
| 51 |
prompt = f"""
|
| 52 |
Here is a user-given task and the agent steps: {agent_memory.get_succinct_steps()}. Now here is the FINAL ANSWER that was given:
|
| 53 |
{final_answer}
|
|
|
|
| 44 |
|
| 45 |
def ensure_formatting(final_answer, agent_memory):
|
| 46 |
# Ensure the final answer is formatted correctly
|
| 47 |
+
model_name = 'cogito:14b'
|
| 48 |
# Initialize the chat model
|
| 49 |
+
multimodal_model = LiteLLMModel(
|
| 50 |
+
model_id=model_name,
|
| 51 |
+
provider="ollama", # ADD THIS
|
| 52 |
+
api_key="ollama" # ADD THIS (ollama doesn't need real key but LiteLLM might expect it)
|
| 53 |
+
)
|
| 54 |
prompt = f"""
|
| 55 |
Here is a user-given task and the agent steps: {agent_memory.get_succinct_steps()}. Now here is the FINAL ANSWER that was given:
|
| 56 |
{final_answer}
|