Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v0.5.0
type Client interface { ChatCompletion(ctx context.Context, request model.ChatCompletionRequest) (res model.ChatCompletionResponse, err error) ChatCompletionStream(ctx context.Context, request model.ChatCompletionRequest) (responseChan chan *model.ChatCompletionResponse, err error) Image(ctx context.Context, request model.ImageRequest) (res model.ImageResponse, err error) Speech(ctx context.Context, request model.SpeechRequest) (res model.SpeechResponse, err error) Transcription(ctx context.Context, request model.AudioRequest) (res model.AudioResponse, err error) Embeddings(ctx context.Context, request model.EmbeddingRequest) (res model.EmbeddingResponse, err error) Moderations(ctx context.Context, request model.ModerationRequest) (res model.ModerationResponse, err error) }
type EmbeddingClient ¶ added in v0.4.0
type EmbeddingClient struct {
// contains filtered or unexported fields
}
func NewEmbeddingClient ¶ added in v0.4.0
func NewEmbeddingClient(ctx context.Context, model, key, baseURL, path string, proxyURL ...string) *EmbeddingClient
func (*EmbeddingClient) Embeddings ¶ added in v0.4.0
func (c *EmbeddingClient) Embeddings(ctx context.Context, request model.EmbeddingRequest) (res model.EmbeddingResponse, err error)
type MidjourneyClient ¶ added in v0.4.0
type MidjourneyClient struct {
// contains filtered or unexported fields
}
func NewMidjourneyClient ¶ added in v0.4.0
func NewMidjourneyClient(ctx context.Context, baseURL, path, apiSecret, apiSecretHeader, method string, proxyURL ...string) *MidjourneyClient
func (*MidjourneyClient) Request ¶ added in v0.4.0
func (c *MidjourneyClient) Request(ctx context.Context, data interface{}) (res model.MidjourneyResponse, err error)
type ModerationClient ¶ added in v0.5.0
type ModerationClient struct {
// contains filtered or unexported fields
}
func NewModerationClient ¶ added in v0.5.0
func NewModerationClient(ctx context.Context, model, key, baseURL, path string, proxyURL ...string) *ModerationClient
func (*ModerationClient) Moderations ¶ added in v0.5.0
func (c *ModerationClient) Moderations(ctx context.Context, request model.ModerationRequest) (res model.ModerationResponse, err error)
type RealtimeClient ¶ added in v0.5.0
type RealtimeClient struct {
// contains filtered or unexported fields
}
func NewRealtimeClient ¶ added in v0.5.0
func NewRealtimeClient(ctx context.Context, model, key, baseURL, path string, proxyURL ...string) *RealtimeClient
func (*RealtimeClient) Realtime ¶ added in v0.5.0
func (c *RealtimeClient) Realtime(ctx context.Context, requestChan chan *model.RealtimeRequest) (responseChan chan *model.RealtimeResponse, err error)
Click to show internal directories.
Click to hide internal directories.