chatmodel

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatModel

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

func NewChatModel

func NewChatModel(generateFunc GenerateFunc) *ChatModel

func (*ChatModel) Call

func (b *ChatModel) Call(ctx context.Context, messages []golc.ChatMessage) (golc.ChatMessage, error)

func (*ChatModel) CallPrompt

func (b *ChatModel) CallPrompt(ctx context.Context, promptValue golc.PromptValue) (golc.ChatMessage, error)

func (*ChatModel) Generate

func (b *ChatModel) Generate(ctx context.Context, messages [][]golc.ChatMessage) (*golc.LLMResult, error)

func (*ChatModel) GeneratePrompt

func (b *ChatModel) GeneratePrompt(ctx context.Context, promptValues []golc.PromptValue) (*golc.LLMResult, error)

func (*ChatModel) Predict

func (b *ChatModel) Predict(ctx context.Context, text string) (string, error)

func (*ChatModel) PredictMessages

func (b *ChatModel) PredictMessages(ctx context.Context, messages []golc.ChatMessage) (golc.ChatMessage, error)

type GenerateFunc

type GenerateFunc func(ctx context.Context, messages []golc.ChatMessage) (*golc.LLMResult, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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