Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Better config #25

Closed
wants to merge 1 commit into from
Closed

Better config #25

wants to merge 1 commit into from

Conversation

OskarStark
Copy link
Contributor

@OskarStark OskarStark commented Sep 26, 2024

@OskarStark OskarStark self-assigned this Sep 26, 2024
Comment on lines +60 to +77
->scalarNode('engine')->defaultValue('azure-search')->end()
->scalarNode('api_key')->isRequired()->end()
->scalarNode('endpoint')->isRequired()->end()
->scalarNode('index_name')->isRequired()->end()
->scalarNode('api_version')->defaultValue('2024-07-01')->end()
->scalarNode('vector_field_name')->defaultValue('vector')->end()
->end()
->end()
// ->arrayNode('mongodb')
// ->children()
// ->scalarNode('engine')->defaultValue('mongodb')->end()
// ->scalarNode('uri')->isRequired()->end()
// ->scalarNode('database_name')->isRequired()->end()
// ->scalarNode('collection_name')->isRequired()->end()
// ->scalarNode('index_name')->end()
// ->scalarNode('vector_field_name')->defaultValue('vector')->end()
// ->booleanNode('bulk_write')->defaultFalse()->end()
// ->end()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is much more maintainable to me

->children()
->arrayNode('chroma_db')
->children()
->scalarNode('engine')->defaultValue('chroma-db')->end()
Copy link
Member

Choose a reason for hiding this comment

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

we could drop the engine key now, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so, yes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or the best with config component 😄 feel free to test my PR or finish it 😊

@OskarStark
Copy link
Contributor Author

This will not work, after this change I am not able to have:

    stores:
        chroma_db_products:
            engine: 'chroma-db'
            collection_name: '%env(CHROMA_COLLECTION_PRODUCTS)%'
        chroma_db_foo:
            engine: 'chroma-db'
            collection_name: '%env(CHROMA_COLLECTION_FOO)%'

@OskarStark OskarStark closed this Sep 26, 2024
@OskarStark OskarStark deleted the feature/better-config branch September 26, 2024 20:21
@chr-hertel
Copy link
Member

true ...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants