Documentation
¶
Index ¶
- func NewClients(cfg *config.Config, logger *zap.SugaredLogger) (map[string]ChatClient, error)
- func NewOpenAIChatCompletionService(config *config.OpenAI) *openai.ChatCompletionService
- type ChatClient
- type ChatRequest
- type ChatResponse
- type ImageGenerateRequest
- type ImageResponse
- type Message
- type OpenAIClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClients ¶
func NewClients(cfg *config.Config, logger *zap.SugaredLogger) (map[string]ChatClient, error)
Types ¶
type ChatClient ¶
type ChatClient interface {
Chat(ctx context.Context, request *ChatRequest) (*ChatResponse, error)
}
type ChatRequest ¶
type ChatResponse ¶
type ImageGenerateRequest ¶
type ImageResponse ¶
type OpenAIClient ¶
type OpenAIClient struct {
// contains filtered or unexported fields
}
func NewOpenAIClient ¶
func NewOpenAIClient(completionService oaiChatCompletionService, logger *zap.SugaredLogger) *OpenAIClient
func (*OpenAIClient) Chat ¶
func (c *OpenAIClient) Chat(ctx context.Context, request *ChatRequest) (*ChatResponse, error)
Click to show internal directories.
Click to hide internal directories.