-
Notifications
You must be signed in to change notification settings - Fork 700
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
[FEATURE] Allow passing Image or collections of Image into AI Service method #1028
base: main
Are you sure you want to change the base?
[FEATURE] Allow passing Image or collections of Image into AI Service method #1028
Conversation
@@ -47,6 +53,18 @@ interface AiService { | |||
@UserMessage("What is the {{it}} of {{country}}?") | |||
String chat7(@V("it") String it, @V("country") String country); | |||
|
|||
@UserMessage("Count the number of cars in this image") | |||
String chat8(@UserMessage ImageContent imageContent); |
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.
Perhaps consider returning int
here since the expected output should always be an int.
I believe this is very interesting. @langchain4j what is your take on this? Do you have something else in mind or is does this match what you were planning to do in the future? |
@geoand seems good, but need to test all the possible combinations before merging: single image, multiple images, image+text, multiple images+text, etc |
I can expand the test, I will first work on a list of all needed combination to support. |
Makes sense, thanks for the explanation |
Issue
#938
Change
Add the ability to pass Image and ImageContent to AIServices.
Please note that I only added unit tests so far, as I'm looking for comments on style before continuing further.
General checklist
Checklist for adding new model integration
Checklist for adding new embedding store integration
{NameOfIntegration}EmbeddingStoreIT
that extends from eitherEmbeddingStoreIT
orEmbeddingStoreWithFilteringIT
Checklist for changing existing embedding store integration
{NameOfIntegration}EmbeddingStore
works correctly with the data persisted using the latest released version of LangChain4j