Skip to content

Commit a940bd3

Browse files
committed
rename
1 parent 5ab1475 commit a940bd3

14 files changed

+57
-57
lines changed

conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import pytest
1313
from torchvision.io.video import av
1414

15-
from stream_agents.core.edge.types import PcmData
15+
from vision_agents.core.edge.types import PcmData
1616

1717

1818
def get_assets_dir():

plugins/cartesia/tests/test_tts.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async def write(self, data: bytes):
6161

6262

6363
@pytest.mark.asyncio
64-
@patch("stream_agents.plugins.cartesia.tts.AsyncCartesia", MockAsyncCartesia)
64+
@patch("vision_agents.plugins.cartesia.tts.AsyncCartesia", MockAsyncCartesia)
6565
async def test_cartesia_tts_initialization():
6666
"""cartesia.TTS should instantiate and store the provided api_key."""
6767
tts = cartesia.TTS(api_key="test-api-key")
@@ -70,7 +70,7 @@ async def test_cartesia_tts_initialization():
7070

7171

7272
@pytest.mark.asyncio
73-
@patch("stream_agents.plugins.cartesia.tts.AsyncCartesia", MockAsyncCartesia)
73+
@patch("vision_agents.plugins.cartesia.tts.AsyncCartesia", MockAsyncCartesia)
7474
@patch.dict(os.environ, {"CARTESIA_API_KEY": "env-var-api-key"})
7575
async def test_cartesia_tts_initialization_with_env_var():
7676
"""When no api_key arg is supplied cartesia.TTS should read CARTESIA_API_KEY."""
@@ -79,7 +79,7 @@ async def test_cartesia_tts_initialization_with_env_var():
7979

8080

8181
@pytest.mark.asyncio
82-
@patch("stream_agents.plugins.cartesia.tts.AsyncCartesia", MockAsyncCartesia)
82+
@patch("vision_agents.plugins.cartesia.tts.AsyncCartesia", MockAsyncCartesia)
8383
async def test_cartesia_synthesize_returns_async_iterator():
8484
"""synthesize() should yield an async iterator of PCM byte chunks."""
8585
tts = cartesia.TTS(api_key="test")
@@ -97,7 +97,7 @@ async def test_cartesia_synthesize_returns_async_iterator():
9797

9898

9999
@pytest.mark.asyncio
100-
@patch("stream_agents.plugins.cartesia.tts.AsyncCartesia", MockAsyncCartesia)
100+
@patch("vision_agents.plugins.cartesia.tts.AsyncCartesia", MockAsyncCartesia)
101101
async def test_cartesia_send_writes_to_track_and_emits_event():
102102
tts = cartesia.TTS(api_key="test")
103103
track = MockAudioTrack()
@@ -123,7 +123,7 @@ async def _on_audio(event: TTSAudioEvent):
123123

124124

125125
@pytest.mark.asyncio
126-
@patch("stream_agents.plugins.cartesia.tts.AsyncCartesia", MockAsyncCartesia)
126+
@patch("vision_agents.plugins.cartesia.tts.AsyncCartesia", MockAsyncCartesia)
127127
async def test_cartesia_invalid_framerate_raises():
128128
tts = cartesia.TTS(api_key="test")
129129
bad_track = MockAudioTrack(framerate=44100)
@@ -133,7 +133,7 @@ async def test_cartesia_invalid_framerate_raises():
133133

134134

135135
@pytest.mark.asyncio
136-
@patch("stream_agents.plugins.cartesia.tts.AsyncCartesia", MockAsyncCartesia)
136+
@patch("vision_agents.plugins.cartesia.tts.AsyncCartesia", MockAsyncCartesia)
137137
async def test_cartesia_send_without_track_raises():
138138
tts = cartesia.TTS(api_key="test")
139139

plugins/elevenlabs/tests/test_tts.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ async def mock_stream(*args, **kwargs):
3838

3939
@pytest.mark.asyncio
4040
@patch(
41-
"stream_agents.plugins.elevenlabs.tts.AsyncElevenLabs", MockAsyncElevenLabsClient
41+
"vision_agents.plugins.elevenlabs.tts.AsyncElevenLabs", MockAsyncElevenLabsClient
4242
)
4343
async def test_elevenlabs_tts_initialization():
4444
"""Test that the ElevenLabs TTS initializes correctly with explicit API key."""
@@ -51,7 +51,7 @@ async def test_elevenlabs_tts_initialization():
5151

5252
@pytest.mark.asyncio
5353
@patch(
54-
"stream_agents.plugins.elevenlabs.tts.AsyncElevenLabs", MockAsyncElevenLabsClient
54+
"vision_agents.plugins.elevenlabs.tts.AsyncElevenLabs", MockAsyncElevenLabsClient
5555
)
5656
@patch.dict(os.environ, {"ELEVENLABS_API_KEY": "env-var-api-key"})
5757
async def test_elevenlabs_tts_initialization_with_env_var():
@@ -64,7 +64,7 @@ async def test_elevenlabs_tts_initialization_with_env_var():
6464

6565
@pytest.mark.asyncio
6666
@patch(
67-
"stream_agents.plugins.elevenlabs.tts.AsyncElevenLabs", MockAsyncElevenLabsClient
67+
"vision_agents.plugins.elevenlabs.tts.AsyncElevenLabs", MockAsyncElevenLabsClient
6868
)
6969
async def test_elevenlabs_tts_synthesize():
7070
"""Test that synthesize returns an audio stream."""
@@ -87,7 +87,7 @@ async def test_elevenlabs_tts_synthesize():
8787

8888
@pytest.mark.asyncio
8989
@patch(
90-
"stream_agents.plugins.elevenlabs.tts.AsyncElevenLabs", MockAsyncElevenLabsClient
90+
"vision_agents.plugins.elevenlabs.tts.AsyncElevenLabs", MockAsyncElevenLabsClient
9191
)
9292
async def test_elevenlabs_tts_send():
9393
"""Test that send writes audio to the track and emits events."""

plugins/kokoro/tests/test_tts.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ def __call__(self, text, *, voice, speed, split_pattern): # noqa: D401
4343

4444

4545
@pytest.mark.asyncio
46-
@patch("stream_agents.plugins.kokoro.tts.KPipeline", _MockKPipeline)
46+
@patch("vision_agents.plugins.kokoro.tts.KPipeline", _MockKPipeline)
4747
async def test_kokoro_tts_initialization():
4848
tts = kokoro.TTS()
4949
assert tts is not None
5050

5151

5252
@pytest.mark.asyncio
53-
@patch("stream_agents.plugins.kokoro.tts.KPipeline", _MockKPipeline)
53+
@patch("vision_agents.plugins.kokoro.tts.KPipeline", _MockKPipeline)
5454
async def test_kokoro_synthesize_returns_iterator():
5555
tts = kokoro.TTS()
5656
stream = await tts.stream_audio("Hello")
@@ -65,7 +65,7 @@ async def test_kokoro_synthesize_returns_iterator():
6565

6666

6767
@pytest.mark.asyncio
68-
@patch("stream_agents.plugins.kokoro.tts.KPipeline", _MockKPipeline)
68+
@patch("vision_agents.plugins.kokoro.tts.KPipeline", _MockKPipeline)
6969
async def test_kokoro_send_writes_and_emits():
7070
tts = kokoro.TTS()
7171
track = MockAudioTrack()
@@ -94,7 +94,7 @@ async def _on_audio(event: TTSAudioEvent):
9494

9595

9696
@pytest.mark.asyncio
97-
@patch("stream_agents.plugins.kokoro.tts.KPipeline", _MockKPipeline)
97+
@patch("vision_agents.plugins.kokoro.tts.KPipeline", _MockKPipeline)
9898
async def test_kokoro_invalid_framerate():
9999
tts = kokoro.TTS()
100100
bad_track = MockAudioTrack(framerate=16_000)
@@ -104,15 +104,15 @@ async def test_kokoro_invalid_framerate():
104104

105105

