-
Notifications
You must be signed in to change notification settings - Fork 288
Open
Labels
feature-requestCategory: A new feature or enhancement to an existing feature is being requested.Category: A new feature or enhancement to an existing feature is being requested.
Description
Service
OpenAI
Describe the bug
GeneratedImage
should return Usage number of tokens. As with ChatCompletion
.
Here the json response from the request api:
{
"created": 1745709995,
"data": [
{
"b64_json": "***"
}
],
"usage": {
"input_tokens": 22,
"input_tokens_details": {
"image_tokens": 0,
"text_tokens": 22
},
"output_tokens": 272,
"total_tokens": 294
}
}
var client = new ImageClient(model: model.Name, apiKey: ApiKey);
ImageGenerationOptions options = new()
{
Quality = GeneratedImageQuality.High,
Size = GeneratedImageSize.W1792xH1024,
Style = GeneratedImageStyle.Vivid,
ResponseFormat = GeneratedImageFormat.Bytes
};
GeneratedImage image = await client.GenerateImageAsync(prompt, options);
OS
Win
.NET version
.net 8
Library version
latest
kirk-marple and Alerinos
Metadata
Metadata
Assignees
Labels
feature-requestCategory: A new feature or enhancement to an existing feature is being requested.Category: A new feature or enhancement to an existing feature is being requested.