Skip to content

Commit

Permalink
Adds models enum
Browse files Browse the repository at this point in the history
  • Loading branch information
butschster committed Aug 27, 2024
1 parent 2b398c1 commit 85ddb5a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LLM.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

final class LLM implements LLMInterface
{
protected array $defaultOptions = [
private array $defaultOptions = [
Option::Temperature->value => 0.8,
Option::MaxTokens->value => 120,
Option::TopP->value => null,
Expand All @@ -27,7 +27,7 @@ final class LLM implements LLMInterface
Option::FunctionCall->value => null,
Option::Functions->value => null,
Option::User->value => null,
Option::Model->value => 'gpt-4o-mini',
Option::Model->value => OpenAIModel::Gpt4oMini->value,
];

public function __construct(
Expand Down
26 changes: 26 additions & 0 deletions src/OpenAIModel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

declare(strict_types=1);

namespace LLM\Agents\OpenAI\Client;

enum OpenAIModel: string
{
case Gpt4o = 'gpt-4o';
case Gpt4oLatest = 'chatgpt-4o-latest';
case Gpt4o20240513 = 'gpt-4o-2024-05-13';
case Gpt4o20240806 = 'gpt-4o-2024-08-06';

case Gpt4oMini = 'gpt-4o-mini';
case Gpt4oMini20240718 = 'gpt-4o-mini-2024-07-18';

case Gpt4Turbo = 'gpt-4-turbo';
case Gpt4TurboPreview = 'gpt-4-turbo-preview';

case Gpt4 = 'gpt-4';
case Gpt40613 = 'gpt-4-0613';

case Gpt3Turbo = 'gpt-3.5-turbo';
case Gpt3Turbo1106 = 'gpt-3.5-turbo-1106';
case Gpt3TurboInstruct = 'gpt-3.5-turbo-instruct';
}

0 comments on commit 85ddb5a

Please sign in to comment.