Azure-Samples / aoai-realtime-audio-sdk

Azure OpenAI code resources for using gpt-4o-realtime capabilities.
MIT License
576 stars 82 forks source link

Can low level client be used without Azure #24

Open dlflannery opened 1 week ago

dlflannery commented 1 week ago

I’ve used python connecting directly to OpenAI endpoints but have not used Azure. I would like to use. the lowlevel client but see it’s importing azure packages, although the code seems to handle non-azure cases for authentication. Can I use it as-is to connect directly to the OpenAI. endpoints? Does the “token” credential just become the openai_api_key in that case?

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

(Not a bug, just a question)

Any log messages given by the failure

(No failure involved)

Expected/desired behavior

(just want to use it as described above)

OS and Version?

Windows 11 Pro, Visual Studio 2022 Python Project

Versions

Python 3.11

Mention any other details that might be useful


Thanks! We'll be in touch soon.

glecaros commented 1 week ago

Hi @dlflannery, thanks for reaching out. Yes, the clients can be used for both Azure OpenAI and OpenAI. We will add more documentation to make it explicit, although the samples show how to do it. As for the token credential question, OpenAI actually would use the key credential (same as azure when an api key is provided)