Skip to content

Conversation

@lyrixx
Copy link
Member

@lyrixx lyrixx commented Nov 26, 2025

Q A
Bug fix? no
New feature? yes
Docs? no
Issues Fix #911 ; fix #875
License MIT

Life is always easier without storing state in a service

@carsonbot carsonbot added Feature New feature Store Issues & PRs about the AI Store component Status: Needs Review labels Nov 26, 2025
@lyrixx lyrixx force-pushed the store-indexer-no-state branch from e11d79f to e2cdac7 Compare November 26, 2025 14:42
return (new PhpCsFixer\Config())
// @see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7777
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
->setUnsupportedPhpVersionAllowed(true)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using PHP8.5. This allow me to run php-cs-fixer.
Obviously, we must not use PHP8.5 features. The CI will catch us if we do :)

$platform = PlatformFactory::create(env('OPENAI_API_KEY'), http_client());
$vectorizer = new Vectorizer($platform, $embeddings = 'text-embedding-3-small');
$indexer = new Indexer(new InMemoryLoader($documents), $vectorizer, $store, logger: logger());
$indexer->index($documents);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$documents, are already set in the Loader. No need to repeat it here.

@lyrixx lyrixx force-pushed the store-indexer-no-state branch 2 times, most recently from 645485a to 2bf1345 Compare December 1, 2025 08:28
Life is always easier without storing state in a service
@lyrixx lyrixx force-pushed the store-indexer-no-state branch from 2bf1345 to e56e022 Compare December 1, 2025 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature New feature Status: Needs Review Store Issues & PRs about the AI Store component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Store] Indexer is nice, but hard to use directly

3 participants