MCPcopy Create free account

hub / github.com/Hoshinonyaruko/Gensokyo-llm / functions

Functions763 in github.com/Hoshinonyaruko/Gensokyo-llm

↓ 2 callersMethodGetUserMemories
(userID int64)
applogic/app.go:614
↓ 2 callersMethodGetUserMemoriesSP
(userID string)
applogic/app.go:643
↓ 2 callersFunctionGetWenxinMaxOutputTokens
获取WenxinMaxOutputTokens
config/config.go:1105
↓ 2 callersFunctionGetWenxinTopp
获取WenxinTopp
config/config.go:1085
↓ 2 callersFunctionGetWithdrawCommand
获取WithdrawCommand
config/config.go:1247
↓ 2 callersFunctionGetWnxinPenaltyScore
获取WnxinPenaltyScore
config/config.go:1095
↓ 2 callersFunctionGetregion
获取region
config/config.go:80
↓ 2 callersMethodHandleExit
HandleExit 处理用户退出逻辑,包括发送消息和重置用户状态。
applogic/flow.go:327
↓ 2 callersFunctionHandler
(c *gin.Context, resp *http.Response)
relay/adaptor/openai/main.go:86
↓ 2 callersFunctionIncrementIndex
IncrementIndex 为给定的字符串递增索引
applogic/gensokyo.go:56
↓ 2 callersMethodInsert
(word, replaceText string)
acnode/acnode.go:74
↓ 2 callersMethodInsertQAEntry
InsertQAEntry 将新的问题和答案对插入到数据库中
applogic/embeddings.go:142
↓ 2 callersFunctionLoadBlacklist
LoadBlacklist 从给定的文件路径载入黑名单ID。 如果文件不存在,则创建该文件。
utils/blacklist.go:21
↓ 2 callersFunctionLoadConfig
(path string)
config/config.go:29
↓ 2 callersMethodMatchPositions
(text string)
acnode/acnode.go:217
↓ 2 callersFunctionNewChatCompletionsRequest
()
hunyuan/client.go:48
↓ 2 callersFunctionNewChatProRequest
()
hunyuan/client.go:132
↓ 2 callersFunctionNewChatStdRequest
()
hunyuan/client.go:216
↓ 2 callersFunctionNewGetEmbeddingRequest
()
hunyuan/client.go:302
↓ 2 callersFunctionParseMessageContent
(message interface{})
applogic/msgpraser.go:11
↓ 2 callersFunctionReplaceTextIn
ReplaceTextIn 使用给定的替换对列表对文本进行替换
utils/utils.go:3248
↓ 2 callersFunctionResetIndex
ResetIndex 重置或删除给定字符串的索引
applogic/gensokyo.go:72
↓ 2 callersFunctionSendGroupMessageMdPromptKeyboardSP
(groupID string, userID string, message string, selfid string, newmsg string, response string, promptstr strin
utils/utils.go:738
↓ 2 callersFunctionSendSSEPrivateRestoreMessage
SendSSEPrivateRestoreMessage 分割并发送重置消息的核心逻辑,直接遍历字符串
utils/utils.go:2713
↓ 2 callersFunctionSendSSEPrivateSafeMessage
SendSSEPrivateSafeMessage 分割并发送安全消息的核心逻辑,直接遍历字符串
utils/utils.go:2581
↓ 2 callersFunctionStreamHandler
(c *gin.Context, resp *http.Response)
relay/adaptor/openai/main.go:26
↓ 2 callersFunctioncalculateGroupID
(vector []float64)
applogic/embeddings.go:299
↓ 2 callersFunctioncheckMessageForHints
checkMessageForHints 检查消息中是否包含给定的提示词
applogic/gensokyo.go:84
↓ 2 callersFunctioncheckResponseThreshold
checkResponseThreshold 发送消息并根据返回值决定是否超过阈值
applogic/safecheck.go:28
↓ 2 callersFunctionchooseRandomContent
chooseRandomContent checks for '||' in the content string and randomly selects one option if present
prompt/prompt.go:151
↓ 2 callersFunctioncleanExpiredMessageIDs
cleanExpiredMessageIDs 清理指定user_id的已过期消息ID
utils/utils.go:3005
↓ 2 callersFunctioncleanExpiredMessageIDsSP
cleanExpiredMessageIDs 清理指定user_id的已过期消息ID
utils/utils.go:3016
↓ 2 callersMethoddeleteCustomRecordSP
(userID string)
applogic/promptstr.go:109
↓ 2 callersFunctiongetBaiduAccessTokenHelper
(apiKey string)
relay/adaptor/baidu/main.go:281
↓ 2 callersFunctiongetFileMd5
生成随机md5图片名,防止碰撞
server/uploadpic.go:235
↓ 2 callersFunctiongetRandomItem
(items []string)
applogic/env.go:157
↓ 2 callersFunctionhammingDistanceOptimized
计算两个二进制向量之间的汉明距离 如果向量长度不同,则比较它们的共同长度部分,并忽略较长向量的剩余部分。
applogic/embeddings.go:203
↓ 2 callersMethodinsertVectorData
将向量二值化和对应文本并存储到数据库 insertVectorData插入向量数据并返回新插入行的ID
applogic/embeddings.go:222
↓ 2 callersMethodinsertVectorDataSensitive
将向量二值化和对应文本并存储到数据库 insertVectorData插入向量数据并返回新插入行的ID
applogic/vectorsensitive.go:18
↓ 2 callersFunctionisPublicAddress
判断是否公网ip 填写域名也会被认为是公网,但需要用户自己确保域名正确解析到gensokyo所在的ip地址
server/uploadpic.go:359
↓ 2 callersFunctionloadFile
(filename string)
prompt/prompt.go:98
↓ 2 callersMethodsearchForSingleVector
searchForSingleVector函数根据单个向量搜索并返回按相似度排序的文本数组
applogic/embeddings.go:319
↓ 2 callersFunctionselectBasedOnSenceId
(envItems []string, senceId int)
applogic/env.go:112
↓ 2 callersFunctionsendDeleteRequest
sendDeleteRequest 发送删除消息的请求,并输出响应内容
utils/utils.go:3059
↓ 2 callersFunctionsha256hex
(s string)
relay/adaptor/tencent/main.go:182
↓ 2 callersFunctionshouldAuth
()
common/message/email.go:16
↓ 2 callersFunctionstripPrefix
(s string)
applogic/env.go:140
↓ 2 callersMethodupdateConversationTitle
(userID int64, conversationID, parentMessageID, newTitle string)
applogic/app.go:524
↓ 2 callersMethodupdateConversationTitleSP
(userID string, conversationID, parentMessageID, newTitle string)
applogic/app.go:540
↓ 1 callersFunctionAddSelfID
AddSelfID 添加一个 ID 到全局切片中
server/server.go:40
↓ 1 callersMethodAddSingleContext
直接根据缓存来储存上下文 其实向量缓存是一个单轮的QA缓存,因为这个项目很初步,很显然无法应对上下文场景的缓存 通过这种方式,将每次缓存的内容也加入上下文,可能会有一个初步的效果提升.
applogic/singlecontext.go:13
↓ 1 callersMethodAddSingleContextSP
直接根据缓存来储存上下文 其实向量缓存是一个单轮的QA缓存,因为这个项目很初步,很显然无法应对上下文场景的缓存 通过这种方式,将每次缓存的内容也加入上下文,可能会有一个初步的效果提升.
applogic/singlecontext.go:55
↓ 1 callersFunctionAdjustMessageOrder
(messages []relaymodel.Message)
relay/adaptor/tencent/constants.go:77
↓ 1 callersMethodApplyPromptChanceQ
ApplyPromptChanceQ 应用promptChanceQ的逻辑,动态修改requestmsg
applogic/flow.go:553
↓ 1 callersMethodApplyPromptChoiceA
ApplyPromptChoiceA 应用故事模式的情绪增强逻辑,并返回增强内容。
applogic/flow.go:472
↓ 1 callersFunctionApplyReplaceTextOutToKeyboardPrompts
(keyboardPrompts []string, promptstr string)
promptkb/promptkb.go:145
↓ 1 callersMethodApplySwitchOnA
ApplySwitchOnA 应用switchOnA的逻辑,动态修改promptstr
applogic/flow.go:401
↓ 1 callersMethodApplySwitchOnQ
ApplySwitchOnQ 应用switchOnQ的逻辑,动态修改promptstr
applogic/flow.go:199
↓ 1 callersFunctionBase64Encode
(data []byte)
relay/adaptor/ali/image.go:190
↓ 1 callersFunctionBlacklistIntercept
BlacklistIntercept 检查用户ID是否在黑名单中,如果在,则发送预设消息
utils/blacklist.go:96
↓ 1 callersFunctionBlacklistInterceptSP
BlacklistIntercept 检查用户ID是否在黑名单中,如果在,则发送预设消息
utils/blacklist.go:141
↓ 1 callersMethodBuildFailPointer
()
acnode/acnode.go:87
↓ 1 callersMethodCalculateTextEmbeddingHunyuan
CalculateTextEmbedding 调用混元-Embedding接口将文本转换为向量表示。
applogic/embeddings.go:89
↓ 1 callersMethodChatCompletions
ChatCompletions 腾讯混元大模型是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。 1. 本接口暂不支持返回图片内容。 2. 默认每种模型单账号限制并发数为 5 路,如您
hunyuan/client.go:88
↓ 1 callersMethodChatCompletionsWithContext
ChatCompletions 腾讯混元大模型是由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力。本接口支持流式或非流式调用,当使用流式调用时为 SSE 协议。 1. 本接口暂不支持返回图片内容。 2. 默认每种模型单账号限制并发数为 5 路,如您
hunyuan/client.go:116
↓ 1 callersMethodChatPro
ChatPro <span style="font-size:1.5em;">注意:本接口将于 5 月 15 日下线;下线后将不再提供文档指引,接口本身可继续调用,建议使用 [hunyuan](https://cloud.tencent.com/document/api/1729/105701) 接
hunyuan/client.go:172
↓ 1 callersMethodChatProWithContext
ChatPro <span style="font-size:1.5em;">注意:本接口将于 5 月 15 日下线;下线后将不再提供文档指引,接口本身可继续调用,建议使用 [hunyuan](https://cloud.tencent.com/document/api/1729/105701) 接
hunyuan/client.go:200
↓ 1 callersMethodChatStdWithContext
ChatStd <span style="font-size:1.5em;">注意:本接口将于 5 月 15 日下线;下线后将不再提供文档指引,接口本身可继续调用,建议使用 [hunyuan](https://cloud.tencent.com/document/api/1729/105701) 接
hunyuan/client.go:286
↓ 1 callersFunctionCloseAllConnections
()
server/server.go:244
↓ 1 callersFunctionContainsRune
随机的分布发送
utils/utils.go:175
↓ 1 callersFunctionContainsRuneSP
随机的分布发送
utils/utils.go:199
↓ 1 callersFunctionConvertImageRequest
(request model.ImageRequest)
relay/adaptor/ali/main.go:72
↓ 1 callersFunctionConvertRequest
(request model.GeneralOpenAIRequest)
relay/adaptor/ali/main.go:24
↓ 1 callersFunctionConvertRequest
(request model.GeneralOpenAIRequest)
relay/adaptor/zhipu/main.go:79
↓ 1 callersFunctionConvertRequest
(request model.GeneralOpenAIRequest)
relay/adaptor/tencent/main.go:30
↓ 1 callersFunctionConvertRequest
(request model.GeneralOpenAIRequest)
relay/adaptor/baidu/main.go:57
↓ 1 callersMethodConvertRequest
(c *gin.Context, request *model.GeneralOpenAIRequest)
relay/adaptor/interface.go:15
↓ 1 callersFunctionDebug
(ctx context.Context, msg string)
common/logger/logger.go:64
↓ 1 callersFunctionDebugf
(ctx context.Context, format string, a ...any)
common/logger/logger.go:82
↓ 1 callersFunctionDeleteLatestMessage
(messageType string, id int64, userid int64, selfid string)
utils/utils.go:3085
↓ 1 callersFunctionDeleteLatestMessageSP
(messageType string, id string, userid string, selfid string)
utils/utils.go:3148
↓ 1 callersFunctionDoRequest
(c *gin.Context, req *http.Request)
relay/adaptor/common.go:57
↓ 1 callersMethodDoRequest
(c *gin.Context, requestBody io.Reader)
relay/adaptor/interface.go:17
↓ 1 callersMethodDoResponse
(c *gin.Context, resp *http.Response)
relay/adaptor/interface.go:18
↓ 1 callersMethodEnsureCustomTableExist
()
applogic/app.go:181
↓ 1 callersMethodEnsureCustomTableExistSP
()
applogic/app.go:207
↓ 1 callersMethodEnsureEmbeddingsTablesExist
问题Q 向量表
applogic/app.go:81
↓ 1 callersMethodEnsureQATableExist
()
applogic/app.go:140
↓ 1 callersMethodEnsureSensitiveWordsTableExists
敏感词表
applogic/app.go:112
↓ 1 callersMethodEnsureTablesExist
()
applogic/app.go:34
↓ 1 callersMethodEnsureUserContextTableExists
()
applogic/app.go:233
↓ 1 callersMethodEnsureUserContextTableExistsSP
()
applogic/app.go:266
↓ 1 callersMethodEnsureUserMemoriesTableExists
记忆表
applogic/app.go:466
↓ 1 callersFunctionError
(ctx context.Context, msg string)
common/logger/logger.go:78
↓ 1 callersFunctionErrorf
(ctx context.Context, format string, a ...any)
common/logger/logger.go:94
↓ 1 callersFunctionFatalLog
(v ...any)
common/logger/logger.go:112
↓ 1 callersFunctionFetchAndStoreUserIDs
构造 URL 并请求数据
utils/utils.go:82
↓ 1 callersFunctionFilterSystemMessages
FilterSystemMessages - 保留字数最多的一个 system 角色
relay/adaptor/tencent/constants.go:37
↓ 1 callersFunctionFloat64
(env string, defaultValue float64)
common/env/helper.go:26
↓ 1 callersFunctionGenRequestID
()
common/helper/helper.go:106
← previousnext →201–300 of 763, ranked by callers