Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Add GPT 4.5 #232

Merged
merged 2 commits into from
Mar 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Bridge/OpenAI/GPT.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ final class GPT implements LanguageModel
public const O1_PREVIEW = 'o1-preview';
public const O3_MINI = 'o3-mini';
public const O3_MINI_HIGH = 'o3-mini-high';
public const GPT_45_PREVIEW = 'gpt-4.5-preview';

/**
* @param array<mixed> $options The default options for the model usage
Expand All @@ -35,11 +36,11 @@ public function __construct(
}

if (false === $this->supportsImageInput) {
$this->supportsImageInput = in_array($this->version, [self::GPT_4_TURBO, self::GPT_4O, self::GPT_4O_MINI, self::O1_MINI, self::O1_PREVIEW, self::O3_MINI], true);
$this->supportsImageInput = in_array($this->version, [self::GPT_4_TURBO, self::GPT_4O, self::GPT_4O_MINI, self::O1_MINI, self::O1_PREVIEW, self::O3_MINI, self::GPT_45_PREVIEW], true);
}

if (false === $this->supportsStructuredOutput) {
$this->supportsStructuredOutput = in_array($this->version, [self::GPT_4O, self::GPT_4O_MINI, self::O3_MINI], true);
$this->supportsStructuredOutput = in_array($this->version, [self::GPT_4O, self::GPT_4O_MINI, self::O3_MINI, self::GPT_45_PREVIEW], true);
}
}

Expand Down