Documentation
¶
Index ¶
- type Client
- func (c *Client) Chat(ctx context.Context, message string, history []types.Message) (*types.CompletionResponse, error)
- func (c *Client) GenerateCodeExplanation(message, lang string) (string, error)
- func (c *Client) GenerateCommitMessage(diff string, prompt string) (string, error)
- func (c *Client) Stream(ctx context.Context, message string, history []types.Message) (*types.CompletionResponse, error)
- func (c *Client) TranslateMessage(prompt string, message string, lang string) (string, 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
}
Client represents an LLM client
func New ¶
func New(config *types.ClientConfig) *Client
New creates a new client with the given config
func (*Client) Chat ¶
func (c *Client) Chat(ctx context.Context, message string, history []types.Message) (*types.CompletionResponse, error)
Chat sends a chat message to the LLM provider
func (*Client) GenerateCodeExplanation ¶
GenerateCodeExplanation generates an explanation for the given code in the specified language
func (*Client) GenerateCommitMessage ¶
GenerateCommitMessage generates a commit message for the given diff
Click to show internal directories.
Click to hide internal directories.