jc7k commited on
Commit
4de6a40
·
verified ·
1 Parent(s): b9a3ea0

Updated system prompt

Browse files
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -2,6 +2,7 @@ import os
2
  import gradio as gr
3
  import requests
4
  import inspect
 
5
  import pandas as pd
6
  from smolagents import OpenAIServerModel, ToolCallingAgent, HfApiModel, DuckDuckGoSearchTool
7
 
@@ -22,7 +23,19 @@ class BasicAgent:
22
  api_base="https://api.openai.com/v1",
23
  api_key=os.environ["OPENAI_API_KEY"],
24
  )
25
- agent = ToolCallingAgent(tools=[DuckDuckGoSearchTool()], model=model)
 
 
 
 
 
 
 
 
 
 
 
 
26
  self.agent = agent
27
  print(f"Agent initialized with model ID: {os.environ['MODEL_ID']}")
28
  print(f"Agent initialized with tools: {self.agent.tools}")
 
2
  import gradio as gr
3
  import requests
4
  import inspect
5
+ import yaml
6
  import pandas as pd
7
  from smolagents import OpenAIServerModel, ToolCallingAgent, HfApiModel, DuckDuckGoSearchTool
8
 
 
23
  api_base="https://api.openai.com/v1",
24
  api_key=os.environ["OPENAI_API_KEY"],
25
  )
26
+
27
+ with open("prompts.yaml", "r") as stream:
28
+ prompt_templates = yaml.safe_load(stream)
29
+
30
+ agent = ToolCallingAgent(
31
+ name="Jeff's GAIA L1 Agent",
32
+ verbosity_level=1,
33
+ tools=[DuckDuckGoSearchTool()],
34
+ add_base_tools=True,
35
+ max_steps=5,
36
+ model=model,
37
+ prompt_templates=prompt_templates)
38
+
39
  self.agent = agent
40
  print(f"Agent initialized with model ID: {os.environ['MODEL_ID']}")
41
  print(f"Agent initialized with tools: {self.agent.tools}")