Skip to content

Support external events for interact with conversation resource#17

Merged
caly-amigo merged 3 commits intomainfrom
interact-conversation-external-events
Feb 16, 2026
Merged

Support external events for interact with conversation resource#17
caly-amigo merged 3 commits intomainfrom
interact-conversation-external-events

Conversation

@caly-amigo
Copy link
Collaborator

@caly-amigo caly-amigo commented Feb 16, 2026

Summary

  • fix conversation.interact_with_conversation request encoding so multipart bodies are valid in real HTTPX sync/async clients
  • support external event context arrays in multipart form fields:
    • external_event_message_content
    • external_event_message_timestamp
  • keep repeated field semantics required by OpenAPI for external event context
  • update integration tests so external event payloads include one timestamp per external event and timestamps are after the latest interaction/message time in the conversation

Root Cause

The prior implementation changed request_kwargs["data"] to a tuple-list to preserve repeated fields. That shape worked in mocked unit tests but produced invalid multipart streaming behavior in live HTTPX requests.

Implementation Details

  • switched to building multipart fields via files entries, including non-file fields as (None, value)
  • appended the actual recorded_message file part to the same multipart files payload
  • updated tests to assert multipart fields from files

Validation

@blacksmith-sh

This comment has been minimized.

@caly-amigo caly-amigo changed the title Fix interact external event payload handling Support external events for interact with conversation resource Feb 16, 2026
@caly-amigo caly-amigo merged commit 838a3d1 into main Feb 16, 2026
9 checks passed
@caly-amigo caly-amigo deleted the interact-conversation-external-events branch February 16, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments