Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OpenAIContextItem ¶
type OpenAIContextItem struct { Message openai.ChatCompletionMessage Summary string Date time.Time }
func NewRequest ¶
func NewRequest(ctx context.Context, apiKey string, messages []openai.ChatCompletionMessage) (*OpenAIContextItem, error)
NewRequest function creates APIContext instance.
func OpenContext ¶
func OpenContext() ([]OpenAIContextItem, error)
OpenContext method reads openai message history to recover context from the file in .commit/context.csv.
func (*OpenAIContextItem) Persist ¶
func (gptContext *OpenAIContextItem) Persist() error
Persist method saves openai message history to recover context.
Click to show internal directories.
Click to hide internal directories.