conversations

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConversationTracker

type ConversationTracker[K TrackerKey] struct {
	// contains filtered or unexported fields
}

func NewConversationTracker

func NewConversationTracker[K TrackerKey](lastMessageDuration time.Duration) *ConversationTracker[K]

func (*ConversationTracker[K]) AddMessage

func (c *ConversationTracker[K]) AddMessage(key K, message openai.ChatCompletionMessage)

func (*ConversationTracker[K]) GetConversation

func (c *ConversationTracker[K]) GetConversation(key K) []openai.ChatCompletionMessage

func (*ConversationTracker[K]) SetConversation

func (c *ConversationTracker[K]) SetConversation(key K, messages []openai.ChatCompletionMessage)

type TrackerKey

type TrackerKey interface{ ~int | ~int64 | ~string }

Jump to

Keyboard shortcuts

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