mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
Fix pass through tests
This commit is contained in:
parent
34460655d7
commit
eb7a6040c1
2 changed files with 5 additions and 2 deletions
|
|
@ -159,7 +159,7 @@ class RealTimeStreaming:
|
|||
event_type
|
||||
== "conversation.item.input_audio_transcription.completed"
|
||||
):
|
||||
transcript = event_obj.get("transcript", "")
|
||||
transcript = cast(str, event_obj.get("transcript", ""))
|
||||
if transcript:
|
||||
self.input_messages.append(
|
||||
{"role": "user", "content": transcript}
|
||||
|
|
@ -174,7 +174,7 @@ class RealTimeStreaming:
|
|||
try:
|
||||
if event_obj.get("type") != "response.done":
|
||||
return
|
||||
response = event_obj.get("response", {})
|
||||
response = cast(Dict[str, Any], event_obj.get("response", {}))
|
||||
for item in response.get("output", []):
|
||||
if item.get("type") == "function_call":
|
||||
self.tool_calls.append(
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ class TestVertexAIPassThroughHandler:
|
|||
|
||||
# Mock request
|
||||
mock_request = Mock()
|
||||
mock_request.state = None # Prevent Mock from returning a truthy _cached_headers
|
||||
mock_request.method = "POST"
|
||||
mock_request.headers = {
|
||||
"Authorization": "Bearer test-creds",
|
||||
|
|
@ -323,6 +324,7 @@ class TestVertexAIPassThroughHandler:
|
|||
|
||||
# Mock request
|
||||
mock_request = Mock()
|
||||
mock_request.state = None # Prevent Mock from returning a truthy _cached_headers
|
||||
mock_request.method = "POST"
|
||||
mock_request.headers = {
|
||||
"Authorization": "Bearer test-creds",
|
||||
|
|
@ -905,6 +907,7 @@ class TestVertexAIDiscoveryPassThroughHandler:
|
|||
|
||||
# Mock request
|
||||
mock_request = Mock()
|
||||
mock_request.state = None # Prevent Mock from returning a truthy _cached_headers
|
||||
mock_request.method = "POST"
|
||||
mock_request.headers = {
|
||||
"Authorization": "Bearer test-key",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue