Files
azure-openai-proxy/openai/chat.go
2023-03-24 15:12:01 +08:00

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)
}