Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatHandler ¶
type ChatHandler struct {
// contains filtered or unexported fields
}
func NewChatHandler ¶
func NewChatHandler(cmd *cli.Command, chatID string) (*ChatHandler, error)
type ChatSession ¶
type ChatSession struct {
// contains filtered or unexported fields
}
The ChatSession caches chat messages and keeps track of the conversation history. It is designed to store cached messages in a specified directory and in JSON format.
func NewChatSession ¶
func NewChatSession(storagePath string) (*ChatSession, error)
func (*ChatSession) Wrap ¶
func (c *ChatSession) Wrap(fn func(ctx context.Context, cmd *cli.Command, params openai.ChatCompletionNewParams) (openai.ChatCompletionMessage, error)) func(ctx context.Context, cmd *cli.Command, params openai.ChatCompletionNewParams) (openai.ChatCompletionMessage, error)
type Content ¶
todo: These structs are used to parse the JSON data stored in the cache. This is a temporary solution and should be replaced with a more robust solution. ref: https://github.com/openai/openai-go/issues/133
type DefaultHandler ¶
type DefaultHandler struct {
// contains filtered or unexported fields
}
func NewDefaultHandler ¶
func NewDefaultHandler(cmd *cli.Command) (*DefaultHandler, error)
type GeminiChatHandler ¶
type GeminiChatHandler struct {
// contains filtered or unexported fields
}
func NewGeminiChatHandler ¶
Click to show internal directories.
Click to hide internal directories.