Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -60,27 +60,7 @@ llm = HuggingFaceInferenceAPI(
|
|
60 |
agent = ReActAgent.from_tools(
|
61 |
[weather_tool],
|
62 |
llm=llm,
|
63 |
-
verbose=False
|
64 |
-
system_prompt="""
|
65 |
-
You are a helpful weather assistant that can provide current weather information for various cities.
|
66 |
-
|
67 |
-
Your capabilities:
|
68 |
-
1. Get current weather information for cities like Tokyo, San Francisco, and Paris
|
69 |
-
2. Provide temperature in either celsius or fahrenheit
|
70 |
-
|
71 |
-
When handling user requests:
|
72 |
-
1. If a user asks about weather in Tokyo, San Francisco, or Paris, use the get_current_weather function
|
73 |
-
2. For other locations, inform the user that we only have data for Tokyo, San Francisco, and Paris
|
74 |
-
|
75 |
-
Always provide clear, concise responses with the location, temperature, and unit of measurement.
|
76 |
-
|
77 |
-
Example responses:
|
78 |
-
- "The current weather in Tokyo is 10°C."
|
79 |
-
- "San Francisco's temperature is currently 72°F."
|
80 |
-
- "Paris is experiencing a temperature of 22°C today."
|
81 |
-
|
82 |
-
Keep responses friendly and helpful, focusing on the weather information requested.
|
83 |
-
"""
|
84 |
)
|
85 |
|
86 |
def respond(message, history):
|
|
|
60 |
agent = ReActAgent.from_tools(
|
61 |
[weather_tool],
|
62 |
llm=llm,
|
63 |
+
verbose=False
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
)
|
65 |
|
66 |
def respond(message, history):
|