Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ConnectAI-E/Feishu-OpenAI-Stream-Chatbot
/ functions
Functions
192 in github.com/ConnectAI-E/Feishu-OpenAI-Stream-Chatbot
⨍
Functions
192
◇
Types & classes
55
↓ 15 callers
Method
Close
()
code/utils/audio/wav.go:84
↓ 14 callers
Function
getViperStringValue
(key string, defaultValue string)
code/initialization/config.go:104
↓ 13 callers
Function
writeLe
(w io.Writer, data T)
code/utils/audio/wav.go:68
↓ 11 callers
Function
withMainMd
withMainMd 用于生成markdown消息体
code/handlers/msg.go:204
↓ 11 callers
Function
withNote
withNote 用于生成纯文本脚注
code/handlers/msg.go:194
↓ 10 callers
Function
newSendCard
(header *larkcard.MessageCardHeader, elements ...larkcard.MessageCardElement)
code/handlers/msg.go:108
↓ 10 callers
Function
withHeader
withHeader 用于生成消息头
code/handlers/msg.go:179
↓ 7 callers
Function
replyCard
(ctx context.Context, msgId *string, cardContent string, )
code/handlers/msg.go:48
↓ 6 callers
Function
NewChatGPT
(config initialization.Config)
code/services/openai/common.go:208
↓ 6 callers
Function
newBtn
(content string, value map[string]interface{}, typename larkcard.MessageCardButtonType)
code/handlers/msg.go:273
↓ 5 callers
Function
processMessage
(msg interface{})
code/handlers/common.go:32
↓ 5 callers
Method
sendRequestWithBodyType
(link, method string, bodyType requestBodyType, requestBody interface{}, responseBody interface{})
code/services/openai/common.go:170
↓ 4 callers
Method
Clear
(userId string)
code/services/msgCache.go:14
↓ 4 callers
Method
Write
(data []byte)
code/utils/audio/wav.go:72
↓ 4 callers
Function
getViperBoolValue
(key string, defaultValue bool)
code/initialization/config.go:136
↓ 4 callers
Function
getViperIntValue
(key string, defaultValue int)
code/initialization/config.go:123
↓ 4 callers
Function
printErrorMessage
(a *ActionInfo, msg []openai.Messages, err error)
code/handlers/event_msg_action.go:145
↓ 4 callers
Function
updateFinalCard
( ctx context.Context, msg string, msgId *string, )
code/handlers/msg.go:678
↓ 3 callers
Method
GenerateOneImage
(prompt string, size string)
code/services/openai/picture.go:59
↓ 3 callers
Method
SetMsg
(sessionId string, msg []openai.Messages)
code/services/sessionCache.go:39
↓ 3 callers
Function
newMenu
( placeHolder string, value map[string]interface{}, options ...MenuOption, )
code/handlers/msg.go:285
↓ 3 callers
Function
newSendCardWithOutHeader
( elements ...larkcard.MessageCardElement)
code/handlers/msg.go:128
↓ 3 callers
Function
processNewLine
(msg string)
code/handlers/common.go:47
↓ 3 callers
Function
withMainText
withMainText 用于生成纯文本消息体
code/handlers/msg.go:222
↓ 3 callers
Function
withSplitLine
withSplitLine 用于生成分割线
code/handlers/msg.go:172
↓ 2 callers
Function
CalcTokenLength
(text string)
code/services/chatgpt/tokenizer.go:9
↓ 2 callers
Function
ConvertToRGBA
(inputFilePath string, outputFilePath string)
code/services/openai/picture.go:197
↓ 2 callers
Method
GenerateOneImageVariation
(images string, size string)
code/services/openai/picture.go:97
↓ 2 callers
Method
GetBalance
()
code/services/openai/billing.go:36
↓ 2 callers
Function
PatchCard
(ctx context.Context, msgId *string, cardContent string)
code/handlers/msg.go:606
↓ 2 callers
Method
SetAvailability
(key string, available bool)
code/services/loadbalancer/loadbalancer.go:67
↓ 2 callers
Method
SetPicResolution
(sessionId string, resolution Resolution)
code/services/sessionCache.go:42
↓ 2 callers
Function
VerifyPngs
(pngPaths []string)
code/services/openai/picture.go:154
↓ 2 callers
Function
replyMsg
(ctx context.Context, msg string, msgId *string)
code/handlers/msg.go:457
↓ 2 callers
Function
sendMsg
(ctx context.Context, msg string, chatId *string)
code/handlers/msg.go:570
↓ 2 callers
Function
sendSystemInstructionCard
(ctx context.Context, sessionId *string, msgId *string, content string)
code/handlers/msg.go:647
↓ 1 callers
Method
AudioToText
(audio string)
code/services/openai/audio.go:50
↓ 1 callers
Function
CheckAllowAccess
(userId *string)
code/services/accesscontrol/access_control.go:38
↓ 1 callers
Function
CommonProcessClearCache
(cardMsg CardMsg, session services.SessionServiceCacheInterface)
code/handlers/card_clear_action.go:22
↓ 1 callers
Function
CommonProcessPicModeChange
(cardMsg CardMsg, session services.SessionServiceCacheInterface)
code/handlers/card_pic_action.go:64
↓ 1 callers
Method
CommonProcessPicMore
(msg CardMsg)
code/handlers/card_pic_action.go:54
↓ 1 callers
Function
CommonProcessPicResolution
(msg CardMsg, cardAction *larkcard.CardAction, cache services.SessionServiceCacheInterface)
code/handlers/card_pic_action.go:43
↓ 1 callers
Function
CommonProcessRole
(msg CardMsg, cardAction *larkcard.CardAction, cache services.SessionServiceCacheInterface)
code/handlers/card_role_action.go:56
↓ 1 callers
Function
CommonProcessRoleTag
(msg CardMsg, cardAction *larkcard.CardAction, cache services.SessionServiceCacheInterface)
code/handlers/card_role_action.go:43
↓ 1 callers
Method
Completions
(msg []Messages)
code/services/openai/gpt3.go:44
↓ 1 callers
Function
EitherCutPrefix
(s string, prefix ...string)
code/utils/strings.go:12
↓ 1 callers
Function
EitherTrimEqual
(s string, prefix ...string)
code/utils/strings.go:30
↓ 1 callers
Method
Execute
(a *ActionInfo)
code/handlers/event_common_action.go:31
↓ 1 callers
Method
FullUrl
(suffix string)
code/services/openai/common.go:239
↓ 1 callers
Method
GenerateImage
(prompt string, size string, n int)
code/services/openai/picture.go:35
↓ 1 callers
Method
GenerateImageVariation
(images string, size string, n int)
code/services/openai/picture.go:73
↓ 1 callers
Method
GetAPI
()
code/services/loadbalancer/loadbalancer.go:31
↓ 1 callers
Function
GetImageCompressionType
(path string)
code/services/openai/picture.go:276
↓ 1 callers
Method
GetMsg
(sessionId string)
code/services/sessionCache.go:38
↓ 1 callers
Method
GetPicResolution
(sessionId string)
code/services/sessionCache.go:43
↓ 1 callers
Function
GetProxyClient
(proxyString string)
code/services/openai/common.go:187
↓ 1 callers
Method
IfProcessed
(msgId string)
code/services/msgCache.go:12
↓ 1 callers
Function
LoadConfig
* LoadConfig will load config and should only be called once, you should always use GetConfig to get config rather than call this function directly */
code/initialization/config.go:65
↓ 1 callers
Function
NewCardHandler
(m MessageHandler)
code/handlers/card_common_action.go:17
↓ 1 callers
Function
NewEncoder
(w io.WriteSeeker, sampleRate int, bitDepth int)
code/utils/audio/wav.go:100
↓ 1 callers
Function
NewMessageHandler
(gpt *openai.ChatGPT, config initialization.Config)
code/handlers/handler.go:112
↓ 1 callers
Function
OggToWav
(input io.Reader, output io.WriteSeeker)
code/utils/audio/ogg.go:29
↓ 1 callers
Function
SendRoleListCard
(ctx context.Context, sessionId *string, msgId *string, roleTag string, roleList []string)
code/handlers/msg.go:756
↓ 1 callers
Function
SendRoleTagsCard
(ctx context.Context, sessionId *string, msgId *string, roleTags []string)
code/handlers/msg.go:747
↓ 1 callers
Method
SetAvailabilityForAll
(available bool)
code/services/loadbalancer/loadbalancer.go:90
↓ 1 callers
Method
SetMode
(sessionId string, mode SessionMode)
code/services/sessionCache.go:40
↓ 1 callers
Method
StreamChat
()
code/services/chatgpt/gpt3.go:23
↓ 1 callers
Method
StreamChat
(ctx context.Context, msg []customOpenai.Messages, responseStream chan string)
code/services/chatgpt/gpt3.go:31
↓ 1 callers
Method
StreamChatWithHistory
(ctx context.Context, msg []openai.ChatCompletionMessage, maxTokens int, responseStream chan string, )
code/services/chatgpt/gpt3.go:46
↓ 1 callers
Method
TagProcessed
(msgId string)
code/services/msgCache.go:13
↓ 1 callers
Method
WriteHeader
()
code/utils/audio/wav.go:16
↓ 1 callers
Function
audioMultipartForm
(request AudioToTextRequestBody, w *multipart.Writer)
code/services/openai/audio.go:21
↓ 1 callers
Method
cardHandler
(ctx context.Context, cardAction *larkcard.CardAction)
code/handlers/init.go:14
↓ 1 callers
Function
chain
责任链
code/handlers/handler.go:18
↓ 1 callers
Function
cleanTextBlock
(msg string)
code/handlers/common.go:67
↓ 1 callers
Method
doAPIRequestWithRetry
(url, method string, bodyType requestBodyType, requestBody interface{}, responseBody interface{}, client *ht
code/services/openai/common.go:55
↓ 1 callers
Function
enableLog
()
code/main.go:74
↓ 1 callers
Function
filterFormatKey
过滤出 "sk-" 开头的 key
code/initialization/config.go:172
↓ 1 callers
Function
getStrPoolTotalLength
(strPool []openai.Messages)
code/services/sessionCache.go:146
↓ 1 callers
Function
getViperStringArray
OPENAI_KEY: sk-xxx,sk-xxx,sk-xxx result:[sk-xxx sk-xxx sk-xxx]
code/initialization/config.go:114
↓ 1 callers
Function
judgeChatType
(event *larkim.P2MessageReceiveV1)
code/handlers/init.go:62
↓ 1 callers
Method
judgeIfMentionMe
(mention []*larkim. MentionEvent)
code/handlers/handler.go:122
↓ 1 callers
Function
judgeMsgType
(event *larkim.P2MessageReceiveV1)
code/handlers/handler.go:40
↓ 1 callers
Function
loadCertificate
(config Config)
code/initialization/gin.go:14
↓ 1 callers
Function
msgFilter
func sendCard
code/handlers/common.go:12
↓ 1 callers
Method
msgReceivedHandler
(ctx context.Context, event *larkim.P2MessageReceiveV1)
code/handlers/init.go:13
↓ 1 callers
Function
newSimpleSendCard
( elements ...larkcard.MessageCardElement)
code/handlers/msg.go:149
↓ 1 callers
Function
parseContent
(content string)
code/handlers/common.go:18
↓ 1 callers
Function
parseFileKey
(content string)
code/handlers/common.go:74
↓ 1 callers
Function
parseImageKey
(content string)
code/handlers/common.go:88
↓ 1 callers
Function
pictureMultipartForm
(request ImageVariantRequestBody, w *multipart.Writer)
code/services/openai/picture.go:106
↓ 1 callers
Function
processQuote
(msg string)
code/handlers/common.go:52
↓ 1 callers
Function
processUnicode
将字符中 \u003c 替换为 < 等等
code/handlers/common.go:57
↓ 1 callers
Function
replayImageCardByBase64
(ctx context.Context, base64Str string, msgId *string, sessionId *string, question string)
code/handlers/msg.go:554
↓ 1 callers
Function
replyCardWithBackId
(ctx context.Context, msgId *string, cardContent string, )
code/handlers/msg.go:76
↓ 1 callers
Function
sendBalanceCard
(ctx context.Context, msgId *string, balance openai.BalanceResponse)
code/handlers/msg.go:732
↓ 1 callers
Function
sendClearCacheCheckCard
(ctx context.Context, sessionId *string, msgId *string)
code/handlers/msg.go:637
↓ 1 callers
Function
sendHelpCard
(ctx context.Context, sessionId *string, msgId *string)
code/handlers/msg.go:692
↓ 1 callers
Function
sendImageCard
(ctx context.Context, imageKey string, msgId *string, sessionId *string, question string)
code/handlers/msg.go:714
↓ 1 callers
Function
sendOnProcess
(a *ActionInfo)
code/handlers/event_msg_action.go:149
next →
1–100 of 192, ranked by callers