Skip to content

Commit 898d2ce

Browse files
committed
refactor(ai-bundle): simplify semantic_ratio validation
- Use min/max constraints instead of custom validation callback - Remove redundant comments from meilisearch example - Clean up changelog entry
1 parent 686b6d7 commit 898d2ce

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

examples/rag/meilisearch.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
endpointUrl: env('MEILISEARCH_HOST'),
3434
apiKey: env('MEILISEARCH_API_KEY'),
3535
indexName: 'movies',
36-
// Optional: configure hybrid search ratio (0.0 = keyword, 1.0 = semantic)
37-
// semanticRatio: 0.5, // 50/50 hybrid search
3836
);
3937

4038
// create embeddings and documents

src/ai-bundle/CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ CHANGELOG
2121
- Platform credentials (API keys, endpoints)
2222
- Model configurations per agent
2323
- Vector store configurations
24-
- Meilisearch `semantic_ratio` option for configuring hybrid search balance
2524
* Add dependency injection integration:
2625
- Autoconfiguration for tools and processors
2726
- Service aliases for default agent and platform

src/ai-bundle/config/options.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,10 +528,8 @@
528528
->floatNode('semantic_ratio')
529529
->info('The ratio between semantic (vector) and full-text search (0.0 to 1.0). Default: 1.0 (100% semantic)')
530530
->defaultValue(1.0)
531-
->validate()
532-
->ifTrue(static fn ($v) => $v < 0.0 || $v > 1.0)
533-
->thenInvalid('The semantic ratio must be between 0.0 and 1.0.')
534-
->end()
531+
->min(0.0)
532+
->max(1.0)
535533
->end()
536534
->end()
537535
->end()

0 commit comments

Comments
 (0)