Skip to content

Comments

run bidi:prepare#97

Merged
pgrayy merged 1 commit intomainfrom
bidi-prepare
Nov 29, 2025
Merged

run bidi:prepare#97
pgrayy merged 1 commit intomainfrom
bidi-prepare

Conversation

@pgrayy
Copy link
Collaborator

@pgrayy pgrayy commented Nov 29, 2025

Description

Running hatch run bidi:prepare to address conflicts after latest merges.

Testing

  • I ran the following test script:
import asyncio
import json

from strands import tool
from strands.experimental.bidi import BidiAgent
from strands.experimental.bidi.models import BidiGeminiLiveModel
from strands.experimental.bidi.models import BidiOpenAIRealtimeModel
from strands.experimental.bidi.models import BidiNovaSonicModel
from strands.experimental.bidi.io import BidiAudioIO, BidiTextIO


@tool
async def time_tool() -> str:
    print("TIME")
    return "12:01"

async def main() -> None:
    print("MAIN - starting agent")
    model = BidiNovaSonicModel()
    # model = BidiOpenAIRealtimeModel(client_config={"timeout_s": 90})
    # model = BidiGeminiLiveModel(client_config={"api_key": "..."})
    agent = BidiAgent(model=model, tools=[time_tool])

    audio_io = BidiAudioIO()
    text_io = BidiTextIO()

    try:
        run_coro = agent.run(inputs=[audio_io.input(), text_io.input()], outputs=[audio_io.output(), text_io.output()])
        await asyncio.wait_for(run_coro, timeout=90)
    except asyncio.TimeoutError:
        pass

    print(f"MAIN - stopping agent: {json.dumps(agent.messages, indent=2)}")


if __name__ == "__main__":
    asyncio.run(main())

@pgrayy pgrayy marked this pull request as ready for review November 29, 2025 21:38
@pgrayy pgrayy merged commit 505de3e into main Nov 29, 2025
20 of 23 checks passed
@pgrayy pgrayy deleted the bidi-prepare branch November 29, 2025 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants