Skip to content

Commit 805a6a9

Browse files
committed
minor #378 [Examples] Use function http_client() (OskarStark)
This PR was merged into the main branch. Discussion ---------- [Examples] Use function `http_client()` | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Docs? | no | Issues | -- | License | MIT Commits ------- 520022a [Examples] Use function `http_client()`
2 parents b3562e2 + 520022a commit 805a6a9

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

examples/rag/neo4j.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@
2424
use Symfony\AI\Store\Document\TextDocument;
2525
use Symfony\AI\Store\Document\Vectorizer;
2626
use Symfony\AI\Store\Indexer;
27-
use Symfony\Component\HttpClient\HttpClient;
2827
use Symfony\Component\Uid\Uuid;
2928

3029
require_once dirname(__DIR__).'/bootstrap.php';
3130

3231
// initialize the store
3332
$store = new Store(
34-
httpClient: HttpClient::create(),
33+
httpClient: http_client(),
3534
endpointUrl: env('NEO4J_HOST'),
3635
username: env('NEO4J_USERNAME'),
3736
password: env('NEO4J_PASSWORD'),

examples/rag/qdrant.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@
2424
use Symfony\AI\Store\Document\TextDocument;
2525
use Symfony\AI\Store\Document\Vectorizer;
2626
use Symfony\AI\Store\Indexer;
27-
use Symfony\Component\HttpClient\HttpClient;
2827
use Symfony\Component\Uid\Uuid;
2928

3029
require_once dirname(__DIR__).'/bootstrap.php';
3130

3231
// initialize the store
3332
$store = new Store(
34-
HttpClient::create(),
33+
http_client(),
3534
env('QDRANT_HOST'),
3635
env('QDRANT_SERVICE_API_KEY'),
3736
'movies',

examples/rag/surrealdb.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@
2424
use Symfony\AI\Store\Document\TextDocument;
2525
use Symfony\AI\Store\Document\Vectorizer;
2626
use Symfony\AI\Store\Indexer;
27-
use Symfony\Component\HttpClient\HttpClient;
2827
use Symfony\Component\Uid\Uuid;
2928

3029
require_once dirname(__DIR__).'/bootstrap.php';
3130

3231
// initialize the store
3332
$store = new Store(
34-
httpClient: HttpClient::create(),
33+
httpClient: http_client(),
3534
endpointUrl: env('SURREALDB_HOST'),
3635
user: env('SURREALDB_USER'),
3736
password: env('SURREALDB_PASS'),

0 commit comments

Comments
 (0)