Skip to content

Commit ddf56da

Browse files
committed
minor #659 Set model only once (OskarStark)
This PR was merged into the main branch. Discussion ---------- Set model only once | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Docs? | no | Issues | -- | License | MIT No need to set and then overwrite the model IMHO Commits ------- cd114fb Set model only once
2 parents 7c27199 + cd114fb commit ddf56da

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

examples/perplexity/token-metadata.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@
1919
require_once dirname(__DIR__).'/bootstrap.php';
2020

2121
$platform = PlatformFactory::create(env('PERPLEXITY_API_KEY'), http_client());
22-
$model = new Perplexity(Perplexity::SONAR);
22+
$model = new Perplexity(Perplexity::SONAR_DEEP_RESEARCH);
2323
$agent = new Agent($platform, $model, outputProcessors: [new TokenOutputProcessor()], logger: logger());
2424

2525
$messages = new MessageBag(
2626
Message::forSystem('You are a pirate and you write funny.'),
2727
Message::ofUser('What is the Symfony framework?'),
2828
);
2929
$result = $agent->call($messages, [
30-
'model' => Perplexity::SONAR_DEEP_RESEARCH,
3130
'max_tokens' => 500, // specific options just for this call
3231
]);
3332

0 commit comments

Comments
 (0)