-
Notifications
You must be signed in to change notification settings - Fork 19
Inline Image Support #15
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
Conversation
Add wit changes Add Durability for Inline Implement for Openai, Openrouter,anthropic,grok Add Test7
Build and Test Pass but I can add error: the `Err`-variant returned from this function is very large
--> llm/src/event_source/mod.rs:37:39
|
37 | pub fn new(response: Response) -> Result<Self, Error> {
| ^^^^^^^^^^^^^^^^^^^
|
::: llm/src/event_source/error.rs:42:5
|
42 | InvalidContentType(HeaderValue, Response),
| ----------------------------------------- the largest variant contains at least 288 bytes
...
45 | InvalidStatusCode(StatusCode, Response),
| --------------------------------------- the variant `InvalidStatusCode` contains at least 250 bytes
|
= help: try reducing the size of `event_source::error::Error`, for example by boxing large elements or replacing it with `Box<event_source::error::Error>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
= note: `-D clippy::result-large-err` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::result_large_err)]`
error: the `Err`-variant returned from this function is very large
--> llm/src/event_source/mod.rs:97:42
|
97 | fn check_response(response: Response) -> Result<Response, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^
|
::: llm/src/event_source/error.rs:42:5
|
42 | InvalidContentType(HeaderValue, Response),
| ----------------------------------------- the largest variant contains at least 288 bytes
...
45 | InvalidStatusCode(StatusCode, Response),
| --------------------------------------- the variant `InvalidStatusCode` contains at least 250 bytes
|
= help: try reducing the size of `event_source::error::Error`, for example by boxing large elements or replacing it with `Box<event_source::error::Error>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
error: could not compile `golem-llm` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `golem-llm` (lib test) due to 2 previous errors
Error while executing command, exit code: 101 |
The new lint errors are coming because of the new Rust version (1.87). CI is always using the latest stable. It's ok to add |
Done, Fixed clippy by adding |
/closes #13
/claim #13
Link to Video -
Video Includes running test5 and test7 for anthropic, grok, openai, openrouter
Test is run by
golem-cli app deploy --build-profile <model>-deug
specific env
golem-cli worker invoke <worker> test5
andgolem-cli worker invoke <worker> test7
Changes to the WIT
In a earlier commit, I used
content-part {text, image-url, image-inline}
.Choose this over earlier idea and made both
image-url
andimage-source
as part of the sameimage(image-reference)
.OpenAI, Grok and Openrouter support inline image under image-url with small syntax change (Straight forward implementation)
Anthropic has a direct way to pass Base64 Image (Uses the inbuilt Base64 to pass the Image)
Test 7
There is cat.png under
data/cat.png
in test. We use golem Initial file system (using yaml) and the have the workers import the cat image as byte array, and get a response with the description of the imageTest 5
Test 5 previously did not have an output (unsure why ?), we now output the contents of LLM call as string, This is needed as CI ollama test can assert for output for all tests.
Added a few test in
durablity.rs
for base64 images