Fix duplicate Azure provider declaration on master
This commit is contained in:
parent
6c4838baa1
commit
b06cd148b0
2 changed files with 5 additions and 17 deletions
|
|
@ -437,11 +437,11 @@ func (c *PicoChannel) authenticate(r *http.Request) bool {
|
|||
}
|
||||
|
||||
logger.WarnCF("pico", "Authentication failed: No valid token provided in request", map[string]any{
|
||||
"path": r.URL.Path,
|
||||
"remote_addr": r.RemoteAddr,
|
||||
"has_auth_hdr": auth != "",
|
||||
"has_token_q": r.URL.Query().Get("token") != "",
|
||||
"has_subproto": r.Header.Get("Sec-WebSocket-Protocol") != "",
|
||||
"path": r.URL.Path,
|
||||
"remote_addr": r.RemoteAddr,
|
||||
"has_auth_hdr": auth != "",
|
||||
"has_token_q": r.URL.Query().Get("token") != "",
|
||||
"has_subproto": r.Header.Get("Sec-WebSocket-Protocol") != "",
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,18 +58,6 @@ func NewAzureAIProvider(apiKey, apiBase, proxy, userAgent string, requestTimeout
|
|||
}
|
||||
}
|
||||
|
||||
func NewAzureAIProvider(apiKey, apiBase, proxy string, requestTimeoutSeconds int) *HTTPProvider {
|
||||
return &HTTPProvider{
|
||||
delegate: openai_compat.NewProvider(
|
||||
apiKey,
|
||||
apiBase,
|
||||
proxy,
|
||||
openai_compat.WithAzureHeaders(),
|
||||
openai_compat.WithRequestTimeout(time.Duration(requestTimeoutSeconds)*time.Second),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
func (p *HTTPProvider) Chat(
|
||||
ctx context.Context,
|
||||
messages []Message,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue