Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 1 addition & 3 deletions examples/misc/parallel-chat-gpt.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
require_once dirname(__DIR__).'/bootstrap.php';

$platform = PlatformFactory::create(env('OPENAI_API_KEY'), http_client());
$model = new Gpt(Gpt::GPT_4O_MINI, [
'temperature' => 0.5, // default options for the model
]);
$model = new Gpt(Gpt::GPT_4O_MINI);

$messages = new MessageBag(
Message::forSystem('You will be given a letter and you answer with only the next letter of the alphabet.'),
Expand Down
4 changes: 1 addition & 3 deletions examples/openai/chat.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
require_once dirname(__DIR__).'/bootstrap.php';

$platform = PlatformFactory::create(env('OPENAI_API_KEY'), http_client());
$model = new Gpt(Gpt::GPT_4O_MINI, [
'temperature' => 0.5, // default options for the model
]);
$model = new Gpt(Gpt::GPT_4O_MINI);

$agent = new Agent($platform, $model, logger: logger());
$messages = new MessageBag(
Expand Down
4 changes: 1 addition & 3 deletions examples/openai/token-metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
require_once dirname(__DIR__).'/bootstrap.php';

$platform = PlatformFactory::create(env('OPENAI_API_KEY'), http_client());
$model = new Gpt(Gpt::GPT_4O_MINI, [
'temperature' => 0.5, // default options for the model
]);
$model = new Gpt(Gpt::GPT_4O_MINI);

$agent = new Agent($platform, $model, outputProcessors: [new TokenOutputProcessor()], logger: logger());
$messages = new MessageBag(
Expand Down
2 changes: 1 addition & 1 deletion src/platform/src/Bridge/Anthropic/Claude.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Claude extends Model
*/
public function __construct(
string $name = self::SONNET_37,
array $options = ['temperature' => 1.0, 'max_tokens' => 1000],
array $options = ['max_tokens' => 1000],
) {
$capabilities = [
Capability::INPUT_MESSAGES,
Expand Down
2 changes: 1 addition & 1 deletion src/platform/src/Bridge/Bedrock/Nova/Nova.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ final class Nova extends Model
*/
public function __construct(
string $name = self::PRO,
array $options = ['temperature' => 1.0, 'max_tokens' => 1000],
array $options = ['max_tokens' => 1000],
) {
$capabilities = [
Capability::INPUT_MESSAGES,
Expand Down
2 changes: 1 addition & 1 deletion src/platform/src/Bridge/Gemini/Gemini.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Gemini extends Model
/**
* @param array<string, mixed> $options The default options for the model usage
*/
public function __construct(string $name = self::GEMINI_2_PRO, array $options = ['temperature' => 1.0])
public function __construct(string $name = self::GEMINI_2_PRO, array $options = [])
{
$capabilities = [
Capability::INPUT_MESSAGES,
Expand Down
2 changes: 1 addition & 1 deletion src/platform/src/Bridge/LmStudio/Completions.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Completions extends Model

public function __construct(
string $name,
array $options = ['temperature' => 0.7],
array $options = [],
array $capabilities = self::DEFAULT_CAPABILITIES,
) {
parent::__construct($name, $capabilities, $options);
Expand Down
2 changes: 1 addition & 1 deletion src/platform/src/Bridge/OpenAi/Gpt.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class Gpt extends Model
*/
public function __construct(
string $name = self::GPT_4O,
array $options = ['temperature' => 1.0],
array $options = [],
) {
$capabilities = [
Capability::INPUT_MESSAGES,
Expand Down
2 changes: 1 addition & 1 deletion src/platform/tests/Bridge/OpenAi/GptTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function testItCreatesGptWithDefaultSettings()
$gpt = new Gpt();

$this->assertSame(Gpt::GPT_4O, $gpt->getName());
$this->assertSame(['temperature' => 1.0], $gpt->getOptions());
$this->assertSame([], $gpt->getOptions());
}

public function testItCreatesGptWithCustomSettings()
Expand Down
Loading