valentinegb / openai

An unofficial Rust library for the OpenAI API.
https://crates.io/crates/openai/
MIT License
61 stars 18 forks source link

Basic Azure OpenAI Service support #63

Open JelteF opened 1 year ago

JelteF commented 1 year ago

Fixes #56 Fixes #57

This is different from #57 in that it uses once_cell instead of lazy_static for initialization of the default BASE_URL value.

Apart from choosing the BASE_URL there are some other small differences between the way you need to call the Azure service. So this adds a API_TYPE. The same approach is used in the official openai Python library.