GenkitG
Genkitโ€ข12mo agoโ€ข
9 replies
sacred-rose

not sure where to ask this.. but

not sure where to ask this.. but sometimes the model just refuses to output according to the output schema. In the trace I see he did create a text response (see screenshot) but I still sometimes get htis error
GenkitError: INVALID_ARGUMENT: Schema validation failed. Parse Errors:

- (root): must be object

Provided data:

null

Required JSON schema:

{
  "type": "object",
  "properties": {
    "response": {
      "type": "string",
      "description": "the answer to the user's query"
    },
    "agent": {
      "type": "string",
      "description": "always triageAgent"
    },
    "contactOwner": {
      "type": "boolean",
      "description": "should be true when the user asks for the owner to be contacted"
    }
  },
  "required": [
    "response",
    "agent",
    "contactOwner"
  ],
  "additionalProperties": false
}
image.png
Was this page helpful?