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

Question about RealtimeClient / RealtimeRelay and moving logic to API #27

Open
jambudipa opened this issue Oct 4, 2024 · 3 comments
Open

Comments

@jambudipa
Copy link

I got an app up and running within about 20 minutes by tweaking the realtime console project, great fun 🤣

It occurs to me though that the client on the front end has too much logic in it – tools, etc. Are there plans to create a relay that encapsulates the logic on the server? With a smaller client for the front end that merely sends and receives audio and other sorts of messages?

The RealtimeRelay instantiates its own RealtimeClient, so shouldn't be too arduous to trim down the front end version.

I am going to work on this over the weekend, but are there plans for the release of something more official along these lines?

@jcollingj
Copy link

A follow on question to this - What logic is supposed to be where? Do you addTools on just the server, just the client, or both?

@jambudipa
Copy link
Author

A question for me?

I mean the sample code, everything is on the client. The server is a mere relay to hide the credentials.

But in my mind, having the prompts, the tool definitions and the logic and everything else in the client is not ideal. I would like to create an adapter for web apps so all this can be on the server, my own API.

Looking at the reference app, the RealtimeClient is instantiated on both the client and server, so one is just a proxy really. Could just extract the bits I need for the client and add an alternative message sanding capability to talk to the API, rather than that which talks to the LLM.

@khorwood-openai
Copy link
Contributor

This is something I'd really like to work on; we're queueing up ideas. I'll cc @bakks and @jordans-openai for visibility that folks are interested in something a little more fully formed and leave this open for now!

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

No branches or pull requests

3 participants