Documentation ¶
Index ¶
- Variables
- func GetFakeUA() string
- func StableDiffusionImage(prompt string) (io.ReadCloser, error)
- func TextGeneration(c chan Result, query TextQuery, model string)
- type ImgPrompt
- type QueryMessage
- type Result
- type TextQuery
- type TwitchBanStatusResponse
- type TwitchGQLBaseResponse
- type TwitchGQLPayload
- type TwitchUser
- type TwitchUserResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var FakeUASlice = []string{
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.3",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.1",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.3",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.",
}
View Source
var HTTP = &http.Client{ Timeout: 30 * time.Second, }
View Source
var RedisDB = redis.NewClient(&redis.Options{
Addr: "localhost:6379",
Password: "",
DB: 9,
})
Functions ¶
func StableDiffusionImage ¶
func StableDiffusionImage(prompt string) (io.ReadCloser, error)
func TextGeneration ¶
Types ¶
type QueryMessage ¶
type TextQuery ¶
type TextQuery struct { Stream bool `json:"stream"` Messages []QueryMessage `json:"messages"` }
type TwitchBanStatusResponse ¶
type TwitchBanStatusResponse struct { *TwitchGQLBaseResponse Data struct { BanStatus struct { BannedUser TwitchUser `json:"bannedUser"` Moderator TwitchUser `json:"moderator"` CreatedAt string `json:"createdAt"` ExpiresAt string `json:"expiresAt"` Permanent bool `json:"isPermanent"` } `json:"chatRoomBanStatus"` } `json:"data"` }
func GetTwitchBan ¶
func GetTwitchBan(channelID string, userID string) (TwitchBanStatusResponse, error)
type TwitchGQLBaseResponse ¶
type TwitchGQLPayload ¶
type TwitchUser ¶
type TwitchUser struct { ID string `json:"id,omitempty"` Login string `json:"login,omitempty"` DisplayName string `json:"displayName,omitempty"` }
func GetTwitchUser ¶
func GetTwitchUser(login string, id string) (TwitchUser, error)
type TwitchUserResponse ¶
type TwitchUserResponse struct { *TwitchGQLBaseResponse Data struct { User TwitchUser `json:"user"` } `json:"data"` }
Click to show internal directories.
Click to hide internal directories.