-
Notifications
You must be signed in to change notification settings - Fork 19
feat(harness): media feature with GenerateImageTool / GenerateVideoTool #208
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
Changes from all commits
a86cd4a
c423c70
d1834d6
4344959
97c0dda
fbfe37c
a3e491a
3eb9ade
dbb9ee7
c8bc8c9
3274d45
c3bf43f
7ea2f4b
75d9bd6
47daf87
b1e5b64
c8337b9
7d0feb9
27b1a9b
734bd8f
71b53f6
e04e02f
1fcdcb2
5f2d805
a00a4d8
9a9187f
abde659
47abdc6
9c8d7ff
5b76acd
91c58e3
87b9448
4c6a5dc
f7224ab
993710f
5f3f0a2
8b85258
f99d9f2
dfccaf7
a855e85
2c475ca
d1c3359
5690218
8196cdb
697cf36
e6640b0
5ef8817
56f6a7a
9afdfcf
89e0af7
e5c93b5
c610970
fb99b7c
543ec8a
9733f91
b2bad50
97796a9
fa76430
0bb6b97
00de77e
38d0f4e
7a0043a
fd69969
9a62be3
e8a510e
3f5af64
9c4b2b7
016908e
7f0cac8
bc57d93
1ff76e7
fcf7e88
9431527
a9c35c5
1afde3e
991cf28
0a8a55d
ca08008
9d52307
2df8633
f840510
c497df7
6ac4ff2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -354,6 +354,31 @@ impl From<tinyinference_embeddings::Error> for TinyAgentsError { | |
| } | ||
| } | ||
|
|
||
| #[cfg(feature = "media")] | ||
|
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. Gate these conversions on the exposed media feature The harness exposes [RULE] invalid-feature-gate · |
||
| impl From<tinyinference_image::Error> for TinyAgentsError { | ||
| fn from(error: tinyinference_image::Error) -> Self { | ||
| match error { | ||
| tinyinference_image::Error::Serialization(error) => Self::Serialization(error), | ||
| error @ (tinyinference_image::Error::Validation(_) | ||
| | tinyinference_image::Error::Unsupported { .. }) => { | ||
| Self::Validation(error.to_string()) | ||
| } | ||
| other => Self::Model(other.to_string()), | ||
| } | ||
| } | ||
| } | ||
|
|
||
| #[cfg(feature = "media")] | ||
| impl From<tinyinference_video::Error> for TinyAgentsError { | ||
| fn from(error: tinyinference_video::Error) -> Self { | ||
| match error { | ||
| tinyinference_video::Error::Media(error) => error.into(), | ||
| error @ tinyinference_video::Error::Timeout { .. } => Self::Timeout(error.to_string()), | ||
| other => Self::Model(other.to_string()), | ||
| } | ||
| } | ||
| } | ||
|
|
||
| impl TinyAgentsError { | ||
| /// Builds the right error for a structured provider failure, promoting a | ||
| /// recognised context overflow to [`TinyAgentsError::ContextOverflow`]. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.