Skip to content

fix: fixed issue in confidential chat#30

Merged
jorgeantonio21 merged 1 commit into
AtomaAI:mainfrom
maschad:mc/fix/async-streams
Apr 1, 2025
Merged

fix: fixed issue in confidential chat#30
jorgeantonio21 merged 1 commit into
AtomaAI:mainfrom
maschad:mc/fix/async-streams

Conversation

@maschad
Copy link
Copy Markdown
Member

@maschad maschad commented Mar 31, 2025

@maschad maschad requested review from Cifko and jorgeantonio21 March 31, 2025 23:46
@maschad maschad self-assigned this Mar 31, 2025
@maschad maschad added the bug Something isn't working label Mar 31, 2025
@maschad maschad requested a review from Copilot March 31, 2025 23:46
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue in the confidential chat module by updating the decryption logic for stream responses. Key changes include creating a synchronous decryption wrapper function, parsing raw JSON directly, and wrapping decrypted chunks conditionally.

Comments suppressed due to low confidence (2)

src/atoma_sdk/confidential_chat.py:742

  • [nitpick] Consider using a dataclass for EncryptedData to improve code clarity and maintainability.
class EncryptedData:

src/atoma_sdk/confidential_chat.py:768

  • [nitpick] Consider logging a message when decrypted JSON contains no choices, since silently skipping such chunks may obscure underlying issues.
if not decrypted_json.get('choices'):

Copy link
Copy Markdown
Contributor

@jorgeantonio21 jorgeantonio21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jorgeantonio21 jorgeantonio21 merged commit e22be50 into AtomaAI:main Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Async confidential chat completions not working

4 participants