How to use `@cf/unum/uform-gen2-qwen-500m` via REST API ?

Im trting to use https://developers.cloudflare.com/workers-ai/models/uform-gen2-qwen-500m/ but cant figure it out waht inputs it even needs. Resnet 50 workde but for uform i have issues/
Cloudflare Docs
uform-gen2-qwen-500m · Cloudflare Workers AI docs
Run AI models in Workers, Pages, or via API.
2 Replies
suspect
suspectOP7mo ago
API Scheme for uform-gen2-qwen-500m
{
"oneOf": [
{
"type": "string",
"format": "binary"
},
{
"type": "object",
"properties": {
"image": {
"type": "array",
"items": {
"type": "number"
}
},
"prompt": {
"type": "string"
},
"max_tokens": {
"type": "integer",
"default": 512
}
}
}
]
}
{
"oneOf": [
{
"type": "string",
"format": "binary"
},
{
"type": "object",
"properties": {
"image": {
"type": "array",
"items": {
"type": "number"
}
},
"prompt": {
"type": "string"
},
"max_tokens": {
"type": "integer",
"default": 512
}
}
}
]
}
and api scheme for @cf/microsoft/resnet-50
{
"oneOf": [
{
"type": "string",
"format": "binary"
},
{
"type": "object",
"properties": {
"image": {
"type": "array",
"items": {
"type": "number"
}
}
}
}
]
}
{
"oneOf": [
{
"type": "string",
"format": "binary"
},
{
"type": "object",
"properties": {
"image": {
"type": "array",
"items": {
"type": "number"
}
}
}
}
]
}
both seme kinda similar and i shoud sadisfy:
{
"type": "string",
"format": "binary"
},
{
"type": "string",
"format": "binary"
},
my error for uform is
{
"errors": [
{
"message": "InferenceUpstreamError: must be string, must have required property 'image', must be number, must match exactly one schema in oneOf",
"code": 1000
}
],
"success": false,
"result": {},
"messages": []
}
{
"errors": [
{
"message": "InferenceUpstreamError: must be string, must have required property 'image', must be number, must match exactly one schema in oneOf",
"code": 1000
}
],
"success": false,
"result": {},
"messages": []
}
another_User
another_User7mo ago
Hey were you able to solve this? I'm also stuck here @suspect
Want results from more Discord servers?
Add your server