Replies: 1 comment
-
I'd give some few shot examples as
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have a problem with the Anthropic[Vertex] Haiku model; it sometimes inserts an XML tag.
For example, my Pydantic schema states:
tax: Optional[float] = Field(None, description="Tax amount applied to the item.")
In 95% of cases, it works correctly, but sometimes I see the following in the logs:
'input': {'documents': '[\n {\n "type": "GENERAL",\n "items": [\n {\n "name": "SMT",\n "category": "XYZ",\n "price": 3.79,\n "quantity": 1,\n "tax": 0.98\n },\n {\n "name": "SMT",\n "category": "XYZ",\n "price": 2.10,\n "quantity": 1,\n "tax": <UNKNOWN>\n }\n ]\n }\n]'}
As you can see, the tax should be a float or NULL, but it is an unparseable text without quotation marks.
Any ideas on how to solve this?
I caught the following error provided by the Instructor:
"{""error"": ""Validation error"", ""details"": ""1 validation error for Documents\ndocuments\n Input should be a valid array [type=list_type, input_value='{\\n \""type\"": \""GENERAL\"",\\...UNKNOWN>\\n }\\n ]\\n}', input_type=str]""}"
Is this the message that is sent back to the model? I'm not sure if it will be understandable for the model.
Beta Was this translation helpful? Give feedback.
All reactions