Documentation
¶
Overview ¶
Package test provides common test methods and types for LLM providers.
Index ¶
- func Chat(t *testing.T, p testProvider, model llmproxy.ModelID)
- func ChatWithToolUse(t *testing.T, p testProvider, model llmproxy.ModelID)
- func FileHandling(t *testing.T, p testProvider)
- func StructuredResponse(t *testing.T, p testProvider, model llmproxy.ModelID)
- type GetWeatherArgs
- type Temperature
- type Weather
- type WeatherForecast
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChatWithToolUse ¶
ChatWithToolUse tests chat functionality with tool use.
func FileHandling ¶
FileHandling tests file upload and deletion functionality of the provider.
Types ¶
type GetWeatherArgs ¶
type GetWeatherArgs struct {
City string `json:"city"`
}
GetWeatherArgs represents the arguments for the GetWeather tool.
type Temperature ¶
type Temperature struct {
Current float64 `json:"current"`
High float64 `json:"high"`
Low float64 `json:"low"`
Unit string `json:"unit"`
}
Temperature shows nested structure support
type Weather ¶
type Weather struct {
City string `json:"city"`
TemperatureRange string `json:"temperature_range"`
Conditions string `json:"conditions"`
}
Weather represents the weather information returned by the GetWeather tool.
func GetWeather ¶
func GetWeather(_ context.Context, args GetWeatherArgs) (Weather, error)
GetWeather returns the current weather information for a specified city.
type WeatherForecast ¶
type WeatherForecast struct {
Location string `json:"location"`
Conditions string `json:"conditions"`
Temperature Temperature `json:"temperature"`
Alerts []string `json:"alerts"`
}
WeatherForecast demonstrates a nested response format
Click to show internal directories.
Click to hide internal directories.