Karim0111 commited on
Commit
baa5285
·
verified ·
1 Parent(s): c242d6e

Update final_answer.py

Browse files
Files changed (1) hide show
  1. 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 = 'granite3.3:8b'
48
  # Initialize the chat model
49
- model = LiteLLMModel(model_id=f'ollama_chat/{model_name}',
50
- flatten_messages_as_text=True)
 
 
 
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}