Documentation ¶
Index ¶
Constants ¶
View Source
const ( RoleUser = "user" RoleAssistant = "assistant" RoleSystem = "system" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type LLM ¶
func (*LLM) GenerateContent ¶
func (o *LLM) GenerateContent(ctx context.Context, messages []llms.MessageContent, options ...llms.CallOption) (*llms.ContentResponse, error)
GenerateContent implements the Model interface.
type Option ¶
type Option func(*options)
func WithBaseURL ¶
WithBaseUrl passes the Anthropic base URL to the client. If not set, the default base URL is used.
func WithHTTPClient ¶
func WithHTTPClient(client anthropicclient.Doer) Option
WithHTTPClient allows setting a custom HTTP client. If not set, the default value is http.DefaultClient.
func WithLegacyTextCompletionsAPI ¶
func WithLegacyTextCompletionsAPI() Option
WithLegacyTextCompletionsAPI enables the use of the legacy text completions API.
Click to show internal directories.
Click to hide internal directories.