mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-23 16:54:56 +00:00
Fix formatting issues in community environments - Applied black, isort, trailing whitespace, and end-of-file fixes - Remaining flake8 issues (unused imports, line length) noted for future cleanup
This commit is contained in:
parent
e85a170c34
commit
7f2e1a4f90
34 changed files with 1560 additions and 821 deletions
|
|
@ -1,19 +1,19 @@
|
|||
import logging
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
from pathlib import Path
|
||||
|
||||
from dotenv import load_dotenv
|
||||
from livekit.agents import Agent, AgentSession, JobContext, WorkerOptions, cli, mcp
|
||||
from livekit.plugins import deepgram, openai, silero
|
||||
from livekit.plugins.turn_detector.multilingual import MultilingualModel
|
||||
from dotenv import load_dotenv
|
||||
|
||||
|
||||
load_dotenv(os.path.join(os.path.dirname(__file__), '..', '..', '.env'))
|
||||
load_dotenv(os.path.join(os.path.dirname(__file__), "..", "..", ".env"))
|
||||
|
||||
|
||||
logger = logging.getLogger("mcp-agent")
|
||||
|
||||
load_dotenv(dotenv_path=Path(__file__).parent.parent / '.env')
|
||||
load_dotenv(dotenv_path=Path(__file__).parent.parent / ".env")
|
||||
|
||||
|
||||
class MyAgent(Agent):
|
||||
def __init__(self) -> None:
|
||||
|
|
@ -28,17 +28,18 @@ class MyAgent(Agent):
|
|||
tts=openai.TTS(voice="ash"),
|
||||
turn_detection=MultilingualModel(),
|
||||
mcp_servers=[
|
||||
mcp.MCPServerHTTP(
|
||||
url="https://mcp.gumloop.com/gcalendar/cY3bcaFS1qNdeVBnj0XIhnP4FEp2%3Aae99858e75594251bea9e05f32bb99b3",
|
||||
timeout=5,
|
||||
client_session_timeout_seconds=5,
|
||||
),
|
||||
]
|
||||
mcp.MCPServerHTTP(
|
||||
url="https://mcp.gumloop.com/gcalendar/cY3bcaFS1qNdeVBnj0XIhnP4FEp2%3Aae99858e75594251bea9e05f32bb99b3",
|
||||
timeout=5,
|
||||
client_session_timeout_seconds=5,
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
async def on_enter(self):
|
||||
self.session.generate_reply()
|
||||
|
||||
|
||||
async def entrypoint(ctx: JobContext):
|
||||
await ctx.connect()
|
||||
|
||||
|
|
@ -54,5 +55,4 @@ async def entrypoint(ctx: JobContext):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint,
|
||||
agent_name="mcp-agent"))
|
||||
cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint, agent_name="mcp-agent"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue