-
Notifications
You must be signed in to change notification settings - Fork 502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move create_ai_function_info
to function_context.py
#1260
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"livekit-plugins-anthropic": patch | ||
"livekit-plugins-openai": patch | ||
"livekit-agents": patch | ||
--- | ||
|
||
Moved create_ai_function_info to function_context.py for better reusability and reduce repetation |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -289,6 +289,8 @@ async def recv_task(ws: aiohttp.ClientWebSocketResponse): | |
except Exception: | ||
logger.exception("failed to process AssemblyAI message") | ||
|
||
ws: aiohttp.ClientWebSocketResponse | None = None | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We didn't add assemblyai to the CI? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we have, but test case was failing because it wasn't able to access |
||
|
||
while True: | ||
try: | ||
ws = await self._connect_ws() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function was initially for OpenAI but if they all support the same kind of arguments (same json format).
Then it makes sense to move it.
Tho I'm not sure about what the implementation will looks like when we add support for structured output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep this function prefixed with _ tho. It's not really relevant to users