Skip to content

Commit 3864e1d

Browse files
committed
fixed azure deploys
1 parent 4237fc1 commit 3864e1d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/api.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Creates a new `Chat` object with default settings:
156156
- `history` is set to `true`
157157
"""
158158
@kwdef struct Chat
159-
service::Type{<:ServiceEndpoint} = OPENAIServiceEndpoint #AZUREServiceEndpoint #OPENAIServiceEndpoint
159+
service::Type{<:ServiceEndpoint} = AZUREServiceEndpoint #AZUREServiceEndpoint #OPENAIServiceEndpoint
160160
model::String = "gpt-4o"
161161
messages::Conversation = Message[]
162162
history::Bool = true

src/requests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
get_url(params::Chat) = get_url(params.service, params.model)
2-
get_url(emb::Embeddings) = get_url(emb.model)
2+
get_url(emb::Embeddings) = get_url(OPENAIServiceEndpoint, emb.model)
33
get_url(::Type{OPENAIServiceEndpoint}, model::String) = OPENAI_BASE_URL * _MODEL_ENDPOINTS_OPENAI[model]
44
get_url(::Type{OPENAIServiceEndpoint}, emb::Embeddings) = get_url(emb)
5-
get_url(::Type{AZUREServiceEndpoint}, model::String) = ENV[AZURE_OPENAI_BASE_URL] * "/openai/deployments/" * _MODEL_ENDPOINTS_AZURE_OPENAI[model] * "/chat/completions?api-version=$(ENV[AZURE_OPENAI_API_VERSION])"
5+
get_url(::Type{AZUREServiceEndpoint}, model::String) = ENV[AZURE_OPENAI_BASE_URL] * _MODEL_ENDPOINTS_AZURE_OPENAI[model] * "/chat/completions?api-version=$(ENV[AZURE_OPENAI_API_VERSION])"
66

77

88
function auth_header(::Type{OPENAIServiceEndpoint})

0 commit comments

Comments
 (0)