chatgptgo

package module
v0.0.0-...-3027c78 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chatbot

type Chatbot struct {
	AccessToken string
	HTTPClient  *tls_client.HttpClient
}

func NewChatbot

func NewChatbot(accessToken string) (Chatbot, error)

func (*Chatbot) Ask

func (c *Chatbot) Ask(body *chatbot.ChatbotRequest, ch chan chatbot.ChatbotResponse, errch chan error)

func (*Chatbot) AskNS

Ask No Stream

func (*Chatbot) DownloadFile

func (c *Chatbot) DownloadFile(fileID string) (Download, error)

func (*Chatbot) GetConversation

func (c *Chatbot) GetConversation(conversationID string) (*conversation.Conversation, error)

func (*Chatbot) GetHistory

func (c *Chatbot) GetHistory(offset, limit int) (*conversation.Conversations, error)

func (*Chatbot) GetModels

func (c *Chatbot) GetModels() ([]chatbot.Model, error)

type Download

type Download struct {
	Status      string `json:"status"`
	DownloadURL string `json:"download_url"`
	FileName    string `json:"file_name"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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