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
Add image generation support with Azure OpenAI #359
Conversation
Thanks! There are some refactorings of #298 on the way, the PR is close to be approved. I'll keep you posted! |
Awesome! I got access to Dall-e 3 this morning, so I'll do integration tests. |
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.
Thanks a lot! See my comments.
langchain4j-core/src/main/java/dev/langchain4j/model/image/ImageModel.java
Outdated
Show resolved
Hide resolved
...ain4j-azure-open-ai/src/main/java/dev/langchain4j/model/azure/InternalAzureOpenAiHelper.java
Outdated
Show resolved
Hide resolved
langchain4j-azure-open-ai/src/main/java/dev/langchain4j/model/azure/AzureOpenAiImageModel.java
Outdated
Show resolved
Hide resolved
langchain4j-azure-open-ai/src/main/java/dev/langchain4j/model/azure/AzureOpenAiImageModel.java
Show resolved
Hide resolved
...ain4j-azure-open-ai/src/main/java/dev/langchain4j/model/azure/InternalAzureOpenAiHelper.java
Outdated
Show resolved
Hide resolved
langchain4j-core/src/main/java/dev/langchain4j/data/image/Image.java
Outdated
Show resolved
Hide resolved
Thanks @Heezer !! This is fixing my 2 biggest issues with this API (not limiting to just 1 image, and being able to get the image content and not just the URL) |
...chain4j-azure-open-ai/src/test/java/dev/langchain4j/model/azure/AzureOpenAiImageModelIT.java
Outdated
Show resolved
Hide resolved
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.
@jdubois great job, thanks you! Just a few minor things, please check comments
langchain4j-azure-open-ai/src/main/java/dev/langchain4j/model/azure/AzureOpenAiImageModel.java
Outdated
Show resolved
Hide resolved
langchain4j-azure-open-ai/src/main/java/dev/langchain4j/model/azure/AzureOpenAiImageModel.java
Show resolved
Hide resolved
langchain4j-azure-open-ai/src/test/java/dev/langchain4j/model/azure/AzureOpenAiChatModelIT.java
Outdated
Show resolved
Hide resolved
langchain4j-azure-open-ai/src/main/java/dev/langchain4j/model/azure/AzureOpenAiImageModel.java
Outdated
Show resolved
Hide resolved
langchain4j-azure-open-ai/src/main/java/dev/langchain4j/model/azure/AzureOpenAiImageModel.java
Outdated
Show resolved
Hide resolved
langchain4j-azure-open-ai/src/main/java/dev/langchain4j/model/azure/AzureOpenAiImageModel.java
Show resolved
Hide resolved
langchain4j-azure-open-ai/src/main/java/dev/langchain4j/model/azure/AzureOpenAiImageModel.java
Show resolved
Hide resolved
langchain4j-azure-open-ai/src/main/java/dev/langchain4j/model/azure/AzureOpenAiImageModel.java
Show resolved
Hide resolved
langchain4j-azure-open-ai/src/main/java/dev/langchain4j/model/azure/AzureOpenAiImageModel.java
Show resolved
Hide resolved
langchain4j-core/src/main/java/dev/langchain4j/data/image/Image.java
Outdated
Show resolved
Hide resolved
…penai-image # Conflicts: # langchain4j-azure-open-ai/src/main/java/dev/langchain4j/model/azure/InternalAzureOpenAiHelper.java # langchain4j-azure-open-ai/src/test/java/dev/langchain4j/model/azure/AzureOpenAiImageModelIT.java # langchain4j-core/src/main/java/dev/langchain4j/data/image/Image.java # langchain4j-core/src/main/java/dev/langchain4j/model/image/ImageModel.java
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.
All comments from the review should be OK
langchain4j-azure-open-ai/src/test/java/dev/langchain4j/model/azure/AzureOpenAiChatModelIT.java
Outdated
Show resolved
Hide resolved
...chain4j-azure-open-ai/src/test/java/dev/langchain4j/model/azure/AzureOpenAiImageModelIT.java
Outdated
Show resolved
Hide resolved
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.
@jdubois just need to remove unused AzureAiMessage
and we're good
langchain4j-azure-open-ai/src/main/java/dev/langchain4j/model/azure/AzureAiMessage.java
Outdated
Show resolved
Hide resolved
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.
@jdubois thank you, great job!
Awesome!! Thanks @langchain4j @Heezer |
This uses the same LangChain classes as #298 by @Heezer
I copy/pasted those 2 files here as #298 isn't merged yet, and my goal is that we use the same API in the end.