Skip to content

Commit 85ddb5a

Browse files
committed
Adds models enum
1 parent 2b398c1 commit 85ddb5a

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

Diff for: src/LLM.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
final class LLM implements LLMInterface
1818
{
19-
protected array $defaultOptions = [
19+
private array $defaultOptions = [
2020
Option::Temperature->value => 0.8,
2121
Option::MaxTokens->value => 120,
2222
Option::TopP->value => null,
@@ -27,7 +27,7 @@ final class LLM implements LLMInterface
2727
Option::FunctionCall->value => null,
2828
Option::Functions->value => null,
2929
Option::User->value => null,
30-
Option::Model->value => 'gpt-4o-mini',
30+
Option::Model->value => OpenAIModel::Gpt4oMini->value,
3131
];
3232

3333
public function __construct(

Diff for: src/OpenAIModel.php

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace LLM\Agents\OpenAI\Client;
6+
7+
enum OpenAIModel: string
8+
{
9+
case Gpt4o = 'gpt-4o';
10+
case Gpt4oLatest = 'chatgpt-4o-latest';
11+
case Gpt4o20240513 = 'gpt-4o-2024-05-13';
12+
case Gpt4o20240806 = 'gpt-4o-2024-08-06';
13+
14+
case Gpt4oMini = 'gpt-4o-mini';
15+
case Gpt4oMini20240718 = 'gpt-4o-mini-2024-07-18';
16+
17+
case Gpt4Turbo = 'gpt-4-turbo';
18+
case Gpt4TurboPreview = 'gpt-4-turbo-preview';
19+
20+
case Gpt4 = 'gpt-4';
21+
case Gpt40613 = 'gpt-4-0613';
22+
23+
case Gpt3Turbo = 'gpt-3.5-turbo';
24+
case Gpt3Turbo1106 = 'gpt-3.5-turbo-1106';
25+
case Gpt3TurboInstruct = 'gpt-3.5-turbo-instruct';
26+
}

0 commit comments

Comments
 (0)