quarkiverse / quarkus-langchain4j

Quarkus Langchain4j extension
https://docs.quarkiverse.io/quarkus-langchain4j/dev/index.html
Apache License 2.0
148 stars 89 forks source link

Fix MismatchedInputException in Ollama streaming #1072

Closed jpohlmeyer closed 1 week ago

jpohlmeyer commented 1 week ago

Handle MismatchedInputException in catch-clause. It is either wrapped in ClientWebApplicationException with Status 400 or wrapped in ProcessingException depending on the Quarkus version.

See #685.

The diff display is a bit misleading, i only changed the catch and if clause + indentation.

Handling both cases in a single catch makes the if-clause a bit unwieldy, but two catch-clauses and extraction of the body to avoid code duplication was not really practical either.

quarkus-bot[bot] commented 1 week ago

Status for workflow Build (on pull request)

This is the status report for running Build (on pull request) on commit 5c3742b06037c27adcbccd5a96730544ff14f8c5.

:white_check_mark: The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.