-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Description
SDK Version (required)
5.20.0
Describe the bug
Type for response from embedding API does not match with response.
I don't know if you guys need to regenerate the SDK from the API, update the API definition, or find a new generator, but the ApiMetaBilledUnits has an attribute images, while the response returned has an attribute image_tokens.
The generator using # type: ignore and ConfigDict(extra='allow') hides the issue.
# printing the billed units from a response
print(resp.meta.billed_units.model_dump_json(indent=2))
# output
{
"images": null,
"input_tokens": 0.0,
"output_tokens": null,
"search_units": null,
"classifications": null,
"image_tokens": 2716 # this attribute is not featured in the model
}
Metadata
Metadata
Assignees
Labels
No labels