Spaces:
Sleeping
Sleeping
import and bind all the tools
Browse files- Alfred_Agent.py +8 -2
Alfred_Agent.py
CHANGED
|
@@ -44,7 +44,10 @@ from langgraph.graph import START, StateGraph
|
|
| 44 |
from langgraph.prebuilt import tools_condition
|
| 45 |
from langchain_openai import ChatOpenAI
|
| 46 |
from Webserch_tool import weather_info_tool
|
| 47 |
-
from other_tools import
|
|
|
|
|
|
|
|
|
|
| 48 |
import os
|
| 49 |
from dotenv import load_dotenv
|
| 50 |
load_dotenv()
|
|
@@ -52,7 +55,10 @@ load_dotenv()
|
|
| 52 |
llm = ChatOpenAI(temperature=0
|
| 53 |
, model="gpt-4o-mini", openai_api_key=os.getenv("OPENAI_KEY"))
|
| 54 |
|
| 55 |
-
tools = [
|
|
|
|
|
|
|
|
|
|
| 56 |
chat_with_tools = llm.bind_tools(tools)
|
| 57 |
|
| 58 |
#setting up prompt
|
|
|
|
| 44 |
from langgraph.prebuilt import tools_condition
|
| 45 |
from langchain_openai import ChatOpenAI
|
| 46 |
from Webserch_tool import weather_info_tool
|
| 47 |
+
from other_tools import (
|
| 48 |
+
wiki_search, arvix_search, web_search, vector_search,
|
| 49 |
+
multiply, add, subtract, divide, modulus, power, square_root
|
| 50 |
+
)
|
| 51 |
import os
|
| 52 |
from dotenv import load_dotenv
|
| 53 |
load_dotenv()
|
|
|
|
| 55 |
llm = ChatOpenAI(temperature=0
|
| 56 |
, model="gpt-4o-mini", openai_api_key=os.getenv("OPENAI_KEY"))
|
| 57 |
|
| 58 |
+
tools = [
|
| 59 |
+
weather_info_tool, wiki_search, arvix_search, web_search,
|
| 60 |
+
multiply, add, subtract, divide, modulus, power, square_root
|
| 61 |
+
]
|
| 62 |
chat_with_tools = llm.bind_tools(tools)
|
| 63 |
|
| 64 |
#setting up prompt
|