Skip to content

Conversation

@hari-trugen
Copy link

Authored by: Hari Govind [email protected]

@hari-trugen
Copy link
Author

  • Added support for new TruGen.AI Realtime Avatar Plugin.
  • Added supporting usage examples for the same.

Copy link
Member

@tinalenguyen tinalenguyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi, thank you for submitting this PR! i left a few comments, but i couldn't test it out. i hit the max retries and kept receiving this error: Error creating voice to video session: concurrent session limit reached

let me know what may be causing this issue and when i could try again, thanks in advance!

if i < self._conn_options.max_retry - 1:
await asyncio.sleep(self._conn_options.retry_interval)

raise APIConnectionError("Max retry exhaused; Unable to start TruGen.AI Avatar Session.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
raise APIConnectionError("Max retry exhaused; Unable to start TruGen.AI Avatar Session.")
raise APIConnectionError("Max retries exhausted; Unable to start TruGen.AI Avatar Session.")

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @tinalenguyen,
This is implemented.

def __init__(
self,
*,
avatar_id: NotGivenOr[str | None] = NOT_GIVEN,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you set a default for avatar_id? maybe a variable DEFAULT_AVATAR_ID

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @tinalenguyen,
This is implemented.

livekit_api_key = livekit_api_key or (os.getenv("LIVEKIT_API_KEY") or NOT_GIVEN)
livekit_api_secret = livekit_api_secret or (os.getenv("LIVEKIT_API_SECRET") or NOT_GIVEN)
if not livekit_url or not livekit_api_key or not livekit_api_secret:
raise Exception(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you create and use a TrugenException class? this would match the patterns of our avatar plugins

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @tinalenguyen,
This is implemented.

- Added default avatar id to be used when nothing is passed.
- Changed API Connection Error phrasing.
@hari-trugen
Copy link
Author

Hi @tinalenguyen,
We have identified the issue with the MAX Concurrency Issue, we are working on it, and you should be able to test it later today. I will let you know.

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants