sampsong commited on
Commit
221f89b
·
1 Parent(s): 8c43a6f
Files changed (2) hide show
  1. Agents/agent.py +2 -0
  2. app.py +5 -2
Agents/agent.py CHANGED
@@ -70,6 +70,8 @@ def build_graph(provider: str="groq"):
70
  if provider== "groq":
71
  print(f"Running llm groq")
72
  llm=ChatGroq(groq_api_key=GROQ_API_KEY,model="qwen/qwen3-32b",temperature=0)
 
 
73
  elif provider == "huggingface":
74
  print(f"huggingface")
75
  llm = ChatHuggingFace(
 
70
  if provider== "groq":
71
  print(f"Running llm groq")
72
  llm=ChatGroq(groq_api_key=GROQ_API_KEY,model="qwen/qwen3-32b",temperature=0)
73
+ webreturn = webSearch.invoke({"searchQuery":"principle of double effect Wikipedia page history St. Thomas Aquinas image added date"})
74
+ print(f"WebReturn : {webreturn}")
75
  elif provider == "huggingface":
76
  print(f"huggingface")
77
  llm = ChatHuggingFace(
app.py CHANGED
@@ -19,6 +19,7 @@ agentType = os.getenv("AgentType")
19
 
20
  # --- Basic Agent Definition ---
21
  # ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
 
22
  class ReactAgent:
23
  def __init__(self):
24
  print(f"tools: {tools}")
@@ -53,7 +54,8 @@ class BasicAgent:
53
 
54
  self.graph.get_graph().draw_mermaid_png()
55
  answer = messages['messages'][-1].content
56
- print(f"tool calls : {messages[-1].tool_calls}")
 
57
  print(messages[-1].__dict__)
58
  print(f"full answer : {answer}")
59
  print("Assistant Output:", messages[-1])
@@ -94,7 +96,8 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
94
 
95
  if(testMode):
96
  # 5a test
97
- question = "When was a picture of St. Thomas Aquinas first added to the wikipedia page on the principle of double effect?"
 
98
  #graph = build_graph(provider="groq")
99
  try:
100
  submitted_answer = agent(question)
 
19
 
20
  # --- Basic Agent Definition ---
21
  # ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
22
+
23
  class ReactAgent:
24
  def __init__(self):
25
  print(f"tools: {tools}")
 
54
 
55
  self.graph.get_graph().draw_mermaid_png()
56
  answer = messages['messages'][-1].content
57
+ tools_calls = messages[-1].tool_calls
58
+ print(f"tool calls : {str(tools_calls)}")
59
  print(messages[-1].__dict__)
60
  print(f"full answer : {answer}")
61
  print("Assistant Output:", messages[-1])
 
96
 
97
  if(testMode):
98
  # 5a test
99
+ question1 = "When was a picture of St. Thomas Aquinas first added to the wikipedia page on the principle of double effect?"
100
+ question = "What is 2 multiplied by 3?"
101
  #graph = build_graph(provider="groq")
102
  try:
103
  submitted_answer = agent(question)