models

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 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 Chat

type Chat struct {
	ID       string    `json:"id"`
	Messages []Message `json:"messages"`
}

func (*Chat) SystemMessage

func (c *Chat) SystemMessage() (Message, error)

SystemMessage returns the first encountered Message with role 'system'

type ChatQuerier

type ChatQuerier interface {
	Querier
	TextQuery(context.Context, Chat) (Chat, error)
}

type Message

type Message struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

type Querier

type Querier interface {
	Query(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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