I tried to define a function call in spring ai as below
@Bean
@Description("return list of Vets, include their specialist")
public Function<Void, Collection<Vet>> queryVets() {
return request -> {
return vetRepository.findAll();
};
}
The input parameter is Void as the function has no input parameter.
But I got the error
com.azure.core.exception.HttpResponseException: Status code 400, “{
“error”: {
“message”: “Invalid schema for function ‘queryVets’: In context=(), object schema missing properties”,
“type”: “invalid_request_error”,
“param”: null,
“code”: null
}
}
“
How can I define a fuction without input parameters?
define a fuction without input parameters
Li Truman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.