Closed KarimAlii closed 1 hour ago
Need more info. Can you please provide steps to reproduce this error ? Which version you are using and how ?
"echolabsdev/prism": "^0.10.0"
$response = Prism::text()
->using(Provider::OpenAI, 'gpt-4o-mini')
->withMessages([$message])
->withCLientOptions(['timeout' => 120])
->usingTemperature(0)
->generate();
the message contains an Image and prompt.
I guess there is typo in withCLientOptions
this can you rename it to withClientOptions
?
I fixed the docs in https://github.com/echolabsdev/prism/pull/64
I just ran the following code successfully:
$message = new UserMessage('What is this image?', [
Image::fromPath('tests/Fixtures/test-image.png'),
]);
$response = Prism::text()
->using(Provider::OpenAI, 'gpt-4o-mini')
->withMessages([$message])
->withClientOptions(['timeout' => 120])
->usingTemperature(0)
->generate();
dd($response->text);
Response: "The image features a diamond shape, typically representing a diamond gem or a symbol associated with luxury, wealth, or engagement. It is a stylized graphic often used in jewelry design or branding related to diamonds."
I guess to address your question more specifically, the last cURL error would lead me to believe it is something related to your connection to OpenAI
This error I just faced it today, is it something related to my network or my internet because it's really says unknown error then the request timed out.