MCPcopy Create free account

hub / github.com/ConnectAI-E/Feishu-OpenAI-Stream-Chatbot / functions

Functions192 in github.com/ConnectAI-E/Feishu-OpenAI-Stream-Chatbot

↓ 15 callersMethodClose
()
code/utils/audio/wav.go:84
↓ 14 callersFunctiongetViperStringValue
(key string, defaultValue string)
code/initialization/config.go:104
↓ 13 callersFunctionwriteLe
(w io.Writer, data T)
code/utils/audio/wav.go:68
↓ 11 callersFunctionwithMainMd
withMainMd 用于生成markdown消息体
code/handlers/msg.go:204
↓ 11 callersFunctionwithNote
withNote 用于生成纯文本脚注
code/handlers/msg.go:194
↓ 10 callersFunctionnewSendCard
(header *larkcard.MessageCardHeader, elements ...larkcard.MessageCardElement)
code/handlers/msg.go:108
↓ 10 callersFunctionwithHeader
withHeader 用于生成消息头
code/handlers/msg.go:179
↓ 7 callersFunctionreplyCard
(ctx context.Context, msgId *string, cardContent string, )
code/handlers/msg.go:48
↓ 6 callersFunctionNewChatGPT
(config initialization.Config)
code/services/openai/common.go:208
↓ 6 callersFunctionnewBtn
(content string, value map[string]interface{}, typename larkcard.MessageCardButtonType)
code/handlers/msg.go:273
↓ 5 callersFunctionprocessMessage
(msg interface{})
code/handlers/common.go:32
↓ 5 callersMethodsendRequestWithBodyType
(link, method string, bodyType requestBodyType, requestBody interface{}, responseBody interface{})
code/services/openai/common.go:170
↓ 4 callersMethodClear
(userId string)
code/services/msgCache.go:14
↓ 4 callersMethodWrite
(data []byte)
code/utils/audio/wav.go:72
↓ 4 callersFunctiongetViperBoolValue
(key string, defaultValue bool)
code/initialization/config.go:136
↓ 4 callersFunctiongetViperIntValue
(key string, defaultValue int)
code/initialization/config.go:123
↓ 4 callersFunctionprintErrorMessage
(a *ActionInfo, msg []openai.Messages, err error)
code/handlers/event_msg_action.go:145
↓ 4 callersFunctionupdateFinalCard
( ctx context.Context, msg string, msgId *string, )
code/handlers/msg.go:678
↓ 3 callersMethodGenerateOneImage
(prompt string, size string)
code/services/openai/picture.go:59
↓ 3 callersMethodSetMsg
(sessionId string, msg []openai.Messages)
code/services/sessionCache.go:39
↓ 3 callersFunctionnewMenu
( placeHolder string, value map[string]interface{}, options ...MenuOption, )
code/handlers/msg.go:285
↓ 3 callersFunctionnewSendCardWithOutHeader
( elements ...larkcard.MessageCardElement)
code/handlers/msg.go:128
↓ 3 callersFunctionprocessNewLine
(msg string)
code/handlers/common.go:47
↓ 3 callersFunctionwithMainText
withMainText 用于生成纯文本消息体
code/handlers/msg.go:222
↓ 3 callersFunctionwithSplitLine
withSplitLine 用于生成分割线
code/handlers/msg.go:172
↓ 2 callersFunctionCalcTokenLength
(text string)
code/services/chatgpt/tokenizer.go:9
↓ 2 callersFunctionConvertToRGBA
(inputFilePath string, outputFilePath string)
code/services/openai/picture.go:197
↓ 2 callersMethodGenerateOneImageVariation
(images string, size string)
code/services/openai/picture.go:97
↓ 2 callersMethodGetBalance
()
code/services/openai/billing.go:36
↓ 2 callersFunctionPatchCard
(ctx context.Context, msgId *string, cardContent string)
code/handlers/msg.go:606
↓ 2 callersMethodSetAvailability
(key string, available bool)
code/services/loadbalancer/loadbalancer.go:67
↓ 2 callersMethodSetPicResolution
(sessionId string, resolution Resolution)
code/services/sessionCache.go:42
↓ 2 callersFunctionVerifyPngs
(pngPaths []string)
code/services/openai/picture.go:154
↓ 2 callersFunctionreplyMsg
(ctx context.Context, msg string, msgId *string)
code/handlers/msg.go:457
↓ 2 callersFunctionsendMsg
(ctx context.Context, msg string, chatId *string)
code/handlers/msg.go:570
↓ 2 callersFunctionsendSystemInstructionCard
(ctx context.Context, sessionId *string, msgId *string, content string)
code/handlers/msg.go:647
↓ 1 callersMethodAudioToText
(audio string)
code/services/openai/audio.go:50
↓ 1 callersFunctionCheckAllowAccess
(userId *string)
code/services/accesscontrol/access_control.go:38
↓ 1 callersFunctionCommonProcessClearCache
(cardMsg CardMsg, session services.SessionServiceCacheInterface)
code/handlers/card_clear_action.go:22
↓ 1 callersFunctionCommonProcessPicModeChange
(cardMsg CardMsg, session services.SessionServiceCacheInterface)
code/handlers/card_pic_action.go:64
↓ 1 callersMethodCommonProcessPicMore
(msg CardMsg)
code/handlers/card_pic_action.go:54
↓ 1 callersFunctionCommonProcessPicResolution
(msg CardMsg, cardAction *larkcard.CardAction, cache services.SessionServiceCacheInterface)
code/handlers/card_pic_action.go:43
↓ 1 callersFunctionCommonProcessRole
(msg CardMsg, cardAction *larkcard.CardAction, cache services.SessionServiceCacheInterface)
code/handlers/card_role_action.go:56
↓ 1 callersFunctionCommonProcessRoleTag
(msg CardMsg, cardAction *larkcard.CardAction, cache services.SessionServiceCacheInterface)
code/handlers/card_role_action.go:43
↓ 1 callersMethodCompletions
(msg []Messages)
code/services/openai/gpt3.go:44
↓ 1 callersFunctionEitherCutPrefix
(s string, prefix ...string)
code/utils/strings.go:12
↓ 1 callersFunctionEitherTrimEqual
(s string, prefix ...string)
code/utils/strings.go:30
↓ 1 callersMethodExecute
(a *ActionInfo)
code/handlers/event_common_action.go:31
↓ 1 callersMethodFullUrl
(suffix string)
code/services/openai/common.go:239
↓ 1 callersMethodGenerateImage
(prompt string, size string, n int)
code/services/openai/picture.go:35
↓ 1 callersMethodGenerateImageVariation
(images string, size string, n int)
code/services/openai/picture.go:73
↓ 1 callersMethodGetAPI
()
code/services/loadbalancer/loadbalancer.go:31
↓ 1 callersFunctionGetImageCompressionType
(path string)
code/services/openai/picture.go:276
↓ 1 callersMethodGetMsg
(sessionId string)
code/services/sessionCache.go:38
↓ 1 callersMethodGetPicResolution
(sessionId string)
code/services/sessionCache.go:43
↓ 1 callersFunctionGetProxyClient
(proxyString string)
code/services/openai/common.go:187
↓ 1 callersMethodIfProcessed
(msgId string)
code/services/msgCache.go:12
↓ 1 callersFunctionLoadConfig
* 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 callersFunctionNewCardHandler
(m MessageHandler)
code/handlers/card_common_action.go:17
↓ 1 callersFunctionNewEncoder
(w io.WriteSeeker, sampleRate int, bitDepth int)
code/utils/audio/wav.go:100
↓ 1 callersFunctionNewMessageHandler
(gpt *openai.ChatGPT, config initialization.Config)
code/handlers/handler.go:112
↓ 1 callersFunctionOggToWav
(input io.Reader, output io.WriteSeeker)
code/utils/audio/ogg.go:29
↓ 1 callersFunctionSendRoleListCard
(ctx context.Context, sessionId *string, msgId *string, roleTag string, roleList []string)
code/handlers/msg.go:756
↓ 1 callersFunctionSendRoleTagsCard
(ctx context.Context, sessionId *string, msgId *string, roleTags []string)
code/handlers/msg.go:747
↓ 1 callersMethodSetAvailabilityForAll
(available bool)
code/services/loadbalancer/loadbalancer.go:90
↓ 1 callersMethodSetMode
(sessionId string, mode SessionMode)
code/services/sessionCache.go:40
↓ 1 callersMethodStreamChat
()
code/services/chatgpt/gpt3.go:23
↓ 1 callersMethodStreamChat
(ctx context.Context, msg []customOpenai.Messages, responseStream chan string)
code/services/chatgpt/gpt3.go:31
↓ 1 callersMethodStreamChatWithHistory
(ctx context.Context, msg []openai.ChatCompletionMessage, maxTokens int, responseStream chan string, )
code/services/chatgpt/gpt3.go:46
↓ 1 callersMethodTagProcessed
(msgId string)
code/services/msgCache.go:13
↓ 1 callersMethodWriteHeader
()
code/utils/audio/wav.go:16
↓ 1 callersFunctionaudioMultipartForm
(request AudioToTextRequestBody, w *multipart.Writer)
code/services/openai/audio.go:21
↓ 1 callersMethodcardHandler
(ctx context.Context, cardAction *larkcard.CardAction)
code/handlers/init.go:14
↓ 1 callersFunctionchain
责任链
code/handlers/handler.go:18
↓ 1 callersFunctioncleanTextBlock
(msg string)
code/handlers/common.go:67
↓ 1 callersMethoddoAPIRequestWithRetry
(url, method string, bodyType requestBodyType, requestBody interface{}, responseBody interface{}, client *ht
code/services/openai/common.go:55
↓ 1 callersFunctionenableLog
()
code/main.go:74
↓ 1 callersFunctionfilterFormatKey
过滤出 "sk-" 开头的 key
code/initialization/config.go:172
↓ 1 callersFunctiongetStrPoolTotalLength
(strPool []openai.Messages)
code/services/sessionCache.go:146
↓ 1 callersFunctiongetViperStringArray
OPENAI_KEY: sk-xxx,sk-xxx,sk-xxx result:[sk-xxx sk-xxx sk-xxx]
code/initialization/config.go:114
↓ 1 callersFunctionjudgeChatType
(event *larkim.P2MessageReceiveV1)
code/handlers/init.go:62
↓ 1 callersMethodjudgeIfMentionMe
(mention []*larkim. MentionEvent)
code/handlers/handler.go:122
↓ 1 callersFunctionjudgeMsgType
(event *larkim.P2MessageReceiveV1)
code/handlers/handler.go:40
↓ 1 callersFunctionloadCertificate
(config Config)
code/initialization/gin.go:14
↓ 1 callersFunctionmsgFilter
func sendCard
code/handlers/common.go:12
↓ 1 callersMethodmsgReceivedHandler
(ctx context.Context, event *larkim.P2MessageReceiveV1)
code/handlers/init.go:13
↓ 1 callersFunctionnewSimpleSendCard
( elements ...larkcard.MessageCardElement)
code/handlers/msg.go:149
↓ 1 callersFunctionparseContent
(content string)
code/handlers/common.go:18
↓ 1 callersFunctionparseFileKey
(content string)
code/handlers/common.go:74
↓ 1 callersFunctionparseImageKey
(content string)
code/handlers/common.go:88
↓ 1 callersFunctionpictureMultipartForm
(request ImageVariantRequestBody, w *multipart.Writer)
code/services/openai/picture.go:106
↓ 1 callersFunctionprocessQuote
(msg string)
code/handlers/common.go:52
↓ 1 callersFunctionprocessUnicode
将字符中 \u003c 替换为 < 等等
code/handlers/common.go:57
↓ 1 callersFunctionreplayImageCardByBase64
(ctx context.Context, base64Str string, msgId *string, sessionId *string, question string)
code/handlers/msg.go:554
↓ 1 callersFunctionreplyCardWithBackId
(ctx context.Context, msgId *string, cardContent string, )
code/handlers/msg.go:76
↓ 1 callersFunctionsendBalanceCard
(ctx context.Context, msgId *string, balance openai.BalanceResponse)
code/handlers/msg.go:732
↓ 1 callersFunctionsendClearCacheCheckCard
(ctx context.Context, sessionId *string, msgId *string)
code/handlers/msg.go:637
↓ 1 callersFunctionsendHelpCard
(ctx context.Context, sessionId *string, msgId *string)
code/handlers/msg.go:692
↓ 1 callersFunctionsendImageCard
(ctx context.Context, imageKey string, msgId *string, sessionId *string, question string)
code/handlers/msg.go:714
↓ 1 callersFunctionsendOnProcess
(a *ActionInfo)
code/handlers/event_msg_action.go:149
next →1–100 of 192, ranked by callers