Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatContext ¶
type ChatContext struct { *gpt.GPTContext // contains filtered or unexported fields }
ChatContext is context data for chat
func New ¶
func New(apiKey, cacheDir string, logger *zerolog.Logger, profilePath, savePath string) (*ChatContext, error)
New function create new ChatContext instance.
func (*ChatContext) Interactive ¶
Interactive method is chatting in interactive mode (stream access).
func (*ChatContext) Request ¶
Request requesta OpenAI Chat completion, and returns response message. (REST access)
func (*ChatContext) Save ¶ added in v0.3.0
func (cctx *ChatContext) Save() error
Save method saves openai.ChatCompletionRequest data.
func (*ChatContext) SavePath ¶ added in v0.3.0
func (cctx *ChatContext) SavePath() string
Click to show internal directories.
Click to hide internal directories.