model

package
v0.0.0-...-de2ca29 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorConversationNotFound = Error("CONVERSATION_NOT_FOUND")
	ErrorModelNotFound        = Error("MODEL_NOT_FOUND")
	ErrorSpeakerNotFound      = Error("SPEAKER_NOT_FOUND")
)
View Source
const (
	ModelTypeBrain       = ModelType("brain")
	ModelTypeLlamaCPP    = ModelType("llamacpp")
	ModelTypeOpenAI      = ModelType("openai")
	ModelTypeAnthropic   = ModelType("anthropic")
	ModelTypeGroq        = ModelType("groq")
	ModelTypeHuggingFace = ModelType("huggingface")
	ModelTypeFireworks   = ModelType("fireworks")
	ModelTypeGoogle      = ModelType("google")
)
View Source
const (
	MySpeakerID = ID("s_26a91be1873f385bb0631ad868bf7c85")
)

Variables

This section is empty.

Functions

func CreateGlobalPrompt

func CreateGlobalPrompt(speakerName string) string

func CreateSummarizerPrompt

func CreateSummarizerPrompt(speakerName string) string

Types

type Conversation

type Conversation struct {
	ID      ID
	Created Time
	Updated Time
	Topic   string
}

type ConversationDocument

type ConversationDocument struct {
	Conversation Conversation
	Speakers     map[ID]Speaker
	Turns        []Turn
}

type Error

type Error string

Error is for errors in the business domain. See the constants below.

func (Error) Error

func (e Error) Error() string

type ID

type ID = goomodel.ID

type Model

type Model struct {
	ID      ID
	Created Time
	Updated Time
	Name    string
	Type    ModelType
	Config  string
}

func (Model) Token

func (m Model) Token() string

func (Model) URL

func (m Model) URL() string

type ModelType

type ModelType string

type Speaker

type Speaker struct {
	ID      ID
	Created Time
	Updated Time
	ModelID ID `db:"modelID"`
	Name    string
	System  string
	Config  string
}

func (Speaker) Avatar

func (s Speaker) Avatar() string

type SpeakerModelPair

type SpeakerModelPair struct {
	Speaker
	ModelName string `db:"ModelName"`
}

type Time

type Time = goomodel.Time

type Turn

type Turn struct {
	ID             ID
	Created        Time
	Updated        Time
	ConversationID ID `db:"conversationID"`
	SpeakerID      ID `db:"speakerID"`
	Content        string
}

Jump to

Keyboard shortcuts

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