File tree 5 files changed +10
-28
lines changed
5 files changed +10
-28
lines changed Original file line number Diff line number Diff line change @@ -791,3 +791,12 @@ get_all_batches_1: |-
791
791
$client->getBatches();
792
792
get_batch_1 : |-
793
793
$client->getBatch(BATCH_UID);
794
+ update_embedders_1 : |-
795
+ $client->updateEmbedders([
796
+ 'default' => [
797
+ 'source' => 'openAi',
798
+ 'apiKey' => 'OPEN_AI_API_KEY',
799
+ 'model' => 'text-embedding-3-small',
800
+ 'documentTemplate' => 'A document titled '{{doc.title}}' whose description starts with {{doc.overview|truncatewords: 20}}'
801
+ ]
802
+ ]);
Original file line number Diff line number Diff line change @@ -680,8 +680,6 @@ public function testGetDocumentsWithoutFilterCorrectFieldsFormat(): void
680
680
681
681
public function testGetDocumentsWithVector (): void
682
682
{
683
- $ http = new Client ($ this ->host , getenv ('MEILISEARCH_API_KEY ' ));
684
- $ http ->patch ('/experimental-features ' , ['vectorStore ' => true ]);
685
683
$ index = $ this ->createEmptyIndex ($ this ->safeIndexName ('movies ' ));
686
684
687
685
$ promise = $ index ->updateEmbedders (['manual ' => ['source ' => 'userProvided ' , 'dimensions ' => 3 ]]);
Original file line number Diff line number Diff line change @@ -707,8 +707,6 @@ public function testBasicSearchWithFacetsOptionAndMultipleFacets(): void
707
707
708
708
public function testVectorSearch (): void
709
709
{
710
- $ http = new Client ($ this ->host , getenv ('MEILISEARCH_API_KEY ' ));
711
- $ http ->patch ('/experimental-features ' , ['vectorStore ' => true ]);
712
710
$ index = $ this ->createEmptyIndex ($ this ->safeIndexName ());
713
711
714
712
$ promise = $ index ->updateEmbedders (['manual ' => ['source ' => 'userProvided ' , 'dimensions ' => 3 ]]);
Original file line number Diff line number Diff line change 5
5
namespace Tests \Settings ;
6
6
7
7
use Meilisearch \Endpoints \Indexes ;
8
- use Meilisearch \Http \Client ;
9
8
use Tests \TestCase ;
10
9
11
10
final class EmbeddersTest extends TestCase
12
11
{
13
12
private Indexes $ index ;
14
13
15
- private const DEFAULT_EMBEDDER = null ;
14
+ private const DEFAULT_EMBEDDER = [] ;
16
15
17
16
protected function setUp (): void
18
17
{
19
18
parent ::setUp ();
20
- $ http = new Client ($ this ->host , getenv ('MEILISEARCH_API_KEY ' ));
21
- $ http ->patch ('/experimental-features ' , ['vectorStore ' => true ]);
22
19
$ this ->index = $ this ->createEmptyIndex ($ this ->safeIndexName ());
23
20
}
24
21
Original file line number Diff line number Diff line change @@ -196,24 +196,4 @@ public function testResetSettings(): void
196
196
self ::assertSame (self ::DEFAULT_FACET_SEARCH , $ settings ['facetSearch ' ]);
197
197
self ::assertSame (self ::DEFAULT_PREFIX_SEARCH , $ settings ['prefixSearch ' ]);
198
198
}
199
-
200
- // Here the test to prevent https://github.com/meilisearch/meilisearch-php/issues/204.
201
- // Rollback this comment after meilisearch v1.6.0 final release.
202
- // Related to: https://github.com/meilisearch/meilisearch/issues/4323
203
- //
204
- // public function testGetThenUpdateSettings(): void
205
- // {
206
- // $http = new \Meilisearch\Http\Client($this->host, getenv('MEILISEARCH_API_KEY'));
207
- // $http->patch('/experimental-features', ['vectorStore' => false]);
208
- // $index = $this->createEmptyIndex($this->safeIndexName());
209
-
210
- // $resetPromise = $index->resetSettings();
211
- // $this->assertIsValidPromise($resetPromise);
212
- // $index->waitForTask($resetPromise['taskUid']);
213
-
214
- // $settings = $index->getSettings();
215
- // $promise = $index->updateSettings($settings);
216
- // $this->assertIsValidPromise($promise);
217
- // $index->waitForTask($promise['taskUid']);
218
- // }
219
199
}
You can’t perform that action at this time.
0 commit comments