test(test_azure_astreaming_and_function_calling): fix test to handle caching

This commit is contained in:
Krrish Dholakia
2024-03-25 19:33:57 -07:00
parent 1c55f2ccc5
commit 4d85387b5a
+1 -1
View File
@@ -2096,7 +2096,7 @@ async def test_azure_astreaming_and_function_calling():
chunk.choices[0].delta.tool_calls[0].function.arguments, str
)
validate_first_streaming_function_calling_chunk(chunk=chunk)
elif idx == 1:
elif idx == 1 and chunk.choices[0].finish_reason is None:
validate_second_streaming_function_calling_chunk(chunk=chunk)
elif chunk.choices[0].finish_reason is not None: # last chunk
validate_final_streaming_function_calling_chunk(chunk=chunk)