mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
fix(vector_stores): use PEP 604 union syntax to satisfy UP045 strict gate
This commit is contained in:
parent
00a478fb4d
commit
96be6a5262
1 changed files with 3 additions and 3 deletions
|
|
@ -25,7 +25,7 @@ else:
|
|||
|
||||
|
||||
class VectorStoreIndexRegistry:
|
||||
def __init__(self, vector_store_indexes: Optional[List[LiteLLM_ManagedVectorStoreIndex]] = None):
|
||||
def __init__(self, vector_store_indexes: List[LiteLLM_ManagedVectorStoreIndex] | None = None):
|
||||
self.vector_store_indexes: List[LiteLLM_ManagedVectorStoreIndex] = list(vector_store_indexes or ())
|
||||
|
||||
def get_vector_store_indexes(self) -> List[LiteLLM_ManagedVectorStoreIndex]:
|
||||
|
|
@ -96,7 +96,7 @@ class VectorStoreIndexRegistry:
|
|||
|
||||
|
||||
class VectorStoreRegistry:
|
||||
def __init__(self, vector_stores: Optional[List[LiteLLM_ManagedVectorStore]] = None):
|
||||
def __init__(self, vector_stores: List[LiteLLM_ManagedVectorStore] | None = None):
|
||||
self.vector_stores: List[LiteLLM_ManagedVectorStore] = list(vector_stores or ())
|
||||
self.vector_store_ids_to_vector_store_map: Dict[str, LiteLLM_ManagedVectorStore] = {}
|
||||
|
||||
|
|
@ -378,7 +378,7 @@ class VectorStoreRegistry:
|
|||
return vector_stores_to_run
|
||||
|
||||
def _get_vector_store_ids_from_tool_calls(
|
||||
self, tools: Optional[List[Dict]] = None, vector_store_ids: Optional[List[str]] = None
|
||||
self, tools: List[Dict] | None = None, vector_store_ids: List[str] | None = None
|
||||
) -> List[str]:
|
||||
"""
|
||||
Returns the vector store ids from the tool calls
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue