Spaces:
Runtime error
Runtime error
upd
Browse files- real_agent.py +10 -11
real_agent.py
CHANGED
|
@@ -14,27 +14,26 @@ from langfuse.langchain import CallbackHandler
|
|
| 14 |
from smolagents import VisitWebpageTool, GoogleSearchTool
|
| 15 |
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
os.environ["
|
| 20 |
-
|
| 21 |
-
os.environ["
|
| 22 |
-
|
| 23 |
-
os.environ["
|
|
|
|
|
|
|
| 24 |
|
| 25 |
|
| 26 |
-
def call_build():
|
| 27 |
langfuse_handler = CallbackHandler()
|
| 28 |
|
| 29 |
# Initialize the web search tool
|
| 30 |
|
| 31 |
-
search_tool = GoogleSearchTool()
|
| 32 |
-
|
| 33 |
|
| 34 |
# Generate the chat interface, including the tools
|
| 35 |
|
| 36 |
chat = ChatOpenAI(model="gpt-4o")
|
| 37 |
-
tools = [guest_info_tool,
|
| 38 |
chat_with_tools = chat.bind_tools(tools)
|
| 39 |
|
| 40 |
# Generate the AgentState and Agent graph
|
|
|
|
| 14 |
from smolagents import VisitWebpageTool, GoogleSearchTool
|
| 15 |
|
| 16 |
|
| 17 |
+
def call_build():
|
| 18 |
+
|
| 19 |
+
os.environ["LANGFUSE_PUBLIC_KEY"] = "pk-lf-842782bf-0e8d-4f50-8fb0-157464d5fe28"
|
| 20 |
+
os.environ["LANGFUSE_SECRET_KEY"] = "sk-lf-3179ce99-f0e4-46f1-bbde-df3752414be3"
|
| 21 |
+
os.environ["LANGFUSE_HOST"] = "https://us.cloud.langfuse.com"
|
| 22 |
+
|
| 23 |
+
os.environ["OPENAI_API_KEY"] = "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"
|
| 24 |
+
|
| 25 |
+
os.environ["SERPAPI_API_KEY"] = "82491710ce6c6aa2d767d7796023a5ca11aa182fcda2a703cd44aea8d6da4489"
|
| 26 |
|
| 27 |
|
|
|
|
| 28 |
langfuse_handler = CallbackHandler()
|
| 29 |
|
| 30 |
# Initialize the web search tool
|
| 31 |
|
|
|
|
|
|
|
| 32 |
|
| 33 |
# Generate the chat interface, including the tools
|
| 34 |
|
| 35 |
chat = ChatOpenAI(model="gpt-4o")
|
| 36 |
+
tools = [guest_info_tool, GoogleSearchTool(), hub_stats_tool, VisitWebpageTool(), extract_image_text, add, divide, multiply, subtract, calculate_cargo_travel_time]
|
| 37 |
chat_with_tools = chat.bind_tools(tools)
|
| 38 |
|
| 39 |
# Generate the AgentState and Agent graph
|