Skip to content

Commit 498c256

Browse files
committed
minor #666 Import FQCNs in examples instead of using inline class names (OskarStark)
This PR was merged into the main branch. Discussion ---------- Import FQCNs in examples instead of using inline class names | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Docs? | no | Issues | -- | License | MIT Commits ------- 2c65b97 Import FQCNs in examples instead of using inline class names
2 parents b1e9d9e + 2c65b97 commit 498c256

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

examples/rag/chromadb.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12+
use Codewithkyrian\ChromaDB\Factory;
1213
use Symfony\AI\Agent\Agent;
1314
use Symfony\AI\Agent\Toolbox\AgentProcessor;
1415
use Symfony\AI\Agent\Toolbox\Tool\SimilaritySearch;
@@ -32,7 +33,7 @@
3233
// initialize the store
3334

3435
$store = new Store(
35-
(new Codewithkyrian\ChromaDB\Factory())
36+
(new Factory())
3637
->withHost(env('CHROMADB_HOST'))
3738
->withPort((int) env('CHROMADB_PORT'))
3839
->connect(),

examples/vertexai/token-metadata.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Symfony\AI\Agent\Agent;
1313
use Symfony\AI\Platform\Bridge\VertexAi\Gemini\Model;
1414
use Symfony\AI\Platform\Bridge\VertexAi\PlatformFactory;
15+
use Symfony\AI\Platform\Bridge\VertexAi\TokenOutputProcessor;
1516
use Symfony\AI\Platform\Message\Message;
1617
use Symfony\AI\Platform\Message\MessageBag;
1718

@@ -20,7 +21,7 @@
2021
$platform = PlatformFactory::create(env('GOOGLE_CLOUD_LOCATION'), env('GOOGLE_CLOUD_PROJECT'), adc_aware_http_client());
2122
$model = new Model(Model::GEMINI_2_0_FLASH_LITE);
2223

23-
$agent = new Agent($platform, $model, outputProcessors: [new Symfony\AI\Platform\Bridge\VertexAi\TokenOutputProcessor()], logger: logger());
24+
$agent = new Agent($platform, $model, outputProcessors: [new TokenOutputProcessor()], logger: logger());
2425
$messages = new MessageBag(
2526
Message::forSystem('You are an expert assistant in animal study.'),
2627
Message::ofUser('What does a cat usually eat?'),

0 commit comments

Comments
 (0)