Documentation ¶
Index ¶
Constants ¶
View Source
const ( ChatRoleUser = "user" ChatRoleAssistant = "assistant" )
Variables ¶
This section is empty.
Functions ¶
func CalculateSHA1 ¶
Types ¶
type Conversation ¶
type Conversation interface { GetMessages() []Message GetMessageFromSha1(sha1partial string) (Message, error) Last() Message MessagesFromHead() []Message Append(role string, message string) Message SetSystem(message string) GetSystem() string SetProfile(profile config.Profile) error Modify(m Message) error ToOpenAIMessage() []openai.ChatCompletionMessage ToAnthropicMessage() []anthropic.Message ChangeHead(sha string) (Message, error) GetProfile() config.Profile ToYAML() ([]byte, error) }
func FromYAML ¶
func FromYAML(yamlBytes []byte) (Conversation, error)
func NewConversation ¶
func NewConversation(profile config.Profile) Conversation
Click to show internal directories.
Click to hide internal directories.