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

Contributing and extending Spring Boot support #980

Open
ThomasVitale opened this issue Apr 19, 2024 · 7 comments
Open

Contributing and extending Spring Boot support #980

ThomasVitale opened this issue Apr 19, 2024 · 7 comments

Comments

@ThomasVitale
Copy link
Contributor

First of all, thanks a lot @langchain4j for building such a great framework!

In the last few months, I’ve been working on Spring Boot support for LangChain4j in this project: https://github.com/ThomasVitale/langchain4j-spring-boot. It’s the library that @LizeRaes and I used in our presentation at KubeCon+CloudNativeCon Europe (https://www.youtube.com/watch?v=FSAi9FwetJE).

I’m reaching out to share that if there was any interest, I’d be happy to contribute any part of that library to this repository.

The project follows the Spring Boot conventions and provides:

  • Autoconfiguration and unified configuration properties for models and vector stores
  • HTTP infrastructure with RestClient, WebClient (coming soon), and Jackson for all integrations
  • Built-in observability with Micrometer, including LLM-specific metrics and traces (which might also partly be delivered to the LangChain4j core library for basic observability support)
  • Dev services with Docker Compose and Testcontainers for models and vector stores
  • Service bindings for automatic connection configuration when running on Kubernetes
  • Partial GraalVM native compilation support (limited by upstream issues in the Java gRPC library I'm currently looking at)
@lucifer-Hell
Copy link

lucifer-Hell commented Apr 19, 2024

Hi @ThomasVitale , @langchain4j , just wanted to know do we have any existing support for building cruds via prompts integrated in spring boot . I think that is a really boring process for re-building the same type of apis , again and again . Only difference it comes is the change of objects / POJOs . Also If we can just mention the object details and one sample of our ( repo , controller and service ) and then let the ai build the same structure for remaining objects. By same structure i am talking about simple crud apis like create delete and update types which usually remains same for the object but is suspectible for change.

@langchain4j
Copy link
Owner

langchain4j commented Apr 19, 2024

HI @ThomasVitale this is awesome! Sure, you're very welcome!
I tried to setup some SB integration here but I do not have that much experience and not enough time, so it would be great if someone could curate SB side of things.
Do you think we can "merge" those 2 repos together?

Regarding http clients and json serialization, I plan to decouple clients from those 2 things to avoid duplication and give more flexibility to choose desired http/json implementations.

Regarding observability, yes, there is a plan to add a generic support in the core library, and it is high prio, so I will probably work on it next week or the week after.

@langchain4j
Copy link
Owner

@lucifer-Hell sounds like Spring Data REST?

@lucifer-Hell
Copy link

yes thanks a lot for sharing . I wonder why i didn't came across it till now.

@ThomasVitale
Copy link
Contributor Author

@langchain4j that's great, thanks for your reply! How would you like to proceed with the merge? Would it make sense to arrange a Zoom call to sort out a strategy, also considering the upcoming changes to HTTP clients and JSON?

@LizeRaes
Copy link
Collaborator

@ThomasVitale awesome, a lot of these features are very welcome! @langchain4j I think Thomas already did a lot on the observability side (even close to display the cost of the calls on the fly 🔥), so if you both have time, do get on a call, these might be very valuable extensions 😊 Thank you both!

@langchain4j
Copy link
Owner

@ThomasVitale sounds good! When do you have time?

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

No branches or pull requests

4 participants