Skip to content

Conversation

@pragmatrix
Copy link
Owner

sense to be changed.

@pragmatrix pragmatrix force-pushed the openai-update-session-ext branch from 1c0ba67 to 7d9f5c3 Compare June 30, 2025 14:07
@pragmatrix pragmatrix marked this pull request as ready for review June 30, 2025 14:07
@pragmatrix pragmatrix requested a review from Copilot June 30, 2025 14:07
Copy link
Contributor

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 extends the session update flow to carry all relevant parameters—including instructions, voice, temperature, tools, and a newly added toolChoice—through the SessionUpdate event.

  • Import and wire up ToolChoice in the types import and Params struct
  • Add tool_choice handling in Params, the client’s send path, and the ServiceInputEvent::SessionUpdate variant
  • Update the client’s event dispatch to include tool_choice in outgoing SessionUpdate events
Comments suppressed due to low confidence (3)

services/openai-dialog/src/lib.rs:48

  • If your JSON uses camelCase for this field, add #[serde(rename = "toolChoice")] to tool_choice for consistency with other parameters.
 tool_choice: Option<ToolChoice>, 

services/openai-dialog/src/lib.rs:283

  • Add a unit or integration test to verify that tool_choice makes it through Params into the outgoing SessionUpdate event.
 if let Some(tool_choice) = params.tool_choice { 

services/openai-dialog/src/lib.rs:48

  • [nitpick] Consider documenting the purpose of tool_choice in Params so users know what values are expected and how it's used downstream.
 tool_choice: Option<ToolChoice>, 
@pragmatrix pragmatrix merged commit be254fe into master Jun 30, 2025
6 checks passed
@pragmatrix pragmatrix deleted the openai-update-session-ext branch July 1, 2025 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants