You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could envision having some Provider types that a user could customize to connect to their own deployments, eg,
abstract type AbstractOpenAIProvider end
struct OpenAI <: AbstractOpenAIProvider
api_key::String
base_url::String
api_version::String
end
struct Azure <: AbstractOpenAIProvider
api_key::String
base_url::String
api_version::String
end
Technically, this could also circumvent the need to keep constantly providing an API key for each call (it rarely changes between calls).
I'm happy to open a PR to showcase what I'm thinking. Would you be interested in it?
On that note, would you be interested in Provider types (ala above) or rather defining a set of global constants for each parameter (ala BASE_URL_V1) that the users would have to override with @eval?
The text was updated successfully, but these errors were encountered:
I like the Azure integration idea, and Abstract types seems like a great idea for maintainability in the long term. If you want to submit a PR, be my guest! I'd be happy to help review, update tests, release, etc. to get your contribution released ASAP.
Thank you for the package!
Currently, it's limited to OpenAI API v1 only (via preset BASE_URL_V1 in https://github.com/rory-linehan/OpenAI.jl/blob/226a4779dcda21c0ee9b41f255c821d94675227e/src/OpenAI.jl#L6).
It would be awesome if we could change the API provider and use Azure OpenAI etc. Similar to what you can do with Python OpenAI package.
There a user can change 3 parameters to be able to use Azure instead of OpenAI
I could envision having some Provider types that a user could customize to connect to their own deployments, eg,
Technically, this could also circumvent the need to keep constantly providing an API key for each call (it rarely changes between calls).
I'm happy to open a PR to showcase what I'm thinking. Would you be interested in it?
On that note, would you be interested in Provider types (ala above) or rather defining a set of global constants for each parameter (ala BASE_URL_V1) that the users would have to override with
@eval
?The text was updated successfully, but these errors were encountered: