MCPcopy Create free account

hub / github.com/congde/emotional_chat / functions

Functions1,867 in github.com/congde/emotional_chat

Methoddescription
(self)
backend/agent/memory_store.py:89
Functiondetect_intent
快速检测意图(仅返回意图类型) Args: text: 输入文本 intent_service: 意图服务实例 Returns: 意图识别结果
backend/modules/intent/routers/intent_router.py:78
Methoddfs
(task_id: str)
backend/modules/agent/core/agent/planner.py:344
Methoddfs
(task_id: str)
backend/agent/planner.py:344
Methoddisable
禁用模块
backend/runtime/config/toggles.py:137
Methoddisconnect
断开数据库连接
backend/core/interfaces.py:271
Methoddispatch
(self, request: Request, call_next)
backend/main.py:79
Methoddispatch
处理请求并捕获错误
backend/middleware/error_handler.py:27
Methoddispatch
处理请求并记录日志
backend/middleware/logging_middleware.py:25
Methoddispatch_tool_use_failure
分发 tool_use_failure 事件
backend/runtime/hooks/base.py:189
Methoddistill_turn
蒸馏一轮对话为 L3/L4 记忆更新 Args: digest: TurnDigest user_store: L3 用户偏好存储 agent_instance_store: L4 Agent
backend/runtime/activity/distiller.py:72
Functiondowngrade
删除所有表
alembic/versions/001_initial_schema.py:138
Functiondowngrade
删除response_evaluations表
alembic/versions/002_add_response_evaluation.py:71
Functiondowngrade
将 extra_metadata 列重命名回 metadata
alembic/versions/003_rename_metadata_to_extra_metadata.py:62
Methodemotion_to_polarity
(emotion)
backend/services/emotion_trend_analyzer.py:166
Methodenable
启用模块
backend/runtime/config/toggles.py:133
Functionenhanced_chat
增强版聊天接口 功能包括: - 短期记忆滑动窗口 + 关键轮次保留 - 长期记忆向量检索 + 时间衰减 - 动态用户画像构建 - 主动回忆与情感追踪
backend/routers/enhanced_chat.py:26
Methodestimate_tokens
(messages: List[Dict[str, Any]])
backend/services/enhanced_memory_manager.py:109
Functionevaluate_response
评估单个回应 使用LLM作为裁判,从共情程度、自然度、安全性三个维度评分
backend/main.py:715
Functionevaluate_response
评估单个回应 使用LLM作为裁判,从共情程度、自然度、安全性三个维度评分
backend/routers/evaluation.py:27
Functionevaluate_single_response
便捷函数:评估单个回应
backend/evaluation_engine.py:500
Methodevaluation_engine
获取评估引擎实例
backend/dependencies.py:63
Functionevent_loop
创建事件循环
backend/tests/__init__.py:24
Functionexample_1_basic_usage
示例1:基础用法
examples/response_generation_example.py:26
Functionexample_2_with_history
示例2:带对话历史
examples/response_generation_example.py:58
Functionexample_3_with_memory
示例3:结合记忆检索
examples/response_generation_example.py:100
Functionexample_4_user_profile
示例4:使用用户画像
examples/response_generation_example.py:147
Functionexample_5_crisis_intervention
示例5:危机干预
examples/response_generation_example.py:188
Functionexample_6_complete_pipeline
示例6:完整处理流程
examples/response_generation_example.py:227
Functionexample_7_statistics
示例7:统计信息
examples/response_generation_example.py:289
Methodexecute
执行天气查询
backend/plugins/weather_plugin.py:73
Methodexecute
执行节假日查询
backend/plugins/holiday_plugin.py:106
Methodexecute
执行插件功能 Args: **kwargs: 插件参数 Returns: 执行结果字典
backend/plugins/base_plugin.py:29
Methodexecute
执行记忆操作 Args: context: 执行上下文 **kwargs: mode: "retrieve" | "encode" | "consolidate" (默认 "retri
backend/runtime/skills/memory_skill.py:59
Methodexecute
执行情感分析 Args: context: 包含 user_input 的上下文 Returns: SkillResult,output 包含 emotion_data: {
backend/runtime/skills/emotion_skill.py:61
Methodexecute
执行工具调用 Args: context: 执行上下文 **kwargs: tool_name: 工具名称 tool_args: 工具参数
backend/runtime/skills/tool_skill.py:64
Methodexecute
执行任务规划 Args: context: 包含 user_input, emotion_data, memories 的上下文 Returns: SkillResult,output 包含 Exe
backend/runtime/skills/planning_skill.py:110
Methodexecute
执行反思评估 Args: context: 执行上下文 **kwargs: mode: "evaluate" | "followup" (默认 "evaluate")
backend/runtime/skills/reflect_skill.py:70
Methodexecute
(self, name: str, args: dict)
backend/runtime/protocols/tool_executor.py:41
Methodexecute
执行工具调用
backend/agent/agent_core_v2.py:107
Methodexecute_query
执行查询
backend/core/interfaces.py:281
Methodexecute_transaction
执行事务
backend/core/interfaces.py:286
Methodexpand_tool_call
展开压缩的工具调用 - 从外部存储恢复 Args: compacted_call: 压缩后的工具调用 Returns: 恢复后的完整工具调用
backend/services/context_rot_solver.py:90
Methodexport_logs
导出日志到文件 Args: output_file: 输出文件路径
backend/modules/agent/protocol/mcp.py:674
Functionextract_emails
从文本中提取邮箱
backend/core/utils/helpers.py:284
Methodextract_memories
从对话中提取记忆条目 Args: user_message: 用户消息 bot_response: 机器人回复 emotion: 检测到的情绪 emot
backend/memory_extractor.py:47
Methodextract_memories
从文本中提取记忆 Args: text: 输入文本 emotion: 情绪信息 Returns: 提取的记忆列表
backend/modules/llm/services/llm_service.py:254
Functionextract_phone_numbers
从文本中提取手机号
backend/core/utils/helpers.py:290
Functionextract_urls
从文本中提取URL
backend/core/utils/helpers.py:278
Functionfavicon
处理favicon请求,返回空响应
backend/main.py:206
Functionflatten_dict
扁平化嵌套字典
backend/core/utils/helpers.py:135
Methodforce_terminal
Force transition to TERMINATED regardless of current state. Used for emergency shutdown — bypasses transition validation.
backend/runtime/session/fsm.py:164
FunctionformatDuration
(seconds)
frontend/src/components/MultimodalInput.js:258
FunctionformatFileSize
(bytes)
frontend/src/utils/formatters.js:56
FunctionformatTimestamp
(date)
frontend/src/utils/formatters.js:2
Functionformat_config_info
格式化配置信息(隐藏敏感信息)
backend/core/utils/formatters.py:340
Functionformat_emotion_result
格式化情绪分析结果
backend/core/utils/formatters.py:91
Functionformat_evaluation_result
格式化评估结果
backend/core/utils/formatters.py:226
Functionformat_feedback_info
格式化反馈信息
backend/core/utils/formatters.py:245
Functionformat_health_check
格式化健康检查结果
backend/core/utils/formatters.py:320
Functionformat_log_entry
格式化日志条目
backend/core/utils/formatters.py:358
Functionformat_memory_info
格式化记忆信息
backend/core/utils/formatters.py:152
Functionformat_pagination_info
格式化分页信息
backend/core/utils/formatters.py:298
Functionformat_rag_result
格式化RAG结果
backend/core/utils/formatters.py:202
Functionformat_session_info
格式化会话信息
backend/core/utils/formatters.py:129
Functionformat_statistics
格式化统计信息
backend/core/utils/formatters.py:272
Functionformat_user_profile
格式化用户档案
backend/core/utils/formatters.py:175
Methodfrom_dict
从字典创建
backend/context_assembler.py:68
Methodfrom_json
从JSON字符串创建MCP消息
backend/modules/agent/protocol/mcp.py:190
Methodfunction_schema
返回 Function Calling 的 JSON Schema
backend/plugins/news_plugin.py:99
Methodfunction_schema
返回 Function Calling 的 JSON Schema
backend/plugins/weather_plugin.py:48
Methodfunction_schema
返回 Function Calling 的 JSON Schema
backend/plugins/holiday_plugin.py:47
Methodfunction_schema
返回该插件对应的 Function Calling Schema 必须由子类实现
backend/plugins/base_plugin.py:21
Methodgenerate_context_summary
生成上下文摘要(用于日志和调试) Args: context: 上下文数据 Returns: 摘要文本
backend/context_assembler.py:360
Methodgenerate_empathetic_response
生成共情回应
backend/emotion_analyzer.py:159
Functiongenerate_evaluation_report
生成评估报告 汇总统计信息,提供优化建议
backend/main.py:1043
Functiongenerate_evaluation_report
生成评估报告
backend/routers/evaluation.py:345
Methodgenerate_response
生成回复 Args: user_message: 用户消息 context: 上下文信息 personality: 机器人个性 **kwargs: 其他
backend/modules/llm/services/llm_service.py:313
Functiongenerate_session_id
生成会话ID
backend/core/utils/helpers.py:26
Functiongenerate_short_code
生成短码
backend/core/utils/helpers.py:36
Methodgenerate_stream
()
backend/services/optimized_chat_service.py:108
Methodgenerate_tts_response
生成语音回复 Args: text: 要合成的文本 emotion: 目标情感 Returns: 包含音频文件路径等信息的字典
backend/modules/multimodal/core/multimodal_processor.py:217
Functiongenerate_user_id
生成用户ID
backend/core/utils/helpers.py:31
Methodget
(self, key, default=None)
backend/core/utils/dependency_injection.py:222
MethodgetFeedbackStatistics
()
frontend/src/services/ChatAPI.js:114
FunctiongetFileIcon
(fileType)
frontend/src/utils/fileUtils.js:43
FunctiongetGreeting
()
frontend/src/components/ChatContainer.js:199
MethodgetSessionSummary
(sessionId)
frontend/src/services/ChatAPI.js:150
Methodget_active_experiments
获取所有活跃的实验
backend/ab_testing/ab_test_manager.py:247
Functionget_active_streams
获取活跃流信息 Returns: 活跃流列表
backend/routers/performance.py:113
Functionget_agent_core
获取全局 AgentCore 实例
backend/agent/agent_core_v2.py:696
Functionget_agent_service
获取全局AgentService实例
backend/modules/agent/services/agent_service.py:197
Functionget_agent_service
获取全局AgentService实例
backend/services/agent_service.py:197
Functionget_agent_status
获取Agent状态 返回Agent各模块的运行状态和统计信息
backend/modules/agent/routers/agent_router.py:61
Functionget_agent_status
获取Agent状态 返回Agent各模块的运行状态和统计信息
backend/routers/agent.py:61
Methodget_agent_status
获取Agent状态 Returns: 状态信息
backend/modules/agent/services/agent_service.py:70
Methodget_agent_status
获取Agent状态 Returns: 状态信息
backend/services/agent_service.py:70
Methodget_agent_status
获取 Agent 状态
backend/agent/agent_core_v2.py:650
Methodget_all_registered
获取所有已注册的服务
backend/core/utils/dependency_injection.py:129
Methodget_ancestors
获取所有祖先会话
backend/runtime/session/lineage.py:58
← previousnext →1,301–1,400 of 1,867, ranked by callers