Replies: 1 comment
-
Yes, import os
import requests
from chatlas import ChatGithub
chat = ChatGithub(api_key=os.getenv("GITHUB_PAT"))
def get_current_weather(latitude: float, longitude: float):
"""Get the current temperature given a latitude and longitude."""
lat_lng = f"latitude={latitude}&longitude={longitude}"
url = f"https://api.open-meteo.com/v1/forecast?{lat_lng}¤t=temperature_2m,wind_speed_10m&hourly=temperature_2m,relative_humidity_2m,wind_speed_10m"
response = requests.get(url)
json = response.json()
return json["current"]
chat.register_tool(get_current_weather)
chat.chat("What is the current temperature in San Francisco?") Could you try running that and letting me know what you get for output? What are you setting the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. I was trying to follow the Tool Calling example from the SHINY FOR PYTHON website.
Due to internal constraints, I need to use the ChatGithub package instead of ChatAnthropic.
So I only replaced the package and tried running the example as-is, but Tool Calling doesn't work.
What should I do?
client.py
app.py
Beta Was this translation helpful? Give feedback.
All reactions