anthropic

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnthropicModel

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

func NewProvider

func NewProvider(modelSlug string, apiKey string) *AnthropicModel

func (*AnthropicModel) GetHeaders

func (m *AnthropicModel) GetHeaders() map[string]string

func (*AnthropicModel) GetUrl

func (m *AnthropicModel) GetUrl() string

func (*AnthropicModel) Model

func (m *AnthropicModel) Model() string

func (*AnthropicModel) ParseResponse

func (m *AnthropicModel) ParseResponse(rawRes []byte) (string, error)

func (*AnthropicModel) PreparePayload

func (m *AnthropicModel) PreparePayload(chatHistory *chat.ChatHistory, systemPrompt string) (string, error)

type AnthropicResponse

type AnthropicResponse struct {
	Content []content `json:"content"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