Documentation
¶
Index ¶
Constants ¶
View Source
const ( AuthorizationHeader string = "Authorization" ContentTypeHeader string = "Content-Type" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OpenAiClient ¶
type OpenAiClient struct {
// contains filtered or unexported fields
}
func NewOpenAiClient ¶
func NewOpenAiClient(apiCredential string) OpenAiClient
func (OpenAiClient) Send ¶
func (c OpenAiClient) Send(rc *config.OpenAiRouteConfig, prompts []*config.OpenAiPrompt, lm *logger.LlmMessage) (*OpenAiResponse, error)
type OpenAiError ¶
type OpenAiError struct {
// contains filtered or unexported fields
}
func NewOpenAiError ¶
func NewOpenAiError(message string, errorType string, code int) *OpenAiError
func (*OpenAiError) Error ¶
func (e *OpenAiError) Error() string
func (*OpenAiError) StatusCode ¶
func (e *OpenAiError) StatusCode() int
type OpenAiErrorContent ¶
type OpenAiErrorResponse ¶
type OpenAiErrorResponse struct {
Error *OpenAiErrorContent `json:"error"`
}
type OpenAiResponse ¶
Click to show internal directories.
Click to hide internal directories.