Skip to content

added {model: string;} arg to client.connect() #112

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

djfm
Copy link

@djfm djfm commented May 4, 2025

As it was, the library did not allow setting the
model used by the realtime API.

This commit should fix that by making the model
a mandatory argument of the client.connect method.

The model must be passed to connect as a string property called model in an object.

E.g.

client.connect({ model: 'gpt-4o-mini-realtime-preview' });

I've made the argument mandatory because if you use the wrong model your wallet can suffer quickly.

The mini model is like 10x less expensive. Just sayin'...

As it was, the library did not allow setting the
model used by the realtime API.

This commit should fix that by making the model
a mandatory argument of the `client.connect` method.

The model must be passed to `connect` as a string property
called `model` in an object.
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.

1 participant