You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, just checking out this wonderful library and get an exception for a simple tool without any parameter. Are parameters required or is that an issue in the package?
When I comment out the withStringParameter I get an exception.
$tools = [
Tool::as('weather')
->for('useful when you need to search for current weather conditions')
// Commenting this out, will break it:// ->withStringParameter('city', 'The city that you want the weather for')
->using(fn (string$city): string => 'The weather will be 75° and sunny'),
];
$response = Prism::text()
->using(Provider::Ollama, 'qwen2.5:1.5b')
->withTools($tools)
->withToolChoice('weather')
->withMaxSteps(3)
->withPrompt('How is the weather in Berlin?')
->generate();
Ollama Error: [invalid_request_error] json: cannot unmarshal array into Go struct field .tools.function.parameters.properties of type map[string]struct { Type string "json:\"type\""; Description string "json:\"description\""; Enum []string "json:\"enum,omitempty\"" }
The text was updated successfully, but these errors were encountered:
Hey, just checking out this wonderful library and get an exception for a simple tool without any parameter. Are parameters required or is that an issue in the package?
When I comment out the
withStringParameter
I get an exception.The text was updated successfully, but these errors were encountered: