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

Google AI Gemini: implement Spring Boot starter #2103

Open
langchain4j opened this issue Nov 13, 2024 · 12 comments · May be fixed by langchain4j/langchain4j-spring#92 or langchain4j/langchain4j-spring#74
Assignees
Labels
enhancement New feature or request Gemini good first issue Good for newcomers P3 Medium priority Spring Boot

Comments

@langchain4j
Copy link
Owner

Implement Spring Boot starter for langchain4j-google-ai-gemini in https://github.com/langchain4j/langchain4j-spring repo

@langchain4j langchain4j added enhancement New feature or request good first issue Good for newcomers P3 Medium priority Spring Boot labels Nov 13, 2024
Copy link

/cc @glaforge (gemini)

@Suhas-Koheda
Copy link
Contributor

@langchain4j hey can i try working on it ?
I have just started reading docs related to gemini api in langchain4j
I can refer to the other starter packs and create it

@langchain4j
Copy link
Owner Author

@Suhas-Koheda sure, thank you in advance!

@Suhas-Koheda
Copy link
Contributor

@langchain4j hey is there a streaming model for google gemini ai ?
i am unable to find any class of streaming model

@Suhas-Koheda
Copy link
Contributor

Okay jus found out that i was on the older version of langchain4j lol

@Suhas-Koheda
Copy link
Contributor

@langchain4j hey i have opened a pr regarding this :)

@langchain4j
Copy link
Owner Author

@Suhas-Koheda thanks a lot, I will try to review it ASAP

@emredmrcan
Copy link
Contributor

@langchain4j I’ve created a PR addressing the issue. It should resolve and close this issue. Please let me know if any changes are needed!

@Suhas-Koheda
Copy link
Contributor

Suhas-Koheda commented Dec 2, 2024

@emredmrcan excuse me hey!
It was previously assigned to me :-)
Thank you!

@langchain4j
Copy link
Owner Author

@emredmrcan thank you, but @Suhas-Koheda is already working on this issue. What's the point to spend time on the duplicated effort?

@emredmrcan
Copy link
Contributor

@emredmrcan excuse me hey! It was previously assigned to me :-) Thank you!

@Suhas-Koheda Yes, you are right. My bad! I thought you changed your direction after I just saw this message and read the title of your PR here (Change the safetySetting builder to support map of harmCategory and HarmBlockThreshold and toolConfig to support geminiMode and ListofFunctionNames). I needed to check further. I hope my PR request will be helpful for your implementation. I am sure it is missing some test cases and there are ways to improve it. Sorry again!

@emredmrcan thank you, but @Suhas-Koheda is already working on this issue. What's the point to spend time on the duplicated effort?

@langchain4j I added Chroma as a spring-boot-starter yesterday and I was thinking to add this quickly since I got familiar with. However, I missed the effort of @Suhas-Koheda. And you are right, there is no point to spend time on duplicated effort

langchain4j pushed a commit that referenced this issue Dec 2, 2024
…armBlockThreshold and toolConfig to support geminiMode and ListofFunctionNames (#2217)

## Issue
Related to PR of SpringBootStarterImplementation  of  GoogleAIGemini  #2103

## Change
The Safety Settings and Tool Config for the streaming chat model were
not properly configured
The chat model and streaming chat model used different configurations 
changed the configurations of GoogleAIGeminiStreamingChatModel 
Changed the test configuration to check the workign of safetySettings
since the GeminiModel returns the FINISHREASON as STOP so changed them
to make the test cases passed in both chatModel and StreamingChatModel
This pr if accepted makes the work related to spring boot starter
implementation complete


## General checklist
- [ x] There are no breaking changes
- [ x] I have added unit and/or integration tests for my change
- [ ] The tests cover both positive and negative cases
- [ ] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [ ] I have manually run all the unit and integration tests in the
[core](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-core)
and
[main](https://github.com/langchain4j/langchain4j/tree/main/langchain4j)
modules, and they are all green
<!-- Before adding documentation and example(s) (below), please wait
until the PR is reviewed and approved. -->
- [ ] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [ ] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment