Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

docs(examples/azure): example script with realtime API - #1967

#1967
Merged
RobertCraigie merged 1 commit into
openai:nextopenai/openai-python:nextfrom
kristapratico:azure-realtime-examplekristapratico/openai-python:azure-realtime-exampleCopy head branch name to clipboard
Jan 13, 2025
Merged

docs(examples/azure): example script with realtime API#1967
RobertCraigie merged 1 commit into
openai:nextopenai/openai-python:nextfrom
kristapratico:azure-realtime-examplekristapratico/openai-python:azure-realtime-exampleCopy head branch name to clipboard

Conversation

@kristapratico

@kristapratico kristapratico commented Dec 19, 2024

Copy link
Copy Markdown
Contributor
  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

Add a simple example that shows how to configure the Azure client to use Realtime API.

Additional context & links

async with client.beta.realtime.connect(
model="gpt-4o-realtime-preview", # deployment name for your model
) as connection:
await connection.session.update(session={"modalities": ["text"]}) # type: ignore

@kristapratico kristapratico Dec 19, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ignoring typing because Azure doesn't require the model to be updated. It doesn't seem like OpenAI requires it either - is this a spec bug?

https://platform.openai.com/docs/api-reference/realtime-client-events/session

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@RobertCraigie
RobertCraigie changed the base branch from main to next January 13, 2025 18:07
@RobertCraigie RobertCraigie changed the title (azure): example with realtime API docs(examples/azure): example script with realtime API Jan 13, 2025
@RobertCraigie
RobertCraigie merged commit 84f2f9c into openai:next Jan 13, 2025
@stainless-app stainless-app Bot mentioned this pull request Jan 13, 2025
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.