You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the "logit_bias" parameter and any kind of json object, or even 'null' which from the doc is the accepted default.
The response is an error message stating that whatever we put as a value for "logit_bias" is not of type 'object' - 'logis_bias'
Code snippets
<?phprequire__DIR__.'/vendor/autoload.php';// remove this line if you use a PHP Framework.useOrhanerday\OpenAi\OpenAi;$open_ai_key=getenv('OPENAI_API_KEY');$open_ai=newOpenAi($open_ai_key);$complete=$open_ai->chat(['model'=>'gpt-3.5-turbo','messages'=>[["role"=>"system","content"=>"You are a helpful assistant."],["role"=>"user","content"=>"Who won the world series in 2020?"],["role"=>"assistant","content"=>"The Los Angeles Dodgers won the World Series in 2020."],["role"=>"user","content"=>"Where was it played?"],],'temperature'=>1.0,'max_tokens'=>4000,'frequency_penalty'=>0,'presence_penalty'=>0,'logit_bias'=>null// or { 3789: 10 } or anything of the sort]);var_dump($complete);
OS
Windows
PHP version
PHP 8.1
Library version
open-ai v4.7.1
The text was updated successfully, but these errors were encountered:
Describe the bug
Hi,
First of all thanks for your work on this.
I encounter a problem when i try to send an object with various tokenized words with their bias with the "logit_bias" parameter. (https://platform.openai.com/docs/api-reference/chat/create#chat/create-logit_bias)
To Reproduce
Code snippets
OS
Windows
PHP version
PHP 8.1
Library version
open-ai v4.7.1
The text was updated successfully, but these errors were encountered: