Spaces:
Running
Running
Publish MirrorBuddy for Reachy Mini
Browse files- README.md +1 -1
- index.html +1 -1
- reachy_mini_mirrorbuddy/mirrorbuddy_client.py +1 -1
- reachy_mini_mirrorbuddy/tools.py +8 -3
README.md
CHANGED
|
@@ -26,7 +26,7 @@ independently and needing an adult beside you.
|
|
| 26 |
|
| 27 |
- **Talks and listens.** Natural spoken conversation in Italian, powered by Azure
|
| 28 |
OpenAI Realtime. Short answers, one thing at a time.
|
| 29 |
-
- **
|
| 30 |
persona and voice change. Learning coaches are there too, for when the problem is
|
| 31 |
the method rather than the subject.
|
| 32 |
- **Looks at homework.** Show it an exercise, a notebook page or the screen, and it
|
|
|
|
| 26 |
|
| 27 |
- **Talks and listens.** Natural spoken conversation in Italian, powered by Azure
|
| 28 |
OpenAI Realtime. Short answers, one thing at a time.
|
| 29 |
+
- **27 professors, by voice.** Say "voglio matematica" or "chiama Galileo" and the
|
| 30 |
persona and voice change. Learning coaches are there too, for when the problem is
|
| 31 |
the method rather than the subject.
|
| 32 |
- **Looks at homework.** Show it an exercise, a notebook page or the screen, and it
|
index.html
CHANGED
|
@@ -48,7 +48,7 @@
|
|
| 48 |
thing at a time.
|
| 49 |
</li>
|
| 50 |
<li>
|
| 51 |
-
<strong>
|
| 52 |
persona and the voice change.
|
| 53 |
</li>
|
| 54 |
<li>
|
|
|
|
| 48 |
thing at a time.
|
| 49 |
</li>
|
| 50 |
<li>
|
| 51 |
+
<strong>27 professors, by voice.</strong> "Voglio matematica", "chiama Galileo" — the
|
| 52 |
persona and the voice change.
|
| 53 |
</li>
|
| 54 |
<li>
|
reachy_mini_mirrorbuddy/mirrorbuddy_client.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
|
| 3 |
MirrorBuddy exposes an unauthenticated JSON endpoint ``GET /api/maestri?locale=it``
|
| 4 |
that returns the same Maestro data the web app uses. By fetching it here we keep the
|
| 5 |
-
robot fully aligned with MirrorBuddy: the exact same
|
| 6 |
prompts and greetings, with zero duplication.
|
| 7 |
"""
|
| 8 |
|
|
|
|
| 2 |
|
| 3 |
MirrorBuddy exposes an unauthenticated JSON endpoint ``GET /api/maestri?locale=it``
|
| 4 |
that returns the same Maestro data the web app uses. By fetching it here we keep the
|
| 5 |
+
robot fully aligned with MirrorBuddy: the exact same 27 professors, voices, system
|
| 6 |
prompts and greetings, with zero duplication.
|
| 7 |
"""
|
| 8 |
|
reachy_mini_mirrorbuddy/tools.py
CHANGED
|
@@ -312,10 +312,15 @@ def resolve_maestro(maestri: list[Maestro], query: str) -> Maestro | None:
|
|
| 312 |
return best[3] if best else None
|
| 313 |
|
| 314 |
|
| 315 |
-
def professors_summary(maestri: list[Maestro], limit: int =
|
| 316 |
-
"""A compact spoken-friendly list of professors and their subjects.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 317 |
parts = []
|
| 318 |
-
for m in maestri[:limit]:
|
| 319 |
name = m.display_name or m.name
|
| 320 |
subject = m.subject or m.specialty
|
| 321 |
parts.append(f"{name} ({subject})" if subject else name)
|
|
|
|
| 312 |
return best[3] if best else None
|
| 313 |
|
| 314 |
|
| 315 |
+
def professors_summary(maestri: list[Maestro], limit: int | None = None) -> str:
|
| 316 |
+
"""A compact spoken-friendly list of professors and their subjects.
|
| 317 |
+
|
| 318 |
+
The cap used to default to the roster size of the day (26), so adding Loto
|
| 319 |
+
as the 27th professor silently dropped the last one from the list the robot
|
| 320 |
+
reads out. Default to the whole roster and let callers opt into a cap.
|
| 321 |
+
"""
|
| 322 |
parts = []
|
| 323 |
+
for m in maestri if limit is None else maestri[:limit]:
|
| 324 |
name = m.display_name or m.name
|
| 325 |
subject = m.subject or m.specialty
|
| 326 |
parts.append(f"{name} ({subject})" if subject else name)
|