Use intent model from archfc to pick prompt gateway (#328)

This commit is contained in:
Shuguang Chen 2024-12-20 13:25:01 -08:00 committed by GitHub
parent 67b8fd635e
commit ba7279becb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
151 changed files with 8642 additions and 10932 deletions

View file

@ -42,21 +42,18 @@ prompt_guards:
message: Looks like you're curious about my abilities, but I can only provide assistance for weather forecasting.
prompt_targets:
- name: weather_forecast
description: Check weather information for a given city.
- name: get_current_weather
description: Get current weather at a location.
parameters:
- name: city
description: the name of the city
- name: location
description: The location to get the weather for
required: true
type: str
type: string
format: City, State
- name: days
description: the number of days
type: int
description: the number of days for the request
required: true
- name: units
description: the temperature unit, e.g., Celsius and Fahrenheit
type: str
default: Fahrenheit
type: int
endpoint:
name: weather_forecast_service
path: /weather

View file

@ -42,7 +42,7 @@ async def healthz():
class WeatherRequest(BaseModel):
city: str
location: str
days: int = 7
units: str = "Farenheit"
@ -50,7 +50,7 @@ class WeatherRequest(BaseModel):
@app.post("/weather")
async def weather(req: WeatherRequest, res: Response):
weather_forecast = {
"city": req.city,
"location": req.location,
"temperature": [],
"units": req.units,
}

View file

@ -2,7 +2,7 @@
name = "api-server"
version = "0.1.0"
description = ""
authors = ["Adil Hafeez <adil@katanemo.com>"]
authors = ["Adil Hafeez <info@katanemo.com>"]
readme = "README.md"
[tool.poetry.dependencies]