Golfn commited on
Commit
5eaf224
·
1 Parent(s): f173520

disable unused tools, and test lines

Browse files
Files changed (1) hide show
  1. Alfred_Agent.py +6 -6
Alfred_Agent.py CHANGED
@@ -44,7 +44,7 @@ from langgraph.prebuilt import ToolNode
44
  from langgraph.graph import START, StateGraph
45
  from langgraph.prebuilt import tools_condition
46
  from langchain_openai import ChatOpenAI
47
- from Webserch_tool import search_tool,weather_info_tool
48
  from other_tools import wiki_search, arvix_search, web_search
49
  import os
50
  from dotenv import load_dotenv
@@ -53,7 +53,7 @@ load_dotenv()
53
  llm = ChatOpenAI(temperature=0
54
  , model="gpt-4o-mini", openai_api_key=os.getenv("OPENAI_KEY"))
55
 
56
- tools = [guest_info_tool,search_tool,weather_info_tool,wiki_search,arvix_search,web_search]
57
  chat_with_tools = llm.bind_tools(tools)
58
 
59
  # Generate the AgentState and Agent graph
@@ -83,8 +83,8 @@ builder.add_conditional_edges(
83
  builder.add_edge("tools", "assistant")
84
  alfred = builder.compile()
85
 
86
- messages = [HumanMessage(content="Tell me about our guest named 'Dr. Nikola Tesla' and What's the weather in Bangkok.")]
87
- response = alfred.invoke({"messages": messages})
88
 
89
- print("🎩 Alfred's Response:")
90
- print(response['messages'][-1].content)
 
44
  from langgraph.graph import START, StateGraph
45
  from langgraph.prebuilt import tools_condition
46
  from langchain_openai import ChatOpenAI
47
+ from Webserch_tool import weather_info_tool
48
  from other_tools import wiki_search, arvix_search, web_search
49
  import os
50
  from dotenv import load_dotenv
 
53
  llm = ChatOpenAI(temperature=0
54
  , model="gpt-4o-mini", openai_api_key=os.getenv("OPENAI_KEY"))
55
 
56
+ tools = [weather_info_tool,wiki_search,arvix_search,web_search]
57
  chat_with_tools = llm.bind_tools(tools)
58
 
59
  # Generate the AgentState and Agent graph
 
83
  builder.add_edge("tools", "assistant")
84
  alfred = builder.compile()
85
 
86
+ # messages = [HumanMessage(content="Tell me about our guest named 'Dr. Nikola Tesla' and What's the weather in Bangkok.")]
87
+ # response = alfred.invoke({"messages": messages})
88
 
89
+ # print("🎩 Alfred's Response:")
90
+ # print(response['messages'][-1].content)