anthropic

package
v0.0.0-...-a0cf74a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ApiKeyHeader = "X-Openline-API-KEY"

Variables

This section is empty.

Functions

func InvokeAnthropic

func InvokeAnthropic(ctx context.Context, cfg *config.AiModelConfigAnthropic, prompt string) (string, error)

Types

type AnthropicClient

type AnthropicClient struct {
	// contains filtered or unexported fields
}

func NewAnthropicClient

func NewAnthropicClient(cfg *config.AiModelConfigAnthropic) *AnthropicClient

type AnthropicModel

type AnthropicModel struct {
	Client *AnthropicClient
}

func NewModel

func NewModel(apiKey, apiPath, model string) *AnthropicModel

func (*AnthropicModel) Inference

func (m *AnthropicModel) Inference(ctx context.Context, input string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL