Skip to content

Commit db9774d

Browse files
authored
Merge branch 'main' into feature/baseten
2 parents eaa3738 + ddc1433 commit db9774d

File tree

28 files changed

+1266
-543
lines changed

28 files changed

+1266
-543
lines changed

agents-core/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ classifiers = [
2121

2222
requires-python = ">=3.10"
2323
dependencies = [
24-
"getstream[webrtc,telemetry]>=2.5.11",
24+
"getstream[webrtc,telemetry]>=2.5.14",
2525
"python-dotenv>=1.1.1",
2626
"pillow>=10.4.0", # Compatible with moondream SDK (<11.0.0)
2727
"numpy>=1.24.0",
@@ -91,5 +91,5 @@ include = ["vision_agents"]
9191
#]
9292
# getstream = { git = "https://github.com/GetStream/stream-py.git", branch = "audio-more" }
9393
# for local development
94-
#getstream = { git = "https://github.com/GetStream/stream-py.git", rev = "85bd8ef00859ef6ed5ef4ffe7b7f40ae12d12973" }
94+
#getstream = { path = "../../stream-py/", editable = true }
9595
# aiortc = { path = "../stream-py/", editable = true }

agents-core/vision_agents/core/agents/agent_options.py

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import asyncio
2+
import datetime
3+
import tempfile
4+
from dataclasses import dataclass, asdict
5+
from typing import Optional
6+
7+
import aiortc.mediastreams
8+
9+
from ..edge.types import Participant
10+
from ..llm.events import LLMResponseCompletedEvent
11+
from ..utils.video_forwarder import VideoForwarder
12+
13+
14+
@dataclass
15+
class AgentOptions:
16+
model_dir: str
17+
18+
def update(self, other: "AgentOptions") -> "AgentOptions":
19+
merged_dict = asdict(self)
20+
21+
for key, value in asdict(other).items():
22+
if value is not None:
23+
merged_dict[key] = value
24+
25+
return AgentOptions(**merged_dict)
26+
27+
28+
# Cache tempdir at module load time to avoid blocking I/O during async operations
29+
_DEFAULT_MODEL_DIR = tempfile.gettempdir()
30+
31+
32+
def default_agent_options():
33+
return AgentOptions(model_dir=_DEFAULT_MODEL_DIR)
34+
35+
36+
37+
@dataclass
38+
class TrackInfo:
39+
id: str
40+
type: int
41+
processor: str
42+
priority: int # higher goes first
43+
participant: Optional[Participant]
44+
track: aiortc.mediastreams.VideoStreamTrack
45+
forwarder: VideoForwarder
46+
47+
@dataclass
48+
class LLMTurn:
49+
input: str
50+
participant: Optional[Participant]
51+
started_at: datetime.datetime
52+
finished_at: Optional[datetime.datetime] = None
53+
canceled_at: Optional[datetime.datetime] = None
54+
response: Optional[LLMResponseCompletedEvent] = None
55+
task: Optional[asyncio.Task] = None
56+
turn_finished: bool = False

0 commit comments

Comments
 (0)