MCPcopy Create free account

hub / github.com/acgurl/mori / types & classes

Types & classes55 in github.com/acgurl/mori

↓ 17 callersClassTemplateLoader
Jinja2模板加载器 支持多个模板目录的加载,按优先级查找: 1. 自定义模板目录 (config/template/) 2. 内置模板目录 (mori/template/internal_template/)
mori/template/loader.py:26
↓ 11 callersClassAgentConfig
Agent配置
mori/config.py:117
↓ 11 callersClassModelConfig
模型配置 - 对应AgentScope的模型配置格式
mori/config.py:61
↓ 8 callersClassConfig
完整配置
mori/config.py:147
↓ 6 callersClassEmbeddingModelConfig
嵌入模型配置
mori/config.py:79
↓ 5 callersClassConfigParseError
配置文件解析错误
mori/exceptions.py:50
↓ 5 callersClassConfigValidationError
配置验证错误
mori/exceptions.py:59
↓ 5 callersClassTemplateError
模板相关错误 当模板加载或渲染失败时抛出。
mori/exceptions.py:162
↓ 4 callersClassLogContext
日志上下文管理器 使用示例: with LogContext(request_id="req-123", user_id="user-456"): logger.info("处理请求") # 日志会自动包含上下文信息
logger/config.py:213
↓ 4 callersClassModelConfigError
模型配置错误
mori/exceptions.py:79
↓ 3 callersClassConfigError
配置相关错误 当配置文件加载、解析或验证失败时抛出。
mori/exceptions.py:33
↓ 3 callersClassConfigFileNotFoundError
配置文件不存在
mori/exceptions.py:42
↓ 3 callersClassMemoryError
记忆系统相关错误 当记忆系统初始化或操作失败时抛出。
mori/exceptions.py:146
↓ 3 callersClassModelError
模型相关错误 当模型创建、初始化或调用失败时抛出。
mori/exceptions.py:70
↓ 3 callersClassModelNotFoundError
模型不存在
mori/exceptions.py:87
↓ 3 callersClassMoriError
Mori 项目的基础异常类 所有自定义异常都应该继承此类。
mori/exceptions.py:9
↓ 2 callersClassGlobalConfig
全局配置
mori/config.py:132
↓ 2 callersClassJSONFormatter
JSON格式化器,用于结构化日志输出
logger/config.py:22
↓ 2 callersClassTemplateNotFoundError
模板不存在
mori/exceptions.py:171
↓ 2 callersClassTemplateRenderError
模板渲染错误
mori/exceptions.py:183
↓ 1 callersClassAgentConfigError
Agent 配置错误
mori/exceptions.py:108
↓ 1 callersClassAgentError
Agent 相关错误 当 Agent 创建、初始化或执行失败时抛出。
mori/exceptions.py:99
↓ 1 callersClassAgentManager
Agent管理器 负责管理多个agent实例,提供agent创建、缓存和工具注册功能。
mori/agent/manager.py:20
↓ 1 callersClassAgentNotFoundError
Agent 不存在
mori/exceptions.py:116
↓ 1 callersClassAgentTool
将Agent包装为工具 此类将一个Agent实例包装成可以被其他Agent调用的工具。
mori/tool/agent_tools.py:15
↓ 1 callersClassEmbeddingModelRegistry
嵌入模型注册表 使用注册表模式管理嵌入模型类型,支持动态添加新模型。
mori/model/factory.py:98
↓ 1 callersClassHumanReadableFormatter
人类可读的格式化器,用于控制台输出
logger/config.py:61
↓ 1 callersClassMemoryConfigError
记忆系统配置错误
mori/exceptions.py:155
↓ 1 callersClassModelRegistry
模型注册表 使用注册表模式管理聊天模型类型,支持动态添加新模型。 符合开闭原则:对扩展开放,对修改封闭。
mori/model/factory.py:43
↓ 1 callersClassMori
Mori核心类 封装AgentScope的功能,提供简洁的使用接口。 作为编排层,负责组装各个模块,不包含具体业务逻辑。 支持多agent架构,主agent可以调用子agent作为工具。
mori/mori.py:26
↓ 1 callersClassMoriGUI
Mori GUI封装类
gui/app.py:20
↓ 1 callersClassNonStreamingModelWrapper
包装模型类,确保禁用流式输出 Mem0 库在调用 AgentScope 模型时不支持流式响应, 此包装类确保模型始终返回完整响应而不是 async_generator。 正确继承 ChatModelBase 并调用父类初始化,同时实现非流式功能。 使用方法:
mori/utils/model_wrapper.py:11
↓ 1 callersClassServerConfig
服务器配置
mori/config.py:139
↓ 1 callersClassToolError
工具相关错误 当工具注册、查找或执行失败时抛出。
mori/exceptions.py:128
↓ 1 callersClassToolExecutionError
工具执行错误
mori/exceptions.py:137
ClassLongTermMemoryConfig
长期记忆配置
mori/config.py:96
ClassTestAgentConfigWithLongTermMemory
测试带长期记忆的Agent配置
tests/test_long_term_memory.py:51
ClassTestAgentErrors
测试 Agent 相关异常
tests/test_exceptions.py:108
ClassTestConfigErrors
测试配置相关异常
tests/test_exceptions.py:48
ClassTestConfigWithEmbeddingModels
测试包含嵌入模型的完整配置
tests/test_long_term_memory.py:85
ClassTestEmbeddingModelConfig
测试嵌入模型配置
tests/test_long_term_memory.py:19
ClassTestExceptionInheritance
测试异常继承关系
tests/test_exceptions.py:171
ClassTestExceptionLogging
测试异常日志
tests/test_logger.py:269
ClassTestGetLogger
测试获取日志器
tests/test_logger.py:308
ClassTestLogContext
测试日志上下文
tests/test_logger.py:146
ClassTestLogRotation
测试日志轮转
tests/test_logger.py:231
ClassTestLoggerSetup
测试日志器设置
tests/test_logger.py:21
ClassTestLongTermMemoryConfiguration
测试长期记忆配置的各种场景
tests/test_long_term_memory.py:180
ClassTestMemoryErrors
测试记忆系统相关异常
tests/test_exceptions.py:141
ClassTestModelErrors
测试模型相关异常
tests/test_exceptions.py:81
ClassTestMoriError
测试基础异常类
tests/test_exceptions.py:30
ClassTestMoriLongTermMemoryIntegration
测试Mori类的长期记忆集成
tests/test_long_term_memory.py:159
ClassTestStructuredLogging
测试结构化日志
tests/test_logger.py:75
ClassTestTemplateErrors
测试模板相关异常
tests/test_exceptions.py:150
ClassTestToolErrors
测试工具相关异常
tests/test_exceptions.py:129