Feature/langchain4j chat with gemini chat model#588
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 13 |
| Duplication | 0 |
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.
| <artifactId>camel-langchain4j-chat</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.camel.springboot</groupId> |
There was a problem hiding this comment.
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.
| <dependency> | ||
| <groupId>dev.langchain4j</groupId> | ||
| <artifactId>langchain4j</artifactId> | ||
| <version>0.36.2</version> |
There was a problem hiding this comment.
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.
| <version>0.36.2</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>dev.langchain4j</groupId> |
There was a problem hiding this comment.
The Camel base only contains Camel dependencies. Other dependencies are placed in the commonBase.
| @@ -0,0 +1,17 @@ | |||
| package org.assimbly.dil.blocks.models; | |||
There was a problem hiding this comment.
Is this class still needed when it's already configured in the connection class.
| - convertBodyTo: | ||
| type: String | ||
| - setHeader: | ||
| name: "CamelLangChain4jChatPromptTemplate" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
For production these log lines need to be removed (or at least set to DEBUG)
Full implementation of camel-langchain4j with dynamic options/fields for api key and model.