chatgpt

package
v0.0.0-...-cfad31d Latest Latest
Warning

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

Go to latest
Published: Jun 14, 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

func ClearConversations

func ClearConversations(c *gin.Context)

func CreateConversation

func CreateConversation(c *gin.Context)

func Fallback

func Fallback(c *gin.Context)

func FeedbackMessage

func FeedbackMessage(c *gin.Context)

func GenerateTitle

func GenerateTitle(c *gin.Context)

func GetAccountCheck

func GetAccountCheck(c *gin.Context)

func GetConversation

func GetConversation(c *gin.Context)

func GetConversations

func GetConversations(c *gin.Context)

func GetModels

func GetModels(c *gin.Context)

func Login

func Login(c *gin.Context)

func UpdateConversation

func UpdateConversation(c *gin.Context)

Types

type Author

type Author struct {
	Role string `json:"role"`
}

type Content

type Content struct {
	ContentType string   `json:"content_type"`
	Parts       []string `json:"parts"`
}
type Cookie struct {
	Name   string `json:"name"`
	Value  string `json:"value"`
	Expiry int64  `json:"expiry"`
}

type CreateConversationRequest

type CreateConversationRequest struct {
	Action            string    `json:"action"`
	Messages          []Message `json:"messages"`
	Model             string    `json:"model"`
	ParentMessageID   string    `json:"parent_message_id"`
	ConversationID    *string   `json:"conversation_id"`
	TimezoneOffsetMin int       `json:"timezone_offset_min"`
	VariantPurpose    string    `json:"variant_purpose"`
	ContinueText      string    `json:"continue_text"`
}

type FeedbackMessageRequest

type FeedbackMessageRequest struct {
	MessageID      string `json:"message_id"`
	ConversationID string `json:"conversation_id"`
	Rating         string `json:"rating"`
}

type GenerateTitleRequest

type GenerateTitleRequest struct {
	MessageID string `json:"message_id"`
}

type Message

type Message struct {
	Author  Author  `json:"author"`
	Content Content `json:"content"`
	ID      string  `json:"id"`
}

type PatchConversationRequest

type PatchConversationRequest struct {
	Title     *string `json:"title"`
	IsVisible bool    `json:"is_visible"`
}

type UserLogin

type UserLogin struct {
	// contains filtered or unexported fields
}

func (*UserLogin) CheckPassword

func (userLogin *UserLogin) CheckPassword(state string, username string, password string) (string, int, error)

func (*UserLogin) CheckUsername

func (userLogin *UserLogin) CheckUsername(state string, username string) (int, error)

func (*UserLogin) GetAccessToken

func (userLogin *UserLogin) GetAccessToken(code string) (string, int, error)

func (*UserLogin) GetAuthorizedUrl

func (userLogin *UserLogin) GetAuthorizedUrl(csrfToken string) (string, int, error)

func (*UserLogin) GetState

func (userLogin *UserLogin) GetState(authorizedUrl string) (string, int, error)

Jump to

Keyboard shortcuts

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