Any one manage to get flux to work? When I run the exactly example in the documentation it errors wi
Any one manage to get flux to work? When I run the exactly example in the documentation it errors with NSFW:
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run/@cf/black-forest-labs/flux-1-schnell -X POST -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" -d '{ "prompt": "cyberpunk cat" }'
{"errors":[{"message":"AiError: AiError: Input prompt contains NSFW content.","code":3030}],"success":false,"result":{},"messages":[]}@cf/black-forest-labs/flux-1-schnell to work? Even the short example at https://developers.cloudflare.com/workers-ai/models/flux-1-schnell/ is broken for me.{ audio: "UklGRl4VAQBXQVZFZm10 ...... " })llama-3.1-70b-instruct) and, for some reason, I'm currently unable to see in Cloudflare dashboard how much we've been consuming. Any ideas?{"errors":[{"message":"AiError: AiError: Unknown internal error","code":3028}],"success":false,"result":{},"messages":[]} . The example from the docs doesn't work either https://developers.cloudflare.com/workers-ai/fine-tunes/public-loras/ . Tried the cURL command using my token, same error. Saw a few messages related to this before, but seems like there aren't any solution yet.
@cf/black-forest-labs/flux-1-schnell{ audio: "UklGRl4VAQBXQVZFZm10 ...... " }llama-3.1-70b-instruct{"errors":[{"message":"AiError: AiError: Unknown internal error","code":3028}],"success":false,"result":{},"messages":[]}const tool_response = await env.AI.run(
"@hf/nousresearch/hermes-2-pro-mistral-7b",
{
messages: [
{ role: "user", content: query },
],
temperature: 0.2,
tools: [
{
type: "function",
function: {
name: "get-weather",
description: "Gets weather information of a particular city",
parameters: {
type: "object",
properties: {
city: {
type: "string",
description: "The city name",
},
country: {
type: "string",
description: "The country name",
}
},
required: ["city"],
}
}
},
{
type: "function",
function: {
name: "search-google",
description: "Gets general data from Google",
parameters: {
type: "object",
properties: {
keyword: {
type: "string",
description: "The keywords for searching",
},
},
required: ["keyword"],
}
}
},
],
}
);
const selected_tool = tool_response?.tool_calls?.[0];
console.log({ selected_tool }); selected_tool: {
arguments: { from_currency: 'USD', to_currency: 'CNY' },
name: 'get-currency-exchange-rate'
}