Documentation ¶
Index ¶
- Variables
- func ClearChat(chat types.JID)
- func CreateAudioMessage(client *whatsmeow.Client, audio []byte) (*waProto.Message, error)
- func CreateCommand(name string, permission string, description string, ...)
- func CreateImgCmd(process func(image.Image) *image.NRGBA) ...
- func CreateImgMessage(client *whatsmeow.Client, buffer []byte) (*waProto.Message, error)
- func CreateStickerMessage(client *whatsmeow.Client, buffer []byte) (*waProto.Message, error)
- func CreateTextMessage(content string) *waProto.Message
- func CreateVideoMessage(client *whatsmeow.Client, buffer []byte) (*waProto.Message, error)
- func CreateVoiceVoxClient() *voicevox.Client
- func GetChatReponse(chat types.JID, prompt string) (string, error)
- func GetMedia(client *whatsmeow.Client, fetchUrl string) (*waProto.Message, error)
- func GetMemeImg(meme *RedditMemeResponse) ([]byte, error)
- func GetTextContext(msg *waProto.Message) (string, *waProto.ContextInfo)
- func GetWaifu(category string) ([]byte, error)
- func Mp3ToOgg(audioData []byte) ([]byte, error)
- func OggToMp3(audioData []byte) ([]byte, error)
- func SetSystemChat(chat types.JID, content string)
- func ToOgg(audioData []byte) ([]byte, error)
- func TranscribeAudio(audioData []byte) (string, error)
- func Txt2Img(prompt string) ([]byte, error)
- func VideoToAudio(videoData []byte) ([]byte, error)
- func WebmToOgg(audioData []byte) ([]byte, error)
- type Command
- type CommandInput
- type RedditMemeResponse
- type Txt2ImgRequest
- type Txt2ImgResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotEnoughArguments = errors.New("not enough arguments") ErrNotEnoughPermission = errors.New("not enough permission") )
View Source
var OpenAIClient = openai.NewClient(env.OPENAI_API_KEY)
View Source
var PastMessages = make(map[types.JID][]openai.ChatCompletionMessage, 0)
TODO: Move this to database
Functions ¶
func CreateAudioMessage ¶
func CreateCommand ¶
func CreateImgCmd ¶
func CreateImgMessage ¶
func CreateStickerMessage ¶
func CreateTextMessage ¶
func CreateVideoMessage ¶
func CreateVoiceVoxClient ¶
func GetMemeImg ¶
func GetMemeImg(meme *RedditMemeResponse) ([]byte, error)
func GetTextContext ¶
func GetTextContext(msg *waProto.Message) (string, *waProto.ContextInfo)
func SetSystemChat ¶
func TranscribeAudio ¶
func VideoToAudio ¶
Types ¶
type CommandInput ¶
type RedditMemeResponse ¶
type RedditMemeResponse struct { PostLink string `json:"postLink"` SubReddit string `json:"subreddit"` Title string `json:"title"` URL string `json:"url"` NSFW bool `json:"nsfw"` Spoiler bool `json:"spoiler"` Author string `json:"author"` UPs int `json:"ups"` Preview []string `json:"preview"` }
func GetMeme ¶
func GetMeme(subreddit string) (*RedditMemeResponse, error)
type Txt2ImgRequest ¶
type Txt2ImgResponse ¶
Click to show internal directories.
Click to hide internal directories.