Comments (4)
Did you ever figure this out?
yes the code is as follows
$chat = OpenAI::chat()->create([
'model' => 'gpt-4o',
'messages' => [...],
'temperature' => $temperature,
'response_format' => ['type' => 'json_object'],
]);
from laravel.
Yes it does. If you have any trouble using it, just let us know.
from laravel.
Hi, how do you actually add this property? Is it on the messages side, i.e.
$messages = [[
'role' => 'system',
'content' => $content,
'response_format' => [
'type' => 'json_object'
]
]];
or on the client side? i.e.
$response = OpenAI::chat()->create([
'model' => 'gpt-3.5-turbo',
'messages' => $messages,
'temperature' => 0,
'response_format' => [
'type' => 'json_object'
]
]);
from laravel.
Did you ever figure this out?
from laravel.
Related Issues (20)
- OpenAI \ Exceptions \ UnserializableResponse Syntax error HOT 1
- Readme is ahead current version
- change Endpoint to Azure 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.