Versions in this module Expand all Collapse all v1 v1.0.2 May 30, 2025 Changes in this version + var ErrorMaxToken = fmt.Errorf(...) + var GPTAsyncMap = make(map[string]AsyncMapValue) + var ParsedProxyURL *url.URL + var TraceUserMap = make(map[string]string) + func ClientHandler(ctx context.Context, targetID, quoteID, authorID string, args ...string) (err error) + func ClientHandlerStream(ctx context.Context, targetID, quoteID, authorID string, args ...string) (err error) + func ClientHandlerStreamUpdate(ctx context.Context, targetID, quoteID, authorID, msgID, msg string) (err error) + func CreateChatCompletion(ctx context.Context, msg, authorID string) (message string, err error) + func CreateChatCompletionStream(ctx context.Context, input, authorID string) + func ModerationCheck(ctx context.Context, content string) (res []string) + type AsyncMapValue struct + AuthorID string + Channel *chan string + type GPTClient struct + AsyncChan chan string + Messages []Message + Model string + StopAuthor string + StopChan chan string + Stream bool + func (g *GPTClient) GetModels() (msg string, err error) + func (g *GPTClient) Post() (msg string, err error) + func (g *GPTClient) PostWithStream(ctx context.Context) (err error) + func (g *GPTClient) SetContent(s string) + type Message struct + Content string + Role string