message

package
v1.3.0-rc.0...-12c9840 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	AllMessages Messages // use this directly if you are not care about the details

	// pay attention to the order
	SystemMessage           *Message
	SessionTopicMessage     *Message
	PromptTemplateMessages  Messages
	SessionPreviousMessages Messages // from prompt template if provided in the http header
	RequestedMessages       Messages // normally from body prompt field, user input
}

type Message

type Message openai.ChatCompletionMessage

func (*Message) Scan

func (m *Message) Scan(src any) error

func (*Message) ToOpenAI

func (m *Message) ToOpenAI() *openai.ChatCompletionMessage

func (Message) Value

func (m Message) Value() (driver.Value, error)

type Messages

type Messages []openai.ChatCompletionMessage

func FromProtobuf

func FromProtobuf(pbMsgs []*pb.Message) Messages

func (*Messages) Scan

func (msgs *Messages) Scan(src any) error

func (Messages) ToProtobuf

func (msgs Messages) ToProtobuf() []*pb.Message

func (Messages) Value

func (msgs Messages) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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