Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion any_llm_client/clients/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ async def _iter_response_chunks(self, response: httpx.Response) -> typing.AsyncI
validated_response = ChatCompletionsStreamingEvent.model_validate_json(event.data)
except pydantic.ValidationError as validation_error:
raise LLMResponseValidationError(
response_content=response.content, original_error=validation_error
response_content=event.data.encode(), original_error=validation_error
) from validation_error

if not (
Expand Down
2 changes: 1 addition & 1 deletion any_llm_client/clients/yandexgpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ async def _iter_response_chunks(self, response: httpx.Response) -> typing.AsyncI
validated_response = YandexGPTResponse.model_validate_json(one_line)
except pydantic.ValidationError as validation_error:
raise LLMResponseValidationError(
response_content=response.content, original_error=validation_error
response_content=one_line.encode(), original_error=validation_error
) from validation_error

response_text = validated_response.result.alternatives[0].message.text
Expand Down