Documentation
¶
Index ¶
Constants ¶
View Source
const TestProviderExpectedMessage = "Hello, world!"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnthropicLLMProvider ¶
type AnthropicLLMProvider struct {
// contains filtered or unexported fields
}
func NewAnthropicLLMProvider ¶
func NewAnthropicLLMProvider(apiKey string, model string) *AnthropicLLMProvider
func (*AnthropicLLMProvider) GetCompletion ¶
type LLMProvider ¶
type LLMProvider interface { // Get a completion from an LLM. The function should pass the system message // (already including the context) to the LLM. GetCompletion( fullSystemMessage string, messages []Message, handleTokens func(tokens string) error, ) error }
A provider should act as a proxy to some LLM provider, such as "openai", "anthropic" or different. Its only task is to implement the GetCompletion function.
func ResolveFromConfig ¶
func ResolveFromConfig(conf *config.Config) (LLMProvider, error)
type OpenAILLMProvider ¶
type OpenAILLMProvider struct {
// contains filtered or unexported fields
}
func NewOpenAILLMProvider ¶
func NewOpenAILLMProvider(apiKey string, model string) *OpenAILLMProvider
func (*OpenAILLMProvider) GetCompletion ¶
Click to show internal directories.
Click to hide internal directories.