Spaces:
Sleeping
Sleeping
Upload agent.py
Browse files
agent.py
CHANGED
|
@@ -81,9 +81,17 @@ async def entrypoint(ctx: JobContext):
|
|
| 81 |
"""Einstiegspunkt für jeden neuen LiveKit-Job."""
|
| 82 |
logger.info(f"Startet Support-Job für Raum: {ctx.room.name}")
|
| 83 |
await ctx.connect()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
agent = WebstarkAgent()
|
| 85 |
-
|
| 86 |
-
await session.start(agent, room=ctx.room)
|
| 87 |
logger.info("Elit Support-Session aktiv (7 Tools geladen).")
|
| 88 |
|
| 89 |
|
|
|
|
| 81 |
"""Einstiegspunkt für jeden neuen LiveKit-Job."""
|
| 82 |
logger.info(f"Startet Support-Job für Raum: {ctx.room.name}")
|
| 83 |
await ctx.connect()
|
| 84 |
+
|
| 85 |
+
# Korrekte Initialisierung für livekit-agents 1.5.x
|
| 86 |
+
session = AgentSession(
|
| 87 |
+
llm=openai.realtime.RealtimeModel(
|
| 88 |
+
modalities=["audio", "text"],
|
| 89 |
+
instructions="Du bist 'Elit', der freundliche Webstark KI-Spezialist. Hilf den Kunden mit Preisen und technischem Wissen. Nutze deine Tools aktiv."
|
| 90 |
+
)
|
| 91 |
+
)
|
| 92 |
+
|
| 93 |
agent = WebstarkAgent()
|
| 94 |
+
await session.start(agent=agent, room=ctx.room)
|
|
|
|
| 95 |
logger.info("Elit Support-Session aktiv (7 Tools geladen).")
|
| 96 |
|
| 97 |
|