-
-
Notifications
You must be signed in to change notification settings - Fork 57
[Store] Add commands to setup/drop a store #335
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
base: main
Are you sure you want to change the base?
Conversation
41b5cd7
to
3f6ef49
Compare
1ef933d
to
30c5f2f
Compare
$stores = array_keys($builder->findTaggedServiceIds('ai.store')); | ||
if (1 === \count($stores)) { | ||
$builder->setAlias(StoreInterface::class, reset($stores)); |
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.
unexpected to see this being removed - was it intentional?
@@ -507,6 +517,7 @@ private function processStoreConfig(string $type, array $stores, ContainerBuilde | |||
->setArguments($arguments); | |||
|
|||
$container->setDefinition('ai.store.'.$type.'.'.$name, $definition); | |||
$container->registerAliasForArgument('ai.store.'.$name, StoreInterface::class, (new Target($name.'Store'))->getParsedName()); |
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.
ah okay, that was unexpected as well 😆
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.
Well, yes, I'm tired of using #[Autowire]
attribute when injection stores so, here's the solution 😄
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.
I can move this part to another PR if it's an issue here, that's not a big deal.
no no, that the right decision from my point of view 👍 |
Alright, let's talk about functional testing here - that's important to me with that amount of bridges we can't go with manual. My first idea was to bring in simple store examples, that would setup, add, query and drop. but that would be super similar to the rag ones - well without the agent tho. |
What about improving the rag examples by adding the Maybe just before returning the content to the user? Don't know if adding examples with commands brings any benefits to the user or we're talking about single-file commands that we can call in the existing examples 🤔 |
I would keep the examples, but what about using setup and store in CI to see if they are working? Could be a follow up PR imho |
Docs are missing |
30c5f2f
to
853094b
Compare
853094b
to
c1bcf91
Compare
Hi 👋🏻
As discussed in #330, here's the commands required to setup/drop the stores, by default, I moved the commands in the
Store
component but wasn't sure about it.