Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/acgurl/mori
/ types & classes
Types & classes
55 in github.com/acgurl/mori
⨍
Functions
163
◇
Types & classes
55
↓ 17 callers
Class
TemplateLoader
Jinja2模板加载器 支持多个模板目录的加载,按优先级查找: 1. 自定义模板目录 (config/template/) 2. 内置模板目录 (mori/template/internal_template/)
mori/template/loader.py:26
↓ 11 callers
Class
AgentConfig
Agent配置
mori/config.py:117
↓ 11 callers
Class
ModelConfig
模型配置 - 对应AgentScope的模型配置格式
mori/config.py:61
↓ 8 callers
Class
Config
完整配置
mori/config.py:147
↓ 6 callers
Class
EmbeddingModelConfig
嵌入模型配置
mori/config.py:79
↓ 5 callers
Class
ConfigParseError
配置文件解析错误
mori/exceptions.py:50
↓ 5 callers
Class
ConfigValidationError
配置验证错误
mori/exceptions.py:59
↓ 5 callers
Class
TemplateError
模板相关错误 当模板加载或渲染失败时抛出。
mori/exceptions.py:162
↓ 4 callers
Class
LogContext
日志上下文管理器 使用示例: with LogContext(request_id="req-123", user_id="user-456"): logger.info("处理请求") # 日志会自动包含上下文信息
logger/config.py:213
↓ 4 callers
Class
ModelConfigError
模型配置错误
mori/exceptions.py:79
↓ 3 callers
Class
ConfigError
配置相关错误 当配置文件加载、解析或验证失败时抛出。
mori/exceptions.py:33
↓ 3 callers
Class
ConfigFileNotFoundError
配置文件不存在
mori/exceptions.py:42
↓ 3 callers
Class
MemoryError
记忆系统相关错误 当记忆系统初始化或操作失败时抛出。
mori/exceptions.py:146
↓ 3 callers
Class
ModelError
模型相关错误 当模型创建、初始化或调用失败时抛出。
mori/exceptions.py:70
↓ 3 callers
Class
ModelNotFoundError
模型不存在
mori/exceptions.py:87
↓ 3 callers
Class
MoriError
Mori 项目的基础异常类 所有自定义异常都应该继承此类。
mori/exceptions.py:9
↓ 2 callers
Class
GlobalConfig
全局配置
mori/config.py:132
↓ 2 callers
Class
JSONFormatter
JSON格式化器,用于结构化日志输出
logger/config.py:22
↓ 2 callers
Class
TemplateNotFoundError
模板不存在
mori/exceptions.py:171
↓ 2 callers
Class
TemplateRenderError
模板渲染错误
mori/exceptions.py:183
↓ 1 callers
Class
AgentConfigError
Agent 配置错误
mori/exceptions.py:108
↓ 1 callers
Class
AgentError
Agent 相关错误 当 Agent 创建、初始化或执行失败时抛出。
mori/exceptions.py:99
↓ 1 callers
Class
AgentManager
Agent管理器 负责管理多个agent实例,提供agent创建、缓存和工具注册功能。
mori/agent/manager.py:20
↓ 1 callers
Class
AgentNotFoundError
Agent 不存在
mori/exceptions.py:116
↓ 1 callers
Class
AgentTool
将Agent包装为工具 此类将一个Agent实例包装成可以被其他Agent调用的工具。
mori/tool/agent_tools.py:15
↓ 1 callers
Class
EmbeddingModelRegistry
嵌入模型注册表 使用注册表模式管理嵌入模型类型,支持动态添加新模型。
mori/model/factory.py:98
↓ 1 callers
Class
HumanReadableFormatter
人类可读的格式化器,用于控制台输出
logger/config.py:61
↓ 1 callers
Class
MemoryConfigError
记忆系统配置错误
mori/exceptions.py:155
↓ 1 callers
Class
ModelRegistry
模型注册表 使用注册表模式管理聊天模型类型,支持动态添加新模型。 符合开闭原则:对扩展开放,对修改封闭。
mori/model/factory.py:43
↓ 1 callers
Class
Mori
Mori核心类 封装AgentScope的功能,提供简洁的使用接口。 作为编排层,负责组装各个模块,不包含具体业务逻辑。 支持多agent架构,主agent可以调用子agent作为工具。
mori/mori.py:26
↓ 1 callers
Class
MoriGUI
Mori GUI封装类
gui/app.py:20
↓ 1 callers
Class
NonStreamingModelWrapper
包装模型类,确保禁用流式输出 Mem0 库在调用 AgentScope 模型时不支持流式响应, 此包装类确保模型始终返回完整响应而不是 async_generator。 正确继承 ChatModelBase 并调用父类初始化,同时实现非流式功能。 使用方法:
mori/utils/model_wrapper.py:11
↓ 1 callers
Class
ServerConfig
服务器配置
mori/config.py:139
↓ 1 callers
Class
ToolError
工具相关错误 当工具注册、查找或执行失败时抛出。
mori/exceptions.py:128
↓ 1 callers
Class
ToolExecutionError
工具执行错误
mori/exceptions.py:137
Class
LongTermMemoryConfig
长期记忆配置
mori/config.py:96
Class
TestAgentConfigWithLongTermMemory
测试带长期记忆的Agent配置
tests/test_long_term_memory.py:51
Class
TestAgentErrors
测试 Agent 相关异常
tests/test_exceptions.py:108
Class
TestConfigErrors
测试配置相关异常
tests/test_exceptions.py:48
Class
TestConfigWithEmbeddingModels
测试包含嵌入模型的完整配置
tests/test_long_term_memory.py:85
Class
TestEmbeddingModelConfig
测试嵌入模型配置
tests/test_long_term_memory.py:19
Class
TestExceptionInheritance
测试异常继承关系
tests/test_exceptions.py:171
Class
TestExceptionLogging
测试异常日志
tests/test_logger.py:269
Class
TestGetLogger
测试获取日志器
tests/test_logger.py:308
Class
TestLogContext
测试日志上下文
tests/test_logger.py:146
Class
TestLogRotation
测试日志轮转
tests/test_logger.py:231
Class
TestLoggerSetup
测试日志器设置
tests/test_logger.py:21
Class
TestLongTermMemoryConfiguration
测试长期记忆配置的各种场景
tests/test_long_term_memory.py:180
Class
TestMemoryErrors
测试记忆系统相关异常
tests/test_exceptions.py:141
Class
TestModelErrors
测试模型相关异常
tests/test_exceptions.py:81
Class
TestMoriError
测试基础异常类
tests/test_exceptions.py:30
Class
TestMoriLongTermMemoryIntegration
测试Mori类的长期记忆集成
tests/test_long_term_memory.py:159
Class
TestStructuredLogging
测试结构化日志
tests/test_logger.py:75
Class
TestTemplateErrors
测试模板相关异常
tests/test_exceptions.py:150
Class
TestToolErrors
测试工具相关异常
tests/test_exceptions.py:129