mirror of
https://github.com/stulzq/azure-openai-proxy.git
synced 2025-12-19 15:24:24 +01:00
12 lines
278 B
Go
12 lines
278 B
Go
package openai
|
|
|
|
import "github.com/imroc/req/v3"
|
|
|
|
func ChatCompletions(token string, body []byte) (*req.Response, error) {
|
|
return client.R().
|
|
SetHeader("Content-Type", "application/json").
|
|
SetHeader(AuthHeaderKey, token).
|
|
SetBodyBytes(body).
|
|
Post(ChatCompletionsUrl)
|
|
}
|