Vectorizer runtime config
Adds the possibility of typed input for runtime module configuration of api-keys, rate limits and other things that can be affected by headers at the request time.
Currently only adds this for OpenAI, Cohere and VoyageAI as these two are already supported by the batch vectorization and need the rate-limit input.
Also adds some tuning of the dynamic batching for low-rate-limit api keys
Syntax:
collection = client.collections.create(
name="Test",
properties=[
wvc.config.Property(name="url", data_type=wvc.config.DataType.TEXT),
wvc.config.Property(name="title", data_type=wvc.config.DataType.TEXT),
wvc.config.Property(name="raw", data_type=wvc.config.DataType.TEXT),
wvc.config.Property(name="sha", data_type=wvc.config.DataType.TEXT),
],
vectorizer_config=[
wvc.config.Configure.NamedVectors.text2vec_cohere(name="cohereFirst"),
wvc.config.Configure.NamedVectors.text2vec_cohere(name="cohereSecond"),
]
)
integrations=[
wvc.init.Integrations.cohere(
api_key="KEY"
),
wvc.init.Integrations.openai(
api_key="KEY", base_url ="...."
),
wvc.init.Integrations.voyageai(
api_key="KEY",
),
]
client.integrations.configure(integrations)
Codecov Report
Attention: Patch coverage is 75.11962% with 52 lines in your changes are missing coverage. Please review.
Project coverage is 94.63%. Comparing base (
d604db8) to head (577a2c9). Report is 227 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #981 +/- ##
==========================================
- Coverage 95.23% 94.63% -0.61%
==========================================
Files 173 181 +8
Lines 17836 18641 +805
==========================================
+ Hits 16986 17640 +654
- Misses 850 1001 +151
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.