Comments (4)
Support for vision added in the latest release: https://github.com/openai-php/client/releases/tag/v0.7.8
from laravel.
I am seeing this too. The problem is most likely in https://github.com/openai-php/client though and not the Laravel package I think.
from laravel.
The problem is that Vision doesn't have a "finish_reason" key, but a "finish_details" key.
Here is the return of "$response" in the "create" function
["data":"OpenAI\ValueObjects\Transporter\Response":private]=>
array(6) {
["id"]=>
string(38) "chatcmpl-8IDwyCPKagOULoujiDqvNXssfs1s"
["object"]=>
string(15) "chat.completion"
["created"]=>
int(1699354220)
["model"]=>
string(25) "gpt-4-1106-vision-preview"
["usage"]=>
array(3) {
["prompt_tokens"]=>
int(1114)
["completion_tokens"]=>
int(184)
["total_tokens"]=>
int(1298)
}
["choices"]=>
array(1) {
[0]=>
array(3) {
["message"]=>
array(2) {
["role"]=>
string(9) "assistant"
["content"]=>
string(942) "This is an image of a wooden boardwalk traversing through a lush green field. The boardwalk is constructed with horizontal planks and has a simple design without handrails or barriers. It extends from the foreground into the middle of the image, guiding the viewer's eye towards the horizon. On either side of the walkway, tall green grasses are visible, suggesting the boardwalk is meant to protect the natural environment and provide a path for visitors to enjoy without disturbing the surrounding flora.
The sky is a vibrant blue with wispy white clouds scattered throughout, suggesting a fair weather day. In the distance, there's a line of trees or shrubs, dividing the grassy field from the sky. The natural lighting and composition give the scene a serene and inviting atmosphere, ideal for a peaceful walk or nature observation. The combination of the verdant fields and the expansive sky creates a sense of openness and tranquility."
}
["finish_details"]=>
array(2) {
["type"]=>
string(4) "stop"
["stop"]=>
string(14) "<|fim_suffix|>"
}
["index"]=>
int(0)
}
}
}
["meta":"OpenAI\ValueObjects\Transporter\Response":private]=>
object(OpenAI\Responses\Meta\MetaInformation)#331 (4) {
["requestId"]=>
string(32) "22736336820a8a74cf0b5c3e91319a42"
["openai"]=>
object(OpenAI\Responses\Meta\MetaInformationOpenAI)#322 (4) {
["model"]=>
NULL
["organization"]=>
string(9) "my-organization"
["version"]=>
string(10) "2020-10-01"
["processingMs"]=>
int(5843)
}
["requestLimit"]=>
object(OpenAI\Responses\Meta\MetaInformationRateLimit)#334 (3) {
["limit"]=>
int(100)
["remaining"]=>
int(93)
["reset"]=>
string(11) "1h37m5.049s"
}
["tokenLimit"]=>
object(OpenAI\Responses\Meta\MetaInformationRateLimit)#323 (3) {
["limit"]=>
int(40000)
["remaining"]=>
int(39095)
["reset"]=>
string(6) "1.357s"
}
}
}```
from laravel.
Files to be modified :
- CreateResponse.php
- CreateResponseChoice.php
from laravel.
Related Issues (20)
- Can we customize `OPENAI_BASE_URL`, just like we defined `OPENAI_API_KEY`? HOT 1
- [Bug]: Meta information not included in CreateResponse HOT 1
- Use with custom Assistants? HOT 2
- streaming run HOT 1
- ERROR There are no commands defined in the "openai" namespace. HOT 2
- Assistant API not supported in facade
- Send images to the api with model gpt-4-vision-preview to analyze the image HOT 1
- Install command HOT 2
- Supply and Delivery
- Upgrade openai-php/client package to latest version HOT 2
- .
- Resource not found using Azure HOT 1
- Should support audio transcription at word level HOT 1
- Error when use Assistant with stream HOT 2
- Support change of endpoint url to support OctoAI HOT 3
- Can you change the fake chat response text when testing? HOT 1
- Add support for Assistant API V2 HOT 2
- [Improvements] Support for Batch API HOT 2
- Fine Tunes endpoint is deprecated HOT 1
- How can I use Theads with stream? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel.