-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.py
More file actions
26 lines (18 loc) · 680 Bytes
/
server.py
File metadata and controls
26 lines (18 loc) · 680 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"""
Example server for the web interface.
"""
import logging
from experiments.models import OverhearingKaniRealtime
from experiments.prompts import read_prompt
from overhearing_agents.server import VizServer
from overhearing_agents.session import OverhearingAgentsSession
AGENT_INSTRUCTIONS = read_prompt("realtime_tom_0shot_audio.md")
async def create_session():
ai = OverhearingKaniRealtime()
await ai.connect(instructions=AGENT_INSTRUCTIONS, modalities=["text"])
return OverhearingAgentsSession(ai)
# configure and start the server
server = VizServer(create_session)
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
server.serve()