-
Notifications
You must be signed in to change notification settings - Fork 162
Misc Features #609
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
Misc Features #609
Conversation
|
|
||
export type ChatContent = ImageContent | AudioContent | string; | ||
|
||
export function createImageContent(params: { |
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.
add utility for creating image / audio content without specifying id
, cache
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
export { Agent, StopResponse, type AgentOptions } from './agent.js'; | ||
export { Agent, StopResponse, type AgentOptions, type ModelSettings } from './agent.js'; |
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.
Need this to be exposed to user for pipeline node overrides
if ( | ||
frame.type === VideoBufferType.RGBA || | ||
frame.type === VideoBufferType.BGRA || | ||
frame.type === VideoBufferType.ARGB || | ||
frame.type === VideoBufferType.ABGR || | ||
frame.type === VideoBufferType.RGB24 | ||
) { | ||
return frame; | ||
} | ||
|
||
// Otherwise, attempt conversion for other formats (like YUV) | ||
try { | ||
return frame.convert(VideoBufferType.RGBA); | ||
} catch (error) { | ||
throw new Error( | ||
`Failed to convert format ${frame.type} to RGB: ${error}. ` + | ||
`Consider using RGB/RGBA formats or converting on the client side.`, | ||
); | ||
} | ||
} |
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.
No need to review this, which was from a merged PR.
Misc features to help doc example writing