Spaces:
Runtime error
Runtime error
change
Browse files- real_agent.py +6 -6
real_agent.py
CHANGED
|
@@ -7,7 +7,7 @@ from langgraph.prebuilt import tools_condition
|
|
| 7 |
from langchain_huggingface import HuggingFaceEndpoint, ChatHuggingFace
|
| 8 |
from langchain_openai import ChatOpenAI
|
| 9 |
import os
|
| 10 |
-
from tools import hub_stats_tool, extract_image_text, add, divide, multiply, subtract, calculate_cargo_travel_time
|
| 11 |
from retriever import guest_info_tool
|
| 12 |
import gradio as gr
|
| 13 |
from langfuse.langchain import CallbackHandler
|
|
@@ -28,14 +28,14 @@ def call_build():
|
|
| 28 |
langfuse_handler = CallbackHandler()
|
| 29 |
|
| 30 |
# Initialize the web search tool
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
# Generate the chat interface, including the tools
|
| 36 |
|
| 37 |
chat = ChatOpenAI(model="gpt-4o")
|
| 38 |
-
tools = [guest_info_tool,
|
| 39 |
chat_with_tools = chat.bind_tools(tools)
|
| 40 |
|
| 41 |
# Generate the AgentState and Agent graph
|
|
|
|
| 7 |
from langchain_huggingface import HuggingFaceEndpoint, ChatHuggingFace
|
| 8 |
from langchain_openai import ChatOpenAI
|
| 9 |
import os
|
| 10 |
+
from tools import hub_stats_tool, extract_image_text, add, divide, multiply, subtract, calculate_cargo_travel_time, web_search_tool
|
| 11 |
from retriever import guest_info_tool
|
| 12 |
import gradio as gr
|
| 13 |
from langfuse.langchain import CallbackHandler
|
|
|
|
| 28 |
langfuse_handler = CallbackHandler()
|
| 29 |
|
| 30 |
# Initialize the web search tool
|
| 31 |
+
# search_tool = GoogleSearchTool(provider = "serpapi")
|
| 32 |
+
# search_tool.name = "GoogleSearchTool"
|
| 33 |
+
# visit_webpage_tool = VisitWebpageTool()
|
| 34 |
+
# visit_webpage_tool.name = "VisitWebpageTool"
|
| 35 |
# Generate the chat interface, including the tools
|
| 36 |
|
| 37 |
chat = ChatOpenAI(model="gpt-4o")
|
| 38 |
+
tools = [guest_info_tool, hub_stats_tool, extract_image_text, add, divide, multiply, subtract, calculate_cargo_travel_time, web_search_tool]
|
| 39 |
chat_with_tools = chat.bind_tools(tools)
|
| 40 |
|
| 41 |
# Generate the AgentState and Agent graph
|