Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Lzh-xbccz/hermes-roleplay-engine
/ functions
Functions
55 in github.com/Lzh-xbccz/hermes-roleplay-engine
⨍
Functions
55
◇
Types & classes
0
↓ 5 callers
Function
_load_card
加载角色卡(支持 JSON 和 YAML)
src/character_engine.py:77
↓ 4 callers
Function
_get_saves_dir
(char_name: str)
src/character_engine.py:737
↓ 4 callers
Function
search_with_fallback
搜索:Tavily → DuckDuckGo → Playwright → 空
tools/distill.py:198
↓ 3 callers
Function
collect_texts
从搜索结果收集文本,对高价值 URL 抓取全文
tools/distill.py:326
↓ 3 callers
Function
format_texts
(texts)
tools/distill.py:398
↓ 3 callers
Function
get_active_wbs
()
src/worldbook_engine.py:91
↓ 3 callers
Function
load_character
加载角色
src/character_engine.py:614
↓ 3 callers
Function
q
(n)
tools/distill.py:440
↓ 2 callers
Function
_check_keys
()
tools/tavily_client.py:26
↓ 2 callers
Function
_load_state
()
tools/tavily_client.py:36
↓ 2 callers
Function
_save_state
(state)
tools/tavily_client.py:43
↓ 2 callers
Function
fetch_url
抓取 URL:Tavily → smart_crawl → urllib fallback
tools/distill.py:215
↓ 2 callers
Function
save_active_wbs
(wbs: list)
src/worldbook_engine.py:98
↓ 2 callers
Function
tavily_extract
带轮询的 Tavily 内容提取
tools/tavily_client.py:85
↓ 2 callers
Function
tavily_search
带轮询的 Tavily 搜索
tools/tavily_client.py:48
↓ 1 callers
Function
_build_body_lock
构建身体一致性锁定段落,防止模型混淆角色性别和身体特征
src/character_engine.py:90
↓ 1 callers
Function
_duckduckgo_search
DuckDuckGo HTML 搜索(无需 API key)
tools/distill.py:59
↓ 1 callers
Function
_find_character
查找角色文件
src/character_engine.py:706
↓ 1 callers
Function
_is_blacklisted
(url)
tools/distill.py:171
↓ 1 callers
Function
_parse_yaml
解析 YAML 角色卡,返回扁平 dict
src/character_engine.py:19
↓ 1 callers
Function
_playwright_search
(query)
tools/distill.py:185
↓ 1 callers
Function
_queries_analysis
Agent C 搜索词
tools/distill.py:144
↓ 1 callers
Function
_queries_quotes
Agent B 搜索词
tools/distill.py:117
↓ 1 callers
Function
_queries_wiki
Agent A 搜索词
tools/distill.py:88
↓ 1 callers
Function
_restore_params
恢复模型参数——只还原仍为引擎设置值的字段(用户手动改过的不覆盖)
src/character_engine.py:587
↓ 1 callers
Function
_set_model_params
设置模型参数,返回旧值(含引擎设置的目标值用于恢复时比对)
src/character_engine.py:572
↓ 1 callers
Function
_tavily_search
(query, max_results=5)
tools/distill.py:175
↓ 1 callers
Function
_try_fandom_subpages
从搜索结果中找到 fandom URL,主动爬取 /Quotes 子页面(限时)
tools/distill.py:257
↓ 1 callers
Function
_ytdlp_search_and_extract
搜索 YouTube/B站视频并提取字幕
tools/distill.py:279
↓ 1 callers
Function
build_soul_md
用角色卡构建 SOUL.md
src/character_engine.py:190
↓ 1 callers
Function
crawl
(url, force_playwright=False)
tools/smart_crawl.py:60
↓ 1 callers
Function
decode_iTXt
解码 iTXt chunk → (keyword, text)
tools/png_parser.py:55
↓ 1 callers
Function
decode_tEXt
解码 tEXt chunk → (keyword, text)
tools/png_parser.py:45
↓ 1 callers
Function
delete_save
删除存档
src/character_engine.py:810
↓ 1 callers
Function
extract_character_data
从 PNG 中提取角色数据,优先 V3 (ccv3)
tools/png_parser.py:80
↓ 1 callers
Function
list_saves
列出存档
src/character_engine.py:785
↓ 1 callers
Function
load_scene
加载存档,返回完整恢复数据
src/character_engine.py:775
↓ 1 callers
Function
load_worldbook
解析WB JSON,返回条目列表
src/worldbook_engine.py:18
↓ 1 callers
Function
main
()
tools/distill.py:495
↓ 1 callers
Function
main
()
tools/png_parser.py:111
↓ 1 callers
Function
main
()
tools/smart_crawl.py:86
↓ 1 callers
Function
parse_png_chunks
解析 PNG chunk 数据
tools/png_parser.py:24
↓ 1 callers
Function
preload_worldbooks
扫描 World Book,构建紧凑索引注入 SOUL.md。 如果角色卡指定了 worldbooks 字段,只加载指定的;否则只加载通用世界书。
src/character_engine.py:469
↓ 1 callers
Function
print_memory_commands
打印给 Hermes 执行的 memory 写入指令
src/worldbook_engine.py:78
↓ 1 callers
Function
run_research
(char_name, work_name, lang="zh", media_type="auto")
tools/distill.py:406
↓ 1 callers
Function
save_research
(char_name, work_name, data, media_type)
tools/distill.py:467
↓ 1 callers
Function
save_scene
保存当前场景进度。每个角色最多3个存档,自动轮转。
src/character_engine.py:742
↓ 1 callers
Function
search
(query)
tools/smart_crawl.py:75
↓ 1 callers
Function
status
查看状态
src/character_engine.py:681
↓ 1 callers
Function
try_playwright
(url)
tools/smart_crawl.py:45
↓ 1 callers
Function
try_tavily
(url)
tools/smart_crawl.py:32
↓ 1 callers
Function
unload_character
卸载角色
src/character_engine.py:657
Function
agent_a
Agent A: 基础档案
tools/distill.py:351
Function
agent_b
Agent B: 台词与行为
tools/distill.py:362
Function
agent_c
Agent C: 社区解读
tools/distill.py:383