Skip to content

Conversation

@glaforge
Copy link
Contributor

@glaforge glaforge commented May 23, 2025

This is an experimental integration with LangChain4j, to show that it's possible to open up ADK to all the models supported by the LangChain4j framework, and also Ollama or Docker Model Runner exposed models via LangChain4j.

@cornellgit
Copy link
Collaborator

This is awesome, created a contrib/ folder, we can put it there first then gradually iterate.

@glaforge
Copy link
Contributor Author

@cornellgit Good idea, my contribution will make more sense in a contrib folder! 😉

@glaforge
Copy link
Contributor Author

@cornellgit Moved my WIP experiment in the new contrib directory.
Haven't touched yet the implementation itself, there's still a fair bit of work to cover most tools for examples.
Once/if we want to release the contribution, we'll have to review the pom.xml to ensure this can be pushed to Maven Central at some point.

core/pom.xml Outdated
<java-websocket.version>1.6.0</java-websocket.version>
<jackson.version>2.19.0</jackson.version>
<okhttp.version>4.12.0</okhttp.version>
<langchain4j.version>1.0.1</langchain4j.version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wouldn't go here... witht the contrib/langchain4j "module" it (now) belongs in that POM, agreed?

Maybe it's easier to wait for #155, first; up to you.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glaforge remove this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glaforge sorry not remove, of course, but move from here (core) into the contrib/langchain/pom.xml would be "cleaner", no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be in core if it's specific to that module?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that the langchain4j.version is specific (only) to the contrib/langchain4j/pom.xml, IMHO this "belongs" there (but it's currently in core/pom.xml where IMHO it shouldn't be).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, you're right!

@vorburger
Copy link
Member

@glaforge now that #155 got (just) merged, do you want to rebase this, to use it? I'd be happy to then re-review it.

Then, if you would like to get this as-is, perhaps undraft it?

@glaforge
Copy link
Contributor Author

Thanks for the heads up! Good news!
I'll try to look into it tomorrow!

@glaforge glaforge changed the title [WIP] Proof of Concept integration with LangChain4j Integration with LangChain4j to support third-party and local models Jun 18, 2025
@glaforge
Copy link
Contributor Author

Rebased with the parent pom.xml

@glaforge glaforge marked this pull request as ready for review June 18, 2025 12:18
limitations under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With #155, you could remove a lot more here... if you like - note how both the core/pom.xml and the dev/pom.xml are [much] shorter, now. But it's not very important, if you prefer leaving this as-is, we (me) could also just do this in a later follow-up PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with the simplest thing, but I was wondering what should be moved back to the parent, etc.
If you have a concrete suggestion, I'm happy to apply it!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glaforge in the interest of not holding this up any further, let's leave it as-is for now, and see if maintainers agree to merge as-is. I'll follow up with a "POM clean up" sort of PR later, once this is merged.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

==> #206

Copy link
Member

@vorburger vorburger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, as an initial version.

Suggest that we merge this as-is, and then incrementally improve as needed.

limitations under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glaforge in the interest of not holding this up any further, let's leave it as-is for now, and see if maintainers agree to merge as-is. I'll follow up with a "POM clean up" sort of PR later, once this is merged.

Copy link
Contributor

@Poggecci Poggecci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to check in a change to our Copybara before this can get merged in

@copybara-service copybara-service bot merged commit 0d1bb89 into google:main Jun 18, 2025
5 checks passed
Copy link

@geragaelms-arch geragaelms-arch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Muy bueno

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants