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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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