mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-13 23:11:40 +00:00
Update litellm/llms/voyage/embedding/transformation_contextual.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
101bba0241
commit
be6487d33c
1 changed files with 2 additions and 0 deletions
|
|
@ -148,6 +148,8 @@ class VoyageContextualEmbeddingConfig(BaseEmbeddingConfig):
|
|||
"""
|
||||
# Single string -> a one-element flat list, auto-chunked.
|
||||
if isinstance(input, str):
|
||||
if optional_params.get("input_type") == "query":
|
||||
return [input], {}
|
||||
return [input], cls._auto_chunk_params(optional_params)
|
||||
|
||||
# Flat list[str].
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue