Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions echobot/app/routers/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,19 @@ async def synthesize_tts(
except RuntimeError as exc:
raise HTTPException(status_code=503, detail=str(exc)) from exc

def _safe_header(value: str) -> str:
try:
value.encode("latin-1")
return value
except UnicodeEncodeError:
return value.encode("utf-8").decode("latin-1")

return Response(
content=speech.audio_bytes,
media_type=speech.content_type,
headers={
"X-TTS-Provider": speech.provider,
"X-TTS-Voice": speech.voice,
"X-TTS-Provider": _safe_header(str(speech.provider)),
"X-TTS-Voice": _safe_header(str(speech.voice)),
},
)

Expand Down
6 changes: 2 additions & 4 deletions echobot/app/services/web_console/live2d/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,8 @@ def selection_key_for(self, candidate: Live2DModelCandidate) -> str:
return f"{candidate.source}:{candidate.model_relative_path.as_posix()}"

def asset_url_for(self, candidate: Live2DModelCandidate, relative_path: str) -> str:
return (
f"/api/web/live2d/{candidate.source}/"
f"{quote(str(relative_path or '').replace('\\', '/'), safe='/')}"
)
path = str(relative_path or "").replace("\\", "/")
return f"/api/web/live2d/{candidate.source}/{quote(path, safe='/')}"

def directory_name_for(self, candidate: Live2DModelCandidate) -> str:
runtime_relative_path = candidate.runtime_relative_path
Expand Down
2 changes: 2 additions & 0 deletions echobot/app/web/features/live2d/scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,8 @@ export function createLive2DSceneController(deps) {
autoStart: true,
antialias: true,
backgroundAlpha: 0,
resolution: window.devicePixelRatio || 1,
autoDensity: true,
});
live2dState.live2dStage = live2dState.pixiApp.stage;
live2dState.live2dStage.interactive = true;
Expand Down
3 changes: 1 addition & 2 deletions echobot/skills/news/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ description: >
sports, and entertainment. Always use this skill for news-related requests, even
if the user doesn't say the word "news" explicitly.
metadata:
echo:
emoji: 📰
echo: '{"emoji": "📰"}'
---

# News
Expand Down
2 changes: 1 addition & 1 deletion echobot/skills/scrapling/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: scrapling-official
name: scrapling
description: Scrape web pages using Scrapling with anti-bot bypass (like Cloudflare Turnstile), stealth headless browsing, spiders framework, adaptive scraping, and JavaScript rendering. Use when asked to scrape, crawl, or extract data from websites; web_fetch fails; the site has anti-bot protections; write Python code to scrape/crawl; or write spiders.
version: 0.4.2
license: Complete terms in LICENSE.txt
Expand Down
3 changes: 1 addition & 2 deletions echobot/skills/weather/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ description: >
macOS, and Windows without any setup.
homepage: "https://wttr.in/:help"
metadata:
echo:
emoji: 🌤️
echo: '{"emoji": "🌤️"}'
name: weather
---

Expand Down