Documentation ¶
Index ¶
- type Client
- func (c *Client) ChatCompletion(ctx context.Context, request model.ChatCompletionRequest) (res model.ChatCompletionResponse, err error)
- func (c *Client) ChatCompletionStream(ctx context.Context, request model.ChatCompletionRequest) (responseChan chan *model.ChatCompletionResponse, err error)
- func (c *Client) Embeddings(ctx context.Context, request model.EmbeddingRequest) (res model.EmbeddingResponse, err error)
- func (c *Client) Image(ctx context.Context, request model.ImageRequest) (res model.ImageResponse, err error)
- func (c *Client) Moderations(ctx context.Context, request model.ModerationRequest) (res model.ModerationResponse, err error)
- func (c *Client) Speech(ctx context.Context, request model.SpeechRequest) (res model.SpeechResponse, err error)
- func (c *Client) Transcription(ctx context.Context, request model.AudioRequest) (res model.AudioResponse, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ChatCompletion ¶
func (c *Client) ChatCompletion(ctx context.Context, request model.ChatCompletionRequest) (res model.ChatCompletionResponse, err error)
func (*Client) ChatCompletionStream ¶
func (c *Client) ChatCompletionStream(ctx context.Context, request model.ChatCompletionRequest) (responseChan chan *model.ChatCompletionResponse, err error)
func (*Client) Embeddings ¶ added in v1.0.0
func (c *Client) Embeddings(ctx context.Context, request model.EmbeddingRequest) (res model.EmbeddingResponse, err error)
func (*Client) Image ¶
func (c *Client) Image(ctx context.Context, request model.ImageRequest) (res model.ImageResponse, err error)
func (*Client) Moderations ¶ added in v1.0.0
func (c *Client) Moderations(ctx context.Context, request model.ModerationRequest) (res model.ModerationResponse, err error)
func (*Client) Speech ¶ added in v0.5.0
func (c *Client) Speech(ctx context.Context, request model.SpeechRequest) (res model.SpeechResponse, err error)
func (*Client) Transcription ¶ added in v0.5.0
func (c *Client) Transcription(ctx context.Context, request model.AudioRequest) (res model.AudioResponse, err error)
Click to show internal directories.
Click to hide internal directories.