Closed
Description
Feature Description
const messages = [
system: "you are weather bot. be concise.",
user: "what is the weather in France?",
createStructuredFewShot(getWeatherTool, [{
arguments: {
location: "France" // type-safe from tool zod schema
},
response: {
weather: "30 C" // type-safe from tool's execute return
}
}],
assistant: "The weather in France is 30 C",
user: "what is the weather in California?"
]
ideally the arguments/response types are inferred from the schema and ReturnType of the tool. This will create the example tool call messages and make writing few shot examples very easy for structured outputs (edited)
Use Case
No response
Additional context
No response