Skip to content

Should Uni<Image> work? #1373

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

Open
xstefank opened this issue Mar 18, 2025 · 3 comments
Open

Should Uni<Image> work? #1373

xstefank opened this issue Mar 18, 2025 · 3 comments
Labels
question Further information is requested

Comments

@xstefank
Copy link
Member

xstefank commented Mar 18, 2025

Maybe my expectations are wrong, but shouldn't this work?

@RegisterAiService
public interface GenerateImageAiService {

    Uni<Image> generateImage(String prompt);
}

Fails with Caused by: dev.langchain4j.service.IllegalConfigurationException: Illegal method return type: io.smallrye.mutiny.Uni<dev.langchain4j.data.image.Image>

Reproducer - https://github.com/xstefank/ai-cli/tree/612ce6d5c310ba37d0b60547a692f10f2dab04db/generate-image

@geoand
Copy link
Collaborator

geoand commented Mar 18, 2025

For the time being, Uni<> is not supported due to the blocking of LangChain4j.

@xstefank
Copy link
Member Author

@geoand that shouldn't block us in quarkus extension. I might take a look at that :).

@geoand
Copy link
Collaborator

geoand commented Mar 18, 2025

You are certainly welcome to try, but you'll find pretty soon that it's harder than you think 😉

@geoand geoand added the question Further information is requested label Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants