MCPcopy Create free account

hub / github.com/congde/emotional_chat / functions

Functions1,867 in github.com/congde/emotional_chat

Functionsafe_set
安全设置嵌套字典的值
backend/core/utils/helpers.py:182
Functionsample_action_old_style
旧代码风格(注释不准确) 注意:虽然代码功能相同,但注释容易误导
examples/action_sampling_example.py:29
Functionsample_chat_request
示例聊天请求
backend/tests/__init__.py:90
Functionsample_chat_response
示例聊天响应
backend/tests/__init__.py:104
Functionsample_memory
示例记忆
backend/tests/__init__.py:125
Functionsample_rag_result
示例RAG结果
backend/tests/__init__.py:142
Functionsanitize_input
清理输入文本
backend/core/utils/validators.py:303
Methodsanitize_input
清理输入
backend/core/interfaces.py:363
Methodsave
保存会话状态到检查点
backend/runtime/session/resume.py:29
Methodsave_knowledge
保存知识
backend/database.py:431
Methodscope
(self)
backend/agent/memory_store.py:85
Methodsearch_emotion_patterns
搜索情感模式
backend/vector_store.py:146
Functionsearch_knowledge
搜索知识库 只返回相关知识片段,不生成回答
backend/modules/rag/routers/rag_router.py:313
Methodsearch_knowledge
搜索知识
backend/database.py:443
Methodsearch_knowledge
搜索知识库
backend/vector_store.py:124
Methodsearch_knowledge
搜索知识库
backend/core/interfaces.py:183
Functionsearch_memories
搜索相关记忆 Args: user_id: 用户ID query: 搜索查询 n_results: 返回数量 days_limit: 时间限制(天数)
backend/routers/memory.py:75
Functionsearch_mental_health_resources
检索专业心理文章,提供知识支持 Args: query: 搜索关键词 resource_type: 资源类型("article"/"video"/"exercise"),可选 Returns: {
backend/agent/tools/agent_tools.py:343
Functionsearch_user_sessions
搜索用户会话
backend/routers/chat.py:179
Functionsecurity_txt
处理security.txt请求
backend/main.py:220
MethodsendMessage
(data)
frontend/src/services/ChatAPI.js:7
MethodsendMessageWithAttachments
(formData)
frontend/src/services/ChatAPI.js:21
MethodsendMultimodalMessage
(data)
frontend/src/services/ChatAPI.js:267
Functionsend_follow_up_message
发送回访消息,验证效果 Args: user_id: 用户ID days_ago: 回访几天前的对话,默认1天前 custom_message: 自定义消息内容(可选) Returns:
backend/agent/tools/agent_tools.py:422
Methodsession_id
(self)
backend/runtime/conversation/_lifecycle.py:154
Methodsession_store
L5 会话级 Store
backend/agent/memory_hub.py:196
Methodset_base_identity
覆盖基础身份
backend/runtime/prompt_builder.py:73
Functionset_daily_reminder
设置每日提醒,养成作息习惯 Args: time: 提醒时间,格式 "HH:MM" 或 "HH:MM:SS" message: 提醒消息内容 user_id: 用户ID Returns:
backend/agent/tools/agent_tools.py:284
Methodset_memory_block
设置记忆注入块
backend/runtime/prompt_builder.py:77
Methodset_turn_context
更新 L6 当轮上下文(虚拟层,不持久化)
backend/agent/memory_hub.py:411
Methodshould_stop
是否已达到硬限制
backend/runtime/budget/pressure.py:83
Methodskill_count
(self)
backend/runtime/skills/base.py:227
Methodskill_names
(self)
backend/runtime/skills/base.py:231
Methodskill_registry
(self)
backend/runtime/conversation/_lifecycle.py:174
Methodsnapshot
获取运行时当前状态快照 Returns: 包含 FSM 状态、Skill 状态、Token 使用等的字典
backend/runtime/conversation/_snapshot.py:21
Methodsplit_documents
分割文档列表 Args: documents: 文档列表 strategy: 策略名称,如果为None则自动选择 Returns: 分
backend/modules/rag/core/chunking_selector.py:231
Methodsplit_documents
分割文档列表
backend/modules/rag/core/chunking_strategies.py:72
Methodsplit_documents
分割文档列表
backend/modules/rag/core/chunking_strategies.py:135
Methodsplit_documents
分割文档列表
backend/modules/rag/core/chunking_strategies.py:297
Methodsplit_documents
分割文档,同时生成小块和大块 Returns: 文档块列表,包含小块(用于索引)和大块(用于上下文)
backend/modules/rag/core/chunking_strategies.py:506
Methodsplit_documents
分割文档,创建父子块结构 Returns: 文档块列表,包含父块和子块,通过parent_id关联
backend/modules/rag/core/chunking_strategies.py:587
Methodstate
(self)
backend/runtime/session/fsm.py:128
Methodstore_id
(self)
backend/agent/memory_store.py:81
Methodstream_chat_completion
流式聊天补全
backend/modules/llm/providers/anthropic_provider.py:103
Methodstream_chat_completion
流式聊天补全
backend/modules/llm/providers/openai_provider.py:110
Methodstream_chat_completion
流式聊天补全 Args: messages: 消息列表 model: 模型名称 temperature: 温度参数 max_tokens: 最大令牌数
backend/modules/llm/providers/base_provider.py:61
Methodstream_chat_completion
流式聊天补全 Args: messages: 消息列表 model: 模型名称 temperature: 温度参数 max_tokens: 最大令牌数
backend/modules/llm/services/llm_service.py:143
Methodstream_turn
流式调用 LLM,返回 AsyncIterator[AssistantEvent]
backend/runtime/protocols/llm_client.py:48
Methodstream_turn
流式输出 — 返回 async generator
backend/agent/agent_core_v2.py:48
Functionstreaming_chat
流式聊天接口 Args: request: 聊天请求,包含message、session_id、user_id等 Returns: 流式响应,使用Server-Sent Events格式
backend/routers/streaming_chat.py:26
Functionstreaming_chat_with_metadata
带元数据的流式聊天 Args: request: 聊天请求,包含消息和元数据 Returns: 包含元数据的流式响应
backend/routers/streaming_chat.py:64
Functionstreaming_info
流式服务信息 Returns: 流式服务相关信息
backend/routers/streaming_chat.py:266
Functionstrip_budget_warnings
移除消息中的预算警告标记 在每个 turn 开始时调用,确保上一 turn 的预算警告不会 影响当前 turn 的 LLM 上下文。
backend/runtime/budget/warning.py:14
FunctionsubmitFeedback
()
frontend/src/hooks/useFeedback.js:27
Functionsubmit_feedback
提交用户反馈
backend/main.py:577
Functionsubmit_feedback
提交用户反馈
backend/routers/feedback.py:16
Methodsubmit_feedback
提交反馈
backend/core/interfaces.py:235
Methodsuggest_time_slot
建议可用时间段 Args: user_id: 用户ID date: 日期 duration: 持续时间(分钟) Returns:
backend/modules/agent/core/agent/tools/calendar_api.py:171
Methodsuggest_time_slot
建议可用时间段 Args: user_id: 用户ID date: 日期 duration: 持续时间(分钟) Returns:
backend/agent/tools/calendar_api.py:171
Functionsync_wrapper
(*args, **kwargs)
backend/core/utils/decorators.py:54
Methodsynthesize_with_emotion
根据情感强度进行语音合成 Args: text: 要合成的文本 emotion: 目标情感 intensity: 情感强度 (0.0-1.0)
backend/modules/multimodal/services/tts_service.py:275
Functionsystem_info
系统信息
backend/app.py:213
Methodtest_calculate_similarity
测试相似度计算
backend/tests/unit/test_core.py:257
Methodtest_config_creation
测试配置创建
backend/tests/unit/test_core.py:39
Methodtest_config_environment_validation
测试环境验证
backend/tests/unit/test_core.py:46
Methodtest_config_from_env
测试从环境变量加载配置
backend/tests/unit/test_core.py:65
Methodtest_config_loading
测试配置加载
backend/tests/integration/test_basic.py:24
Methodtest_config_to_dict
测试配置转字典
backend/tests/unit/test_core.py:53
Methodtest_config_with_mock_env
测试配置与模拟环境变量
backend/tests/unit/test_core.py:276
Methodtest_configuration_error
测试配置异常
backend/tests/unit/test_core.py:95
Methodtest_database_error
测试数据库异常
backend/tests/unit/test_core.py:101
Methodtest_emotional_chat_exception
测试基础异常
backend/tests/unit/test_core.py:75
Methodtest_exception_handling
测试异常处理
backend/tests/integration/test_basic.py:34
Methodtest_exception_handling_chain
测试异常处理链
backend/tests/unit/test_core.py:288
Methodtest_extract_emotion_keywords
测试情绪关键词提取
backend/tests/unit/test_core.py:249
Methodtest_format_error
测试错误格式化
backend/tests/unit/test_core.py:187
Methodtest_format_response
测试响应格式化
backend/tests/unit/test_core.py:173
Methodtest_format_timestamp
测试时间戳格式化
backend/tests/unit/test_core.py:200
Methodtest_generate_id
测试ID生成
backend/tests/unit/test_core.py:220
Methodtest_imports
测试模块导入
backend/tests/integration/test_basic.py:13
Functiontest_rag
测试RAG功能 运行一个简单的测试查询
backend/modules/rag/routers/rag_router.py:370
Methodtest_sanitize_text
测试文本清理
backend/tests/unit/test_core.py:232
Functiontest_streaming
测试流式响应 Returns: 测试流式响应
backend/routers/streaming_chat.py:168
Methodtest_validate_email
测试邮箱验证
backend/tests/unit/test_core.py:111
Methodtest_validate_phone
测试手机号验证
backend/tests/unit/test_core.py:128
Methodtest_validate_session_id
测试会话ID验证
backend/tests/unit/test_core.py:156
Methodtest_validate_text_length
测试文本长度验证
backend/tests/unit/test_core.py:142
Methodtest_validation_error
测试验证异常
backend/tests/unit/test_core.py:85
Methodtest_validator_and_formatter_integration
测试验证器和格式化器集成
backend/tests/unit/test_core.py:297
Methodtext_completion
文本补全(Anthropic主要支持聊天格式,这里转换为聊天格式)
backend/modules/llm/providers/anthropic_provider.py:149
Methodtext_completion
文本补全
backend/modules/llm/providers/openai_provider.py:156
Methodtext_completion
文本补全 Args: prompt: 提示文本 model: 模型名称 temperature: 温度参数 max_tokens: 最大令牌数
backend/modules/llm/providers/base_provider.py:85
Methodtext_completion
文本补全 Args: prompt: 提示文本 model: 模型名称 temperature: 温度参数 max_tokens: 最大令牌数
backend/modules/llm/services/llm_service.py:93
Functiontimeout
超时装饰器
backend/core/utils/decorators.py:376
Functiontimeout_async
异步超时装饰器
backend/core/utils/helpers.py:351
Methodto_dict
转换为字典格式
backend/core/exceptions.py:116
FunctiontoggleSelectAll
()
frontend/src/components/HistoryManagementModal.js:356
FunctiontoggleSession
(sessionId)
frontend/src/components/HistoryManagementModal.js:345
FunctiontoggleTheme
()
frontend/src/contexts/ThemeContext.js:21
MethodtranscribeAudio
(audioBlob)
frontend/src/services/ChatAPI.js:281
← previousnext →1,701–1,800 of 1,867, ranked by callers