Skip to content

Commit

Permalink
chore: Use the config settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaraLeigh committed May 9, 2023
1 parent cec7a91 commit e6d45b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config/gpt-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
|
*/

'model' => env('GPT_MODEL', 'davinci-codex'),
'model' => env('GPT_MODEL', 'gpt-3.5-turbo'),

/*
|--------------------------------------------------------------------------
Expand All @@ -39,7 +39,7 @@

'gpt_settings' => [
'max_tokens' => env('GPT_MAX_TOKENS', 100),
'temperature' => env('GPT_TEMPERATURE', 0.7),
'temperature' => env('GPT_TEMPERATURE', 0.0),
'n' => env('GPT_N', 1),
'stop' => env('GPT_STOP', null),
],
Expand Down
4 changes: 2 additions & 2 deletions src/GptApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public function ask(string|array $questions): ?string
try {
$client = $this->client();
$response = $client->chat()->create([
'model' => 'gpt-3.5-turbo',
'temperature' => 0,
'model' => config('gpt-helper.model'),
'temperature' => config('gpt-helper.gpt_settings.temperature'),
'messages' => $questions
]);

Expand Down

0 comments on commit e6d45b4

Please sign in to comment.