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
Most of the time LLM call this function with correct format (2018-11-13T20:20:39+00:00) for parameters.
But it already happened that LLM called my function with a wrong format (2018-11-13) instead of expected one.
If I could specify the format, that would fix the issue I think.
For now, I will specify it in the parameter description.
But I think that would be great if the JsonSchema definition in Vapi could be fully compliant with JsonSchema.
ok, I'll do that. I understand your point about not overwhelming people, although I think it would be clearer to stick to the standard definition. It helps suggest to people that they may benefit from better validation of the parameters
Hello,
I think that JsonSchema interface is not complete.
https://github.com/VapiAI/web/blob/cb7f315e49889c84e1b03bfaa1664d14d6b62608/api.ts#L454
It's missing some properties useful for validation, for instance
minLength
,maxLength
andformat
for string type:https://json-schema.org/understanding-json-schema/reference/string#format
That would help on the tool specification so that LLM is aware of expected format.
For instance, I have a tool function, with
startDate
andendDate
parameters.This parameters should be date-time (
type: string
,format: date-time
)Most of the time LLM call this function with correct format (2018-11-13T20:20:39+00:00) for parameters.
But it already happened that LLM called my function with a wrong format (2018-11-13) instead of expected one.
If I could specify the format, that would fix the issue I think.
For now, I will specify it in the parameter description.
But I think that would be great if the
JsonSchema
definition in Vapi could be fully compliant with JsonSchema.Also in openAI doc there is an example with enums to enforce parameter validation:
https://platform.openai.com/docs/guides/function-calling/use-enums-for-function-arguments-when-possible
I don't think we can have as much control on validation on Vapi.
What do you think?
The text was updated successfully, but these errors were encountered: