Skip to content

Feature/langchain4j chat with gemini chat model#588

Draft
milosF8 wants to merge 6 commits into
nextfrom
feature/langchain4j-chat-with-gemini-chat-model
Draft

Feature/langchain4j chat with gemini chat model#588
milosF8 wants to merge 6 commits into
nextfrom
feature/langchain4j-chat-with-gemini-chat-model

Conversation

@milosF8
Copy link
Copy Markdown
Collaborator

@milosF8 milosF8 commented May 26, 2026

Full implementation of camel-langchain4j with dynamic options/fields for api key and model.

@milosF8 milosF8 requested a review from skin27 May 26, 2026 11:21
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 26, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 13 complexity · 0 duplication

Metric Results
Complexity 13
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Comment thread camelBase/pom.xml Outdated
<artifactId>camel-langchain4j-chat</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.springboot</groupId>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In the Assimbly runtime we don't use Spring Boot starters, we only use regular dependencies. Best to remove this one. The model are regisered in the Camel registry, so they don't need to be autowired.

Comment thread camelBase/pom.xml Outdated
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j</artifactId>
<version>0.36.2</version>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We don't use version number directly in module pom.xml. We create a property in the main pom.xml and then reference to that property.

Comment thread camelBase/pom.xml Outdated
<version>0.36.2</version>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The Camel base only contains Camel dependencies. Other dependencies are placed in the commonBase.

@@ -0,0 +1,17 @@
package org.assimbly.dil.blocks.models;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this class still needed when it's already configured in the connection class.

- convertBodyTo:
type: String
- setHeader:
name: "CamelLangChain4jChatPromptTemplate"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This header is hardcoded and should be a variable. Probably this is already done for the sink. Make sure that action and sink are equal to each other (Except the outgoing to)

constant:
expression: "maak een grapje"
- to:
uri: "log:langchain4jin?showAll=true&multiline=true"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For production these log lines need to be removed (or at least set to DEBUG)

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.

4 participants