Comments (2)
Possibly connected to #336
from client.
Doing some more digging and it looks like this specific model is not returning the "usage"
Response from the gpt-4-vision-preview model with an image
OpenAI\ValueObjects\Transporter\Response Object ( [data:OpenAI\ValueObjects\Transporter\Response:private] => Array ( [choices] => Array ( [0] => Array ( [content_filter_results] => Array ( [hate] => Array ( [filtered] => [severity] => safe ) [self_harm] => Array ( [filtered] => [severity] => safe ) [sexual] => Array ( [filtered] => [severity] => safe ) [violence] => Array ( [filtered] => [severity] => safe ) ) [finish_reason] => stop [index] => 0 [message] => Array ( [content] => The photograph showcases a black and white scene with two individuals positioned side by side in contrasting postures. The person on the left appears to be palm-outward in a gesture of stopping or "no entry," and wearing a short-sleeved, casual top. The individual on the right is extending their hand, palm-up towards the camera in a gesture that might suggest offering, asking, or reaching out. The background of the image is out of focus, but a window or a light source is noticeable behind the two individuals. After analyzing the image, there appear to be no identifiable food items present. The photograph is solely focused on capturing the gestures and expressions of the individuals with no visible consumables or other specific objects. [role] => assistant ) ) ) [created] => 0 [id] => [model] => [object] => chat.completion [prompt_filter_results] => Array ( [0] => Array ( [prompt_index] => 0 [content_filter_results] => Array ( [hate] => Array ( [filtered] => [severity] => safe ) [self_harm] => Array ( [filtered] => [severity] => safe ) [sexual] => Array ( [filtered] => [severity] => safe ) [violence] => Array ( [filtered] => [severity] => safe ) ) ) ) ) [meta:OpenAI\ValueObjects\Transporter\Response:private] => OpenAI\Responses\Meta\MetaInformation Object ( [requestId] => 218dc1a4-03ff-45ef-a191-69efe45fbde2 [openai] => OpenAI\Responses\Meta\MetaInformationOpenAI Object ( [model] => [organization] => [version] => [processingMs] => ) [requestLimit] => OpenAI\Responses\Meta\MetaInformationRateLimit Object ( [limit] => [remaining] => 28 [reset] => ) [tokenLimit] => OpenAI\Responses\Meta\MetaInformationRateLimit Object ( [limit] => [remaining] => 25314 [reset] => ) ) )
Response from the gpt-4-vision-preview model with text
OpenAI\ValueObjects\Transporter\Response Object ( [data:OpenAI\ValueObjects\Transporter\Response:private] => Array ( [choices] => Array ( [0] => Array ( [content_filter_results] => Array ( [hate] => Array ( [filtered] => [severity] => safe ) [self_harm] => Array ( [filtered] => [severity] => safe ) [sexual] => Array ( [filtered] => [severity] => safe ) [violence] => Array ( [filtered] => [severity] => safe ) ) [finish_reason] => stop [index] => 0 [message] => Array ( [content] => "Darwin's Origin of Species" is a groundbreaking work where Charles Darwin introduces the theory of natural selection. He argues that species evolve over time through a process of inherited variations that enhance an organism's ability to survive and reproduce. Darwin's observations from his voyage on the HMS Beagle, particularly in the Galápagos Islands, support his conclusion that the diversity of life is a result of modifications over generations. The book challenges traditional views by suggesting common descent among all organisms and outlining the evolutionary process that has shaped the natural world, laying the foundation for modern evolutionary biology. [role] => assistant ) ) ) [created] => 0 [id] => [model] => [object] => chat.completion [prompt_filter_results] => Array ( [0] => Array ( [prompt_index] => 0 [content_filter_results] => Array ( [hate] => Array ( [filtered] => [severity] => safe ) [self_harm] => Array ( [filtered] => [severity] => safe ) [sexual] => Array ( [filtered] => [severity] => safe ) [violence] => Array ( [filtered] => [severity] => safe ) ) ) ) ) [meta:OpenAI\ValueObjects\Transporter\Response:private] => OpenAI\Responses\Meta\MetaInformation Object ( [requestId] => 07bbc9e7-2658-44af-b0e2-7ab1666ab756 [openai] => OpenAI\Responses\Meta\MetaInformationOpenAI Object ( [model] => [organization] => [version] => [processingMs] => ) [requestLimit] => OpenAI\Responses\Meta\MetaInformationRateLimit Object ( [limit] => [remaining] => 29 [reset] => ) [tokenLimit] => OpenAI\Responses\Meta\MetaInformationRateLimit Object ( [limit] => [remaining] => 28772 [reset] => ) ) )
Response from GPT-4 model text
OpenAI\ValueObjects\Transporter\Response Object ( [data:OpenAI\ValueObjects\Transporter\Response:private] => Array ( [id] => chatcmpl-8sBDBfLcGMOe2UwpUQuMHMKfYgrNI [object] => chat.completion [created] => 1707923501 [model] => gpt-4 [prompt_filter_results] => Array ( [0] => Array ( [prompt_index] => 0 [content_filter_results] => Array ( [hate] => Array ( [filtered] => [severity] => safe ) [self_harm] => Array ( [filtered] => [severity] => safe ) [sexual] => Array ( [filtered] => [severity] => safe ) [violence] => Array ( [filtered] => [severity] => safe ) ) ) ) [choices] => Array ( [0] => Array ( [finish_reason] => stop [index] => 0 [message] => Array ( [role] => assistant [content] => "Origin of Species" by Charles Darwin is a revolutionary work that discusses the theory of evolution: life's diversity is a result of gradual changes over many generations. Darwin's observations from the Galapagos Islands led to his groundbreaking notion of natural selection, stating individuals in a species show wide range of variation, and those with characteristics best adapted to their environment have higher survival chances. This book revolutionized the scientific understanding of life's development, refuting the belief that species were unchanging, and instead suggesting a branching pattern of evolution, undergirded by common ancestry. ) [content_filter_results] => Array ( [hate] => Array ( [filtered] => [severity] => safe ) [self_harm] => Array ( [filtered] => [severity] => safe ) [sexual] => Array ( [filtered] => [severity] => safe ) [violence] => Array ( [filtered] => [severity] => safe ) ) ) ) [usage] => Array ( [prompt_tokens] => 34 [completion_tokens] => 114 [total_tokens] => 148 ) ) [meta:OpenAI\ValueObjects\Transporter\Response:private] => OpenAI\Responses\Meta\MetaInformation Object ( [requestId] => f1b6bdec-746d-44ad-a92f-49278bf1456c [openai] => OpenAI\Responses\Meta\MetaInformationOpenAI Object ( [model] => [organization] => [version] => [processingMs] => ) [requestLimit] => OpenAI\Responses\Meta\MetaInformationRateLimit Object ( [limit] => [remaining] => 39 [reset] => ) [tokenLimit] => OpenAI\Responses\Meta\MetaInformationRateLimit Object ( [limit] => [remaining] => 38800 [reset] => ) ) )
from client.
Related Issues (20)
- [Bug]: Validation error for Request calling createAndRun() HOT 1
- HBushIA
- [Bug]: Error handling for RetrieveJobResponse::from() HOT 1
- [Bug]: Undefined array key "code" $client->fineTuning()->listJobs() HOT 2
- [Bug]: Uncaught JsonException
- [Bug]: Cannot fake the response of "OpenAI\Responses\Images\CreateResponse" passed to OpenAI::fake to return data with "b64_json" HOT 1
- [Bug]: /vendor/openai-php/client/src/Transporters/HttpTransporter.php(61): json_decode()
- [Bug]: Wrong type RetrieveJobResponseError constructor
- [Support]: How to modify to adapt a locally-deployed OpenAI API compatible embedding service?
- [Bug]: GPT-3 Model Being Used Despite Specifying GPT-4 in Client Request HOT 1
- Azure Chat with Custom Data problem HOT 1
- [Bug]: ThreadRunResponse missing step_details information HOT 1
- [Bug]: getErrorCode(): Return value must be of type ?string, int returned HOT 1
- [Bug]: all runs result with failure code: "server_error", message: "Sorry, something went wrong." HOT 1
- 提问我该如何结束发起的http请求呢
- Constant HTTP 500 Server errors HOT 3
- [Enhancement] streaming support for assistant api HOT 7
- [Bug]: Images (Dall-e 3) method not working with Azure HOT 1
- How to set the frequency_penalty? HOT 1
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 client.