106106
@pytest.mark.asyncio
107-
@patch("stream_agents.plugins.kokoro.tts.KPipeline", _MockKPipeline)
107+
@patch("vision_agents.plugins.kokoro.tts.KPipeline", _MockKPipeline)
108108
async def test_kokoro_send_without_track():
109109
tts = kokoro.TTS()
110110
with pytest.raises(ValueError):
111111
await tts.send("Hi")
112112

113113

114114
@pytest.mark.asyncio
115-
@patch("stream_agents.plugins.kokoro.tts.KPipeline", _MockKPipeline)
115+
@patch("vision_agents.plugins.kokoro.tts.KPipeline", _MockKPipeline)
116116
async def test_kokoro_tts_with_custom_client():
117117
"""Test that Kokoro TTS can be initialized with a custom client."""
118118
# Create a custom mock client
@@ -126,7 +126,7 @@ async def test_kokoro_tts_with_custom_client():
126126

127127

128128
@pytest.mark.asyncio
129-
@patch("stream_agents.plugins.kokoro.tts.KPipeline", _MockKPipeline)
129+
@patch("vision_agents.plugins.kokoro.tts.KPipeline", _MockKPipeline)
130130
async def test_kokoro_tts_stop_method():
131131
"""Test that the stop method properly flushes the audio track."""
132132
tts = kokoro.TTS()
@@ -146,7 +146,7 @@ async def test_kokoro_tts_stop_method():
146146

147147

148148
@pytest.mark.asyncio
149-
@patch("stream_agents.plugins.kokoro.tts.KPipeline", _MockKPipeline)
149+
@patch("vision_agents.plugins.kokoro.tts.KPipeline", _MockKPipeline)
150150
async def test_kokoro_tts_stop_method_handles_exceptions():
151151
"""Test that the stop method handles flush exceptions gracefully."""
152152
tts = kokoro.TTS()

tests/base_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import pytest
66
from torchvision.io.video import av
77

8-
from stream_agents.core.edge.types import PcmData
8+
from vision_agents.core.edge.types import PcmData
99

1010

1111
class BaseTest:

tests/test_conversation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from getstream.chat.client import ChatClient
1212
from getstream.models import MessageRequest, ChannelResponse, ChannelInput
1313

14-
from stream_agents.core.agents.conversation import (
14+
from vision_agents.core.agents.conversation import (
1515
Conversation,
1616
Message,
1717
InMemoryConversation,

tests/test_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import types
33
import dataclasses
44

5-
from stream_agents.core.events.manager import EventManager, ExceptionEvent
5+
from vision_agents.core.events.manager import EventManager, ExceptionEvent
66

77

88
@dataclasses.dataclass

tests/test_function_calling.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
import pytest
66
from unittest.mock import Mock, patch
77

8-
from stream_agents.core.llm import FunctionRegistry, function_registry
9-
from stream_agents.core.llm.llm import LLM
10-
from stream_agents.plugins.openai import LLM as OpenAILLM
11-
from stream_agents.plugins.anthropic import LLM as ClaudeLLM
12-
from stream_agents.plugins.gemini import LLM as GeminiLLM
8+
from vision_agents.core.llm import FunctionRegistry, function_registry
9+
from vision_agents.core.llm.llm import LLM
10+
from vision_agents.plugins.openai import LLM as OpenAILLM
11+
from vision_agents.plugins.anthropic import LLM as ClaudeLLM
12+
from vision_agents.plugins.gemini import LLM as GeminiLLM
1313

1414

1515
class TestFunctionRegistry:
@@ -166,7 +166,7 @@ class TestOpenAIFunctionCalling:
166166
"""Test OpenAI function calling functionality."""
167167

168168
@pytest.mark.asyncio
169-
@patch('stream_agents.plugins.openai.openai_llm.AsyncOpenAI')
169+
@patch('vision_agents.plugins.openai.openai_llm.AsyncOpenAI')
170170
async def test_openai_function_calling_response(self, mock_openai):
171171
"""Test OpenAI function calling response."""
172172
# Mock the OpenAI client and response
@@ -197,7 +197,7 @@ def get_weather(location: str) -> str:
197197
result = llm.call_function("get_weather", {"location": "New York"})
198198
assert result == "Weather in New York: Sunny, 72°F"
199199

200-
@patch('stream_agents.plugins.openai.openai_llm.AsyncOpenAI')
200+
@patch('vision_agents.plugins.openai.openai_llm.AsyncOpenAI')
201201
async def test_openai_conversational_response(self, mock_openai):
202202
"""Test OpenAI conversational response generation."""
203203
mock_client = Mock()
@@ -228,7 +228,7 @@ class TestClaudeFunctionCalling:
228228
"""Test Claude function calling functionality."""
229229

230230
@pytest.mark.asyncio
231-
@patch('stream_agents.plugins.anthropic.anthropic_llm.AsyncAnthropic')
231+
@patch('vision_agents.plugins.anthropic.anthropic_llm.AsyncAnthropic')
232232
async def test_claude_function_calling_response(self, mock_anthropic):
233233
"""Test Claude function calling response."""
234234
# Mock the Anthropic client and response
@@ -259,7 +259,7 @@ def get_weather(location: str) -> str:
259259
result = llm.call_function("get_weather", {"location": "New York"})
260260
assert result == "Weather in New York: Sunny, 72°F"
261261

262-
@patch('stream_agents.plugins.anthropic.anthropic_llm.AsyncAnthropic')
262+
@patch('vision_agents.plugins.anthropic.anthropic_llm.AsyncAnthropic')
263263
async def test_claude_conversational_response(self, mock_anthropic):
264264
"""Test Claude conversational response generation."""
265265
mock_client = Mock()
@@ -290,7 +290,7 @@ class TestGeminiFunctionCalling:
290290
"""Test Gemini function calling functionality."""
291291

292292
@pytest.mark.asyncio
293-
@patch('stream_agents.plugins.gemini.gemini_llm.genai')
293+
@patch('vision_agents.plugins.gemini.gemini_llm.genai')
294294
async def test_gemini_function_calling_response(self, mock_genai):
295295
"""Test Gemini function calling response."""
296296
# Mock the Gemini client and response
@@ -325,7 +325,7 @@ def get_weather(location: str) -> str:
325325
assert result == "Weather in New York: Sunny, 72°F"
326326

327327
@pytest.mark.asyncio
328-
@patch('stream_agents.plugins.gemini.gemini_llm.genai')
328+
@patch('vision_agents.plugins.gemini.gemini_llm.genai')
329329
async def test_gemini_conversational_response(self, mock_genai):
330330
"""Test Gemini conversational response generation."""
331331
mock_client = Mock()
@@ -478,7 +478,7 @@ def test_func(x: int) -> int:
478478
@pytest.mark.asyncio
479479
async def test_tool_lifecycle_events(self):
480480
"""Test that tool lifecycle events are emitted."""
481-
from stream_agents.core.llm.events import ToolStartEvent, ToolEndEvent
481+
from vision_agents.core.llm.events import ToolStartEvent, ToolEndEvent
482482

483483
llm = LLM()
484484

tests/test_mcp_integration.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
import os
33
import pytest
44

5-
from stream_agents.core.mcp.mcp_server_local import MCPServerLocal
6-
from stream_agents.core.mcp.mcp_server_remote import MCPServerRemote
7-
from stream_agents.core.agents import Agent
8-
from stream_agents.core.edge.types import User
9-
from stream_agents.plugins.openai.openai_llm import OpenAILLM
10-
from stream_agents.plugins import getstream, elevenlabs, deepgram
5+
from vision_agents.core.mcp.mcp_server_local import MCPServerLocal
6+
from vision_agents.core.mcp.mcp_server_remote import MCPServerRemote
7+
from vision_agents.core.agents import Agent
8+
from vision_agents.core.edge.types import User
9+
from vision_agents.plugins.openai.openai_llm import OpenAILLM
10+
from vision_agents.plugins import getstream, elevenlabs, deepgram
1111
from dotenv import load_dotenv
1212

1313
load_dotenv()

tests/test_openai_function_calling_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import pytest
33
import dotenv
44

5-
from stream_agents.plugins.openai import LLM as OpenAILLM
5+
from vision_agents.plugins.openai import LLM as OpenAILLM
66

77

88
dotenv.load_dotenv()

0 commit comments

Comments
 (0)