Skip to content

Commit

Permalink
Google Gemini Chat Stream Support
Browse files Browse the repository at this point in the history
  • Loading branch information
jGauravGupta committed Nov 17, 2024
1 parent c595b54 commit cbf614d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,37 +176,37 @@
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-open-ai</artifactId>
<version>0.34.0</version>
<version>0.36.0</version>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-ollama</artifactId>
<version>0.34.0</version>
<version>0.36.0</version>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-local-ai</artifactId>
<version>0.34.0</version>
<version>0.36.0</version>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-mistral-ai</artifactId>
<version>0.34.0</version>
<version>0.36.0</version>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-anthropic</artifactId>
<version>0.34.0</version>
<version>0.36.0</version>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-google-ai-gemini</artifactId>
<version>0.34.0</version>
<version>0.36.0</version>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j</artifactId>
<version>0.34.0</version>
<version>0.36.0</version>
</dependency>
<dependency>
<groupId>org.commonmark</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import dev.langchain4j.model.chat.ChatLanguageModel;
import dev.langchain4j.model.chat.StreamingChatLanguageModel;
import dev.langchain4j.model.googleai.GoogleAiGeminiChatModel;
import dev.langchain4j.model.googleai.GoogleAiGeminiStreamingChatModel;
import dev.langchain4j.model.localai.LocalAiChatModel;
import dev.langchain4j.model.localai.LocalAiStreamingChatModel;
import dev.langchain4j.model.mistralai.MistralAiChatModel;
Expand Down Expand Up @@ -86,7 +87,7 @@ public JeddictChatModel(StreamingResponseHandler handler) {
if (preferencesManager.isStreamEnabled() && handler != null) {
switch (preferencesManager.getProvider()) {
case GOOGLE ->
model = GoogleAiGeminiChatModel.builder()
streamModel = GoogleAiGeminiStreamingChatModel.builder()
.apiKey(preferencesManager.getApiKey())
.modelName(preferencesManager.getModelName())
.build();
Expand Down

0 comments on commit cbf614d

Please sign in to comment.