Skip to content
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

LangChain4j 1.0.0-alpha1 & Model Context Protocol client implementation and sample #1171

Merged
merged 2 commits into from
Dec 23, 2024

Conversation

jmartisk
Copy link
Collaborator

@jmartisk jmartisk commented Dec 18, 2024

Fixes #1146

@geoand
Copy link
Collaborator

geoand commented Dec 18, 2024

Very cool @jmartisk!

Can you provide a list of things that need to be done in order for this to move out of draft?

@jmartisk
Copy link
Collaborator Author

Yea I think it's basically ready except we need a langchain4j release that integrates this. If the langchain4j side gets any changes before the release, we might obviously need to adjust here.

@geoand
Copy link
Collaborator

geoand commented Dec 18, 2024

Cool thanks.

@langchain4j do you a timeline in your head about when the next LangChain4j release will go out?

@langchain4j
Copy link
Collaborator

@geoand targeting for tomorrow, but most probably this Friday

@geoand
Copy link
Collaborator

geoand commented Dec 18, 2024

Awesome, thanks!

@geoand
Copy link
Collaborator

geoand commented Dec 18, 2024

We'll probably also need @cescoffier's writing talents on this one :)

@jmartisk
Copy link
Collaborator Author

I'm planning to write up a blog post too :)

@jmartisk
Copy link
Collaborator Author

Seems we have a server-side framework ready (https://github.com/quarkiverse/quarkus-mcp-server/releases/tag/1.0.0.Alpha1), I'll probably try to add some tests that run our client against our server (rather than a dumb mock server). That could go into a new module inside integration-tests here, WDYT @mkouba and @geoand ?

@geoand
Copy link
Collaborator

geoand commented Dec 19, 2024

Makes perfect sense to me!

@mkouba
Copy link

mkouba commented Dec 19, 2024

Seems we have a server-side framework ready (https://github.com/quarkiverse/quarkus-mcp-server/releases/tag/1.0.0.Alpha1), I'll probably try to add some tests that run our client against our server (rather than a dumb mock server). That could go into a new module inside integration-tests here, WDYT @mkouba and @geoand ?

Makes sense! Keep in mind that it's still very alpha ;-).

@geoand
Copy link
Collaborator

geoand commented Dec 19, 2024

Keep in mind that it's still very alpha ;-)

As if we needed convincing of whether to ship it 😂

@jmartisk
Copy link
Collaborator Author

Ok this will need some adjustments after langchain4j/langchain4j#2315

@jmartisk jmartisk marked this pull request as ready for review December 23, 2024 10:10
@jmartisk jmartisk requested a review from a team as a code owner December 23, 2024 10:10
@jmartisk
Copy link
Collaborator Author

I've pushed an upgrade to LangChain4j 1.0.0-alpha1 as part of this. Haven't had time for the integration test yet, that may have to wait until after Christmas.

@jmartisk jmartisk changed the title Model Context Protocol client implementation and sample LangChain4j 1.0.0-alpha1 & Model Context Protocol client implementation and sample Dec 23, 2024

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@jmartisk jmartisk force-pushed the mcp branch 2 times, most recently from 312da89 to 40ea975 Compare December 23, 2024 11:54

This comment has been minimized.

@jmartisk
Copy link
Collaborator Author

Tests are passing now, except some Ollama stuff that fails with 404s, not sure what that is, it doesn't look related to the change?!

This comment has been minimized.

@geoand
Copy link
Collaborator

geoand commented Dec 23, 2024

But those tests pass in main, right?

@jmartisk
Copy link
Collaborator Author

Ah, a Wiremock declaration needed a slight change, hopefully, I've fixed it now...

Copy link
Collaborator

@geoand geoand left a comment

Choose a reason for hiding this comment

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

Awesome stuff!

This comment has been minimized.

Copy link

quarkus-bot bot commented Dec 23, 2024

Status for workflow Build (on pull request)

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

✅ 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.

@geoand geoand merged commit 6274d69 into quarkiverse:main Dec 23, 2024
70 checks passed
@jmartisk jmartisk deleted the mcp branch December 23, 2024 13:11
@geoand
Copy link
Collaborator

geoand commented Dec 23, 2024

I can't release because I am getting:

[WARNING] The POM for io.quarkiverse.langchain4j:quarkus-langchain4j-mcp-deployment:jar:999-SNAPSHOT is missing, no dependency information available
[ERROR] Quarkus Extension Dependency Verification Error
[ERROR] Deployment artifact io.quarkiverse.langchain4j:quarkus-langchain4j-mcp-deployment::jar:999-SNAPSHOT was found to be missing dependencies on the Quarkus extension artifacts marked with '-' below:
[ERROR] -     io.quarkiverse.langchain4j:quarkus-langchain4j-mcp::jar
[ERROR] -     io.quarkus:quarkus-arc-deployment::jar
[ERROR] -         io.quarkus:quarkus-core-deployment::jar
[ERROR] -     io.quarkus:quarkus-rest-client-jackson-deployment::jar
[ERROR] -         io.quarkus:quarkus-rest-jackson-common-deployment::jar
[ERROR] -             io.quarkus:quarkus-rest-common-deployment::jar
[ERROR] -             io.quarkus:quarkus-jsonp-deployment::jar
[ERROR] -         io.quarkus:quarkus-rest-client-deployment::jar
[ERROR] -             io.quarkus:quarkus-rest-client-jaxrs-deployment::jar
[ERROR] -             io.quarkus:quarkus-smallrye-stork-deployment::jar
[ERROR] -             io.quarkus:quarkus-rest-client-config-deployment::jar
[ERROR] -             io.quarkus:quarkus-tls-registry-deployment::jar
[ERROR] -     io.quarkiverse.langchain4j:quarkus-langchain4j-core-deployment::jar
[ERROR] -         io.quarkus:quarkus-jackson-deployment::jar
[ERROR] -         io.quarkus:quarkus-qute-deployment::jar
[ERROR] -         io.quarkus:quarkus-vertx-deployment::jar
[ERROR] -             io.quarkus:quarkus-netty-deployment::jar
[ERROR] -             io.quarkus:quarkus-mutiny-deployment::jar
[ERROR] -                 io.quarkus:quarkus-smallrye-context-propagation-deployment::jar
[ERROR] -             io.quarkus:quarkus-virtual-threads-deployment::jar

Nothing in the extension looks out of the ordinary...

@jmartisk
Copy link
Collaborator Author

From the log, it seems the mcp/deployment module was not in the build reactor at all, for some reason.

@geoand
Copy link
Collaborator

geoand commented Dec 23, 2024

Yeah, I'm trying to compare with other modules to see if there are any useful hints

@jmartisk
Copy link
Collaborator Author

I tend to think that #1181 will fix it

@geoand
Copy link
Collaborator

geoand commented Dec 23, 2024

#1182

@geoand
Copy link
Collaborator

geoand commented Dec 23, 2024

Ah, you beat me to it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MCP client implementation
4 participants