Skip to content

Commit b0e5a3f

Browse files
Bingxi ZhaoBingxi Zhao
authored andcommitted
feat: release ver0.3.0
1 parent d9abd3a commit b0e5a3f

8 files changed

Lines changed: 21 additions & 30 deletions

File tree

.github/dependabot.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,3 @@ updates:
8484
- "docker"
8585
commit-message:
8686
prefix: "chore(deps)"
87-

.github/workflows/docker-publish.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,3 @@ jobs:
105105
echo " -e EMBEDDING_BINDING_API_KEY=your-api-key \\\\" >> $GITHUB_STEP_SUMMARY
106106
echo " ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" >> $GITHUB_STEP_SUMMARY
107107
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
108-

.github/workflows/tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,3 @@ jobs:
8989
python -c "from src.tools.rag_tool import RAGTool; print('✅ Tools imports OK')"
9090
env:
9191
PYTHONPATH: ${{ github.workspace }}
92-

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
</div>
3636

3737
---
38-
> **[2026.1.3]** Released DeepTutor [v0.2.1](https://github.com/HKUDS/DeepTutor/releases/tag/v0.2.1) - Any feedbacks are welcomed! ❤️
38+
> **[2026.1.3]** Released DeepTutor [v0.3.0](https://github.com/HKUDS/DeepTutor/releases/tag/v0.3.0) - Any feedbacks are welcomed! ❤️
3939
4040
> **[2026.1.1]** Join our [Discord Community](https://discord.gg/zpP9cssj) and [GitHub Discussions](https://github.com/HKUDS/DeepTutor/discussions) - shape the future of DeepTutor! 💬
4141

src/api/routers/agent_config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,3 @@ async def get_single_agent_config(agent_type: str):
6767
if agent_type in AGENT_REGISTRY:
6868
return AGENT_REGISTRY[agent_type]
6969
return {"error": f"Agent type '{agent_type}' not found"}
70-

src/core/prompt_manager.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import yaml
1111

12-
from .core import parse_language, PROJECT_ROOT
12+
from .core import PROJECT_ROOT, parse_language
1313

1414

1515
class PromptManager:
@@ -84,9 +84,7 @@ def _load_with_fallback(
8484
fallback_chain = self.LANGUAGE_FALLBACKS.get(lang_code, ["en"])
8585

8686
for lang in fallback_chain:
87-
prompt_file = self._resolve_prompt_path(
88-
prompts_dir, lang, agent_name, subdirectory
89-
)
87+
prompt_file = self._resolve_prompt_path(prompts_dir, lang, agent_name, subdirectory)
9088
if prompt_file and prompt_file.exists():
9189
try:
9290
with open(prompt_file, encoding="utf-8") as f:
@@ -206,4 +204,3 @@ def get_prompt_manager() -> PromptManager:
206204

207205

208206
__all__ = ["PromptManager", "get_prompt_manager"]
209-

tests/core/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
# Core module tests
2-

tests/core/test_prompt_manager.py

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -80,87 +80,87 @@ def test_load_prompts_with_subdirectory(self):
8080
def test_caching(self):
8181
"""Test that prompts are cached after first load."""
8282
pm = get_prompt_manager()
83-
83+
8484
# First load
8585
prompts1 = pm.load_prompts("research", "research_agent", "en")
86-
86+
8787
# Second load should return cached version
8888
prompts2 = pm.load_prompts("research", "research_agent", "en")
89-
89+
9090
assert prompts1 is prompts2
9191

9292
def test_clear_cache_all(self):
9393
"""Test clearing all cache."""
9494
pm = get_prompt_manager()
95-
95+
9696
# Load some prompts
9797
pm.load_prompts("research", "research_agent", "en")
9898
pm.load_prompts("guide", "chat_agent", "en")
99-
99+
100100
assert len(pm._cache) >= 2
101-
101+
102102
pm.clear_cache()
103103
assert len(pm._cache) == 0
104104

105105
def test_clear_cache_module_specific(self):
106106
"""Test clearing cache for specific module."""
107107
pm = get_prompt_manager()
108-
108+
109109
# Load prompts for multiple modules
110110
pm.load_prompts("research", "research_agent", "en")
111111
pm.load_prompts("guide", "chat_agent", "en")
112-
112+
113113
initial_count = len(pm._cache)
114-
114+
115115
# Clear only research cache
116116
pm.clear_cache("research")
117-
117+
118118
# Guide prompts should still be cached
119119
assert any("guide" in k for k in pm._cache)
120120
assert not any("research" in k for k in pm._cache)
121121

122122
def test_get_prompt_helper(self):
123123
"""Test the get_prompt helper method."""
124124
pm = get_prompt_manager()
125-
125+
126126
test_prompts = {
127127
"system": {
128128
"role": "You are a helpful assistant",
129129
"task": "Answer questions",
130130
},
131131
"simple_key": "Simple value",
132132
}
133-
133+
134134
# Test nested access
135135
role = pm.get_prompt(test_prompts, "system", "role")
136136
assert role == "You are a helpful assistant"
137-
137+
138138
# Test simple access (no field)
139139
simple = pm.get_prompt(test_prompts, "simple_key")
140140
assert simple == "Simple value"
141-
141+
142142
# Test fallback
143143
missing = pm.get_prompt(test_prompts, "nonexistent", "field", "fallback_value")
144144
assert missing == "fallback_value"
145145

146146
def test_language_fallback(self):
147147
"""Test language fallback chain."""
148148
pm = get_prompt_manager()
149-
149+
150150
# Even with a potentially missing language, should fallback
151151
prompts = pm.load_prompts("research", "research_agent", "zh")
152152
assert isinstance(prompts, dict)
153153

154154
def test_reload_prompts(self):
155155
"""Test force reload bypasses cache."""
156156
pm = get_prompt_manager()
157-
157+
158158
# Load and cache
159159
prompts1 = pm.load_prompts("research", "research_agent", "en")
160-
160+
161161
# Force reload
162162
prompts2 = pm.reload_prompts("research", "research_agent", "en")
163-
163+
164164
# They should be equal but not the same object
165165
assert prompts1 == prompts2
166166
# After reload, cache should have fresh entry
@@ -197,4 +197,3 @@ def test_invalid_language_falls_back(self):
197197

198198
if __name__ == "__main__":
199199
pytest.main([__file__, "-v"])
200-

0 commit comments

Comments
 (0)