Skip to content

Commit 8540f2d

Browse files
ishaan-jaffS1LV3RJ1NX
authored andcommitted
fix typo (#10535)
1 parent 61639d4 commit 8540f2d

File tree

5 files changed

+26
-12
lines changed

5 files changed

+26
-12
lines changed

docs/my-website/docs/proxy/logging_spec.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,20 @@ Inherits from `StandardLoggingUserAPIKeyMetadata` and adds:
5959
| `spend_logs_metadata` | `Optional[dict]` | Key-value pairs for spend logging |
6060
| `requester_ip_address` | `Optional[str]` | Requester's IP address |
6161
| `requester_metadata` | `Optional[dict]` | Additional requester metadata |
62+
| `vector_store_request_metadata` | `Optional[List[StandardLoggingVectorStoreRequest]]` | Vector store request metadata |
63+
64+
65+
## StandardLoggingVectorStoreRequest
66+
67+
| Field | Type | Description |
68+
|-------|------|-------------|
69+
| vector_store_id | Optional[str] | ID of the vector store |
70+
| custom_llm_provider | Optional[str] | Custom LLM provider the vector store is associated with (e.g., bedrock, openai, anthropic) |
71+
| query | Optional[str] | Query to the vector store |
72+
| vector_store_search_response | Optional[VectorStoreSearchResponse] | OpenAI format vector store search response |
73+
| start_time | Optional[float] | Start time of the vector store request |
74+
| end_time | Optional[float] | End time of the vector store request |
75+
6276

6377
## StandardLoggingAdditionalHeaders
6478

litellm/integrations/vector_stores/bedrock_vector_store.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
from litellm.types.utils import StandardLoggingVectorStoreRequest
3232
from litellm.types.vector_stores import (
3333
VectorStoreResultContent,
34+
VectorStoreSearchResponse,
3435
VectorStoreSearchResult,
35-
VectorStorSearchResponse,
3636
)
3737
from litellm.utils import load_credentials_from_list
3838

@@ -110,7 +110,7 @@ async def async_get_chat_completion_prompt(
110110
#################################################################################################
111111
########## LOGGING for Standard Logging Payload, Langfuse, s3, LiteLLM DB etc. ##################
112112
#################################################################################################
113-
vector_store_search_response: VectorStorSearchResponse = (
113+
vector_store_search_response: VectorStoreSearchResponse = (
114114
self.transform_bedrock_kb_response_to_vector_store_search_response(
115115
bedrock_kb_response=bedrock_kb_response, query=query
116116
)
@@ -136,15 +136,15 @@ def transform_bedrock_kb_response_to_vector_store_search_response(
136136
self,
137137
bedrock_kb_response: BedrockKBResponse,
138138
query: str,
139-
) -> VectorStorSearchResponse:
139+
) -> VectorStoreSearchResponse:
140140
"""
141-
Transform a BedrockKBResponse to a VectorStorSearchResponse
141+
Transform a BedrockKBResponse to a VectorStoreSearchResponse
142142
"""
143143
retrieval_results: Optional[List[BedrockKBRetrievalResult]] = (
144144
bedrock_kb_response.get("retrievalResults", None)
145145
)
146-
vector_store_search_response: VectorStorSearchResponse = (
147-
VectorStorSearchResponse(search_query=query, data=[])
146+
vector_store_search_response: VectorStoreSearchResponse = (
147+
VectorStoreSearchResponse(search_query=query, data=[])
148148
)
149149
if retrieval_results is None:
150150
return vector_store_search_response

litellm/types/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
from .rerank import RerankResponse
5353

5454
if TYPE_CHECKING:
55-
from .vector_stores import VectorStorSearchResponse
55+
from .vector_stores import VectorStoreSearchResponse
5656
else:
57-
VectorStorSearchResponse = Any
57+
VectorStoreSearchResponse = Any
5858

5959

6060
def _generate_id(): # private helper function
@@ -1740,7 +1740,7 @@ class StandardLoggingVectorStoreRequest(TypedDict, total=False):
17401740
Query to the vector store
17411741
"""
17421742

1743-
vector_store_search_response: Optional[VectorStorSearchResponse]
1743+
vector_store_search_response: Optional[VectorStoreSearchResponse]
17441744
"""
17451745
OpenAI format vector store search response
17461746
"""

litellm/types/vector_stores.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class VectorStoreSearchResult(TypedDict, total=False):
7777
content: Optional[List[VectorStoreResultContent]]
7878

7979

80-
class VectorStorSearchResponse(TypedDict, total=False):
80+
class VectorStoreSearchResponse(TypedDict, total=False):
8181
"""Response after searching a vector store"""
8282

8383
object: Literal[

tests/logging_callback_tests/test_bedrock_knowledgebase_hook.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from litellm.llms.custom_httpx.http_handler import HTTPHandler, AsyncHTTPHandler
2424
from litellm.integrations.custom_logger import CustomLogger
2525
from litellm.types.utils import StandardLoggingPayload, StandardLoggingVectorStoreRequest
26-
from litellm.types.vector_stores import VectorStorSearchResponse
26+
from litellm.types.vector_stores import VectorStoreSearchResponse
2727

2828
class TestCustomLogger(CustomLogger):
2929
def __init__(self):
@@ -262,7 +262,7 @@ async def test_logging_with_knowledge_base_hook(setup_vector_store_registry):
262262
assert vector_store_request_metadata.get("custom_llm_provider") == "bedrock"
263263

264264

265-
vector_store_search_response: VectorStorSearchResponse = vector_store_request_metadata.get("vector_store_search_response")
265+
vector_store_search_response: VectorStoreSearchResponse = vector_store_request_metadata.get("vector_store_search_response")
266266
assert vector_store_search_response is not None
267267
assert vector_store_search_response.get("search_query") == "what is litellm?"
268268
assert len(vector_store_search_response.get("data", [])) >=0

0 commit comments

Comments
 (0)