-
Notifications
You must be signed in to change notification settings - Fork 139
Open
Description
laravel ai版本 "laravel/ai": "^0.2.2",
配置文件如下
ai.php
'doubao' => [
'driver' => 'openai',
'key' => env('DOUBAO_API_KEY'),
'url' => env('DOUBAO_BASE_URL', 'https://ark.cn-beijing.volces.com/api/v3'),
],生成的代码如下
$image = Image::of('A donut sitting on the kitchen counter')
->size('1024x1792')
->queue(model: 'doubao-seedream-3-0-t2i-250415')
->then(function (\Laravel\Ai\Responses\ImageResponse $imageResponse) {
dd($imageResponse->firstImage());
});出现的错误如下:
Laravel\Ai\Responses\Data\GeneratedImage::__construct(): Argument #1 ($image) must be of type string, null given, called in vendor/laravel/ai/src/Gateway/Prism/PrismGateway.php on line 200
这是我打印的一个对象
Prism\Prism\ValueObjects\GeneratedImage^ {#2582
#fileId: null
#localPath: null
#storagePath: null
#rawContent: null
#filename: null
+url: "https://ark-content-generation-v2-cn-beijing.tos-cn-beijing.volces.com/doubao-seedream-3-0-t2i/021772073104904289ee8f5cd43d8cc040debd1abd108ae67aa52_0.jpeg?X-Tos-Algorithm=TOS4-HMAC-SHA256&X-Tos-Credential=AKLTYWJkZTExNjA1ZDUyNDc3YzhjNTM5OGIyNjBhNDcyOTQ%2F20260226%2Fcn-beijing%2Ftos%2Frequest&X-Tos-Date=20260226T023149Z&X-Tos-Expires=86400&X-Tos-Signature=4388760e99062f38824c82441d09460e5be300722a8e5c0ba95c937d1e18fa62&X-Tos-SignedHeaders=host"
+base64: null
+mimeType: null
#providerOptions: []
+revisedPrompt: null
}
豆包返回了一张图片,没有base64,导致后续报错
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels