ai

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ai

type Ai interface {
	GetResponse(prompt *Prompt) (string, error)
}

type Image added in v0.1.1

type Image struct {
	Data      []byte
	Extension string
}

type OpenAI

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

func NewOpenAIClient

func NewOpenAIClient(apiKey string, model string) *OpenAI

func (*OpenAI) GetResponse

func (ai *OpenAI) GetResponse(prompt *Prompt) (string, error)

type Prompt

type Prompt struct {
	UserPrompt   string
	SystemPrompt string
	Images       []Image
}

type VertexAI

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

func NewVertexAIClient

func NewVertexAIClient(projectID, localtion, modelName string) (*VertexAI, error)

func (*VertexAI) GetResponse

func (ai *VertexAI) GetResponse(prompt *Prompt) (string, error)

Jump to

Keyboard shortcuts

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