ai

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAiModels

func GetAiModels() ([]string, int)

func GetAnthropicModels

func GetAnthropicModels() ([]string, int)

func GetGptModels

func GetGptModels() ([]string, int)

Types

type AIDriver

type AIDriver interface {
	SetSystemMessage(message string)
	GetResponse(prompt string, model string) (string, error)
}

type AnthropicDriver

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

func NewAnthropicDriver

func NewAnthropicDriver(apiKey string) *AnthropicDriver

func (*AnthropicDriver) GetResponse

func (d *AnthropicDriver) GetResponse(prompt string, model string) (string, error)

func (*AnthropicDriver) SetSystemMessage

func (d *AnthropicDriver) SetSystemMessage(message string)

type OpenAIDriver

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

func NewOpenAIDriver

func NewOpenAIDriver(apiKey string) *OpenAIDriver

func (*OpenAIDriver) GetResponse

func (d *OpenAIDriver) GetResponse(prompt string, model string) (string, error)

func (*OpenAIDriver) SetSystemMessage

func (d *OpenAIDriver) SetSystemMessage(message string)

Jump to

Keyboard shortcuts

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