Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

kristapratico
Copy link
Contributor

@kristapratico kristapratico commented Dec 19, 2024

  • 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
Copy link
Contributor Author

@kristapratico kristapratico Dec 19, 2024

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
Collaborator

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
2 checks passed
@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