Documentation ¶
Index ¶
- func DumpCookie(browserContextPath string) error
- type AccountPlan
- type Conversation
- type ConversationHistoryItem
- type ConversationHistoryResponse
- type ConversationResponse
- type GenerateConversationTitleResponse
- type GoGPT
- type ModelInfo
- type ModelsResponse
- type Options
- type QualitativeProperties
- type Session
- type TextModerationResponse
- type User
- type UserAccountInfo
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpCookie ¶
DumpCookie lets session login to the ChatGPT with headless mode disabled and dumps the browser context to the given browserContextPath string passed in parameters
Types ¶
type AccountPlan ¶
type AccountPlan struct { IsPaidSubscriptionActive bool `json:"is_paid_subscription_active"` SubscriptionPlan string `json:"subscription_plan"` AccountUserRole string `json:"account_user_role"` WasPaidCustomer bool `json:"was_paid_customer"` HasCustomerObject bool `json:"has_customer_object"` SubscriptionExpiresAtTimestamp int64 `json:"subscription_expires_at_timestamp"` }
type Conversation ¶
type ConversationHistoryItem ¶
type ConversationHistoryResponse ¶
type ConversationHistoryResponse struct { Items []ConversationHistoryItem `json:"items"` Total int `json:"total"` Limit int `json:"limit"` Offset int `json:"offset"` HasMissingConversations bool `json:"has_missing_conversations"` }
type ConversationResponse ¶ added in v0.0.3
type GenerateConversationTitleResponse ¶ added in v0.0.3
type GenerateConversationTitleResponse struct {
Title string `json:"title"`
}
type GoGPT ¶
type GoGPT interface { Login(username, password string) error Ask(question string, version Version) History() ([]ConversationHistoryItem, error) AccountInfo() UserAccountInfo LoadConversation(uuid string) (*Conversation, error) Close() error NewChat() Session() Session Models() ([]ModelInfo, error) Debug() CreateConversation(message, model string, onResponseCallback conversationResponseConsumer) (*Conversation, error) GenerateTitle(conversationId, messageId string) ([]byte, error) Moderation(conversationId, messageId, messageText string) (*TextModerationResponse, error) }
type ModelsResponse ¶
type ModelsResponse struct {
Models []ModelInfo `json:"models"`
}
type QualitativeProperties ¶
type TextModerationResponse ¶ added in v0.0.4
type UserAccountInfo ¶
type UserAccountInfo struct { AccountPlan AccountPlan `json:"account_plan"` UserCountry string `json:"user_country"` Features []string `json:"features"` }
func UnmarshalUserAccountInfo ¶
func UnmarshalUserAccountInfo(jsonData []byte) (UserAccountInfo, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.