SolshineMisfit commited on
Commit
b72b866
·
verified ·
1 Parent(s): ad924eb

Updated tools list and commented out weave decorator

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,7 +7,7 @@ from tools.final_answer import FinalAnswerTool
7
 
8
  from Gradio_UI import GradioUI
9
 
10
- @weave.op()
11
  def tracked_perplexity_call(prompt: str, system_messages: str, model_name: str = "sonar-pro", assistant_meta: bool = False):
12
  """Enhanced Perplexity API call with explicit model tracking."""
13
  client = OpenAI(api_key=os.getenv("PERPLEXITY_API_KEY"), base_url="https://api.perplexity.ai")
@@ -27,7 +27,7 @@ def tracked_perplexity_call(prompt: str, system_messages: str, model_name: str =
27
 
28
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
29
  @tool
30
- def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
31
  #Keep this format for the description / args / args description but feel free to modify the tool
32
  """A tool that accesses Perplexity Sonar to search the web when the answer requires or would benefit from a real world web reference.
33
  Args:
@@ -78,7 +78,7 @@ with open("prompts.yaml", 'r') as stream:
78
 
79
  agent = CodeAgent(
80
  model=model,
81
- tools=[final_answer], ## add your tools here (don't remove final answer)
82
  max_steps=6,
83
  verbosity_level=1,
84
  grammar=None,
 
7
 
8
  from Gradio_UI import GradioUI
9
 
10
+ #@weave.op()
11
  def tracked_perplexity_call(prompt: str, system_messages: str, model_name: str = "sonar-pro", assistant_meta: bool = False):
12
  """Enhanced Perplexity API call with explicit model tracking."""
13
  client = OpenAI(api_key=os.getenv("PERPLEXITY_API_KEY"), base_url="https://api.perplexity.ai")
 
27
 
28
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
29
  @tool
30
+ def Sonar_Web_Search_Tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
31
  #Keep this format for the description / args / args description but feel free to modify the tool
32
  """A tool that accesses Perplexity Sonar to search the web when the answer requires or would benefit from a real world web reference.
33
  Args:
 
78
 
79
  agent = CodeAgent(
80
  model=model,
81
+ tools=[final_answer], [Sonar_Web_Search_Tool] ## add your tools here (don't remove final answer)
82
  max_steps=6,
83
  verbosity_level=1,
84
  grammar=None,