Cleanup
This commit is contained in:
@@ -47,9 +47,3 @@ uv run python src/agent.py dev
|
||||
|
||||
This agent requires a frontend application to communicate with. Use a [starter app](https://docs.livekit.io/agents/start/frontend/#starter-apps), our hosted [Sandbox](https://cloud.livekit.io/projects/p_/sandbox) frontends, or the [LiveKit Agents Playground](https://agents-playground.livekit.io/).
|
||||
|
||||
|
||||
Run tests
|
||||
|
||||
```console
|
||||
uv run pytest
|
||||
```
|
||||
@@ -1,24 +0,0 @@
|
||||
import pytest
|
||||
|
||||
from livekit.agents import AgentSession, llm
|
||||
from livekit.plugins import openai
|
||||
from agent import Assistant
|
||||
|
||||
|
||||
def _llm() -> llm.LLM:
|
||||
return openai.LLM(model="gpt-4o-mini", temperature=0.45)
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_greeting() -> None:
|
||||
|
||||
async with (
|
||||
_llm() as llm,
|
||||
AgentSession(llm=llm) as session,
|
||||
):
|
||||
await session.start(Assistant())
|
||||
result = await session.run(user_input="Hi there how are you?")
|
||||
await result.expect.message(role="assistant").judge(
|
||||
llm, intent="should offer a friendly greeting to the user"
|
||||
)
|
||||
result.expect.no_more_events()
|
||||
|
||||
+3
-26
@@ -9,36 +9,13 @@ description = "Simple voice AI assistant built with LiveKit Agents for Python"
|
||||
requires-python = ">=3.9"
|
||||
|
||||
dependencies = [
|
||||
"livekit-agents",
|
||||
"livekit-plugins-openai",
|
||||
"livekit-plugins-turn-detector",
|
||||
"livekit-plugins-silero",
|
||||
"livekit-plugins-cartesia",
|
||||
"livekit-plugins-deepgram",
|
||||
"python-dotenv",
|
||||
"livekit-agents[openai,turn-detector,silero,cartesia,deepgram]~=1.0",
|
||||
"livekit-plugins-noise-cancellation~=0.2.1",
|
||||
"python-dotenv",
|
||||
]
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"pytest",
|
||||
"pytest-asyncio",
|
||||
]
|
||||
|
||||
[tool.uv.sources]
|
||||
livekit-agents = { path = "../../livekit/agents/livekit-agents", editable = true }
|
||||
livekit-plugins-openai = { path = "../../livekit/agents/livekit-plugins/livekit-plugins-openai", editable = true }
|
||||
livekit-plugins-turn-detector = { path = "../../livekit/agents/livekit-plugins/livekit-plugins-turn-detector", editable = true }
|
||||
livekit-plugins-silero = { path = "../../livekit/agents/livekit-plugins/livekit-plugins-silero", editable = true }
|
||||
livekit-plugins-cartesia = { path = "../../livekit/agents/livekit-plugins/livekit-plugins-cartesia", editable = true }
|
||||
livekit-plugins-deepgram = { path = "../../livekit/agents/livekit-plugins/livekit-plugins-deepgram", editable = true }
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["src"]
|
||||
|
||||
[tool.setuptools.package-dir]
|
||||
"" = "src"
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
asyncio_mode = "auto"
|
||||
asyncio_default_fixture_loop_scope = "function"
|
||||
"" = "src"
|
||||
Reference in New Issue
Block a user