-
-
Notifications
You must be signed in to change notification settings - Fork 124
[AiBundle] Use model FQCN for indexer config, to allow any Symfony\AI\Platform\Model child class
#88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AiBundle] Use model FQCN for indexer config, to allow any Symfony\AI\Platform\Model child class
#88
Conversation
c6d0eef to
77b48a2
Compare
|
Repost original comment from @chr-hertel (php-llm/llm-chain-bundle#99 (comment)):
|
|
Yes, let's do this to unblock the usage for now - we can work on a slimmer config as a next step. |
chr-hertel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's break it once for both parameters and also the agent config - same issue.
What do you think about?
classinstead ofnameorclassNamenameinstead ofversion(also rather deprecated)
and I guess the docs and demo need an update as well here
|
Conflicts after merging #94, but rebase should do the trick hopefully |
77b48a2 to
ed53f59
Compare
4fd409b to
10585c9
Compare
chr-hertel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two things open from my side:
- adopting the config of the model in
agentsection, so it is consistent:
ai/src/ai-bundle/config/options.php
Lines 73 to 74 in f7e72fa
| ->scalarNode('name')->isRequired()->end() | |
| ->scalarNode('version')->defaultNull()->end() |
- adopting the change in the demo's configuration, e.g.:
ai/demo/config/packages/ai.yaml
Lines 50 to 51 in f7e72fa
| name: 'Embeddings' | |
| version: 'text-embedding-ada-002' |
6b77e1d to
2ca048f
Compare
2ca048f to
66b6cbc
Compare
|
@chr-hertel comment addressed, I made the same changes on Agent configuration. |
chr-hertel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now - nice one! :)
|
Follow up ideas:
|
|
Thank you @welcoMattic. |
Before:
After
This way, any class extending
Symfony\AI\Platform\Modelcan be used as embedder model, even one written by users themselves.Embeddings model of providers (OpenAI, Mistral, Gemini, ...) can be named
Embeddingswith no issue.Replace php-llm/llm-chain-bundle#99