Skip to content

Commit

Permalink
Git merge with main.
Browse files Browse the repository at this point in the history
  • Loading branch information
Buhake Sindi committed Dec 13, 2024
2 parents 59a9152 + 95d65d2 commit fc5c976
Show file tree
Hide file tree
Showing 23 changed files with 226 additions and 193 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ buildNumber.properties
.classpath

.idea

nb-configuration.xml

7 changes: 0 additions & 7 deletions examples/glassfish-car-booking/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
<dependency>
<groupId>io.smallrye.llm</groupId>
<artifactId>smallrye-llm-langchain4j-portable-extension</artifactId>
<version>1.0.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>jakarta.enterprise</groupId>
Expand Down Expand Up @@ -59,36 +58,30 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.32</version>
<scope>provided</scope>
</dependency>
<!-- langchain4j dependencies -->
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j</artifactId>
<version>${dev.langchain4j.version}</version>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-hugging-face</artifactId>
<version>${dev.langchain4j.version}</version>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-open-ai</artifactId>
<version>${dev.langchain4j.version}</version>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-embeddings-all-minilm-l6-v2</artifactId>
<version>${dev.langchain4j.version}</version>
</dependency>
<!-- SLF4J messages from langchain4j and Azure OpenAI SDK backed by JUL -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<scope>runtime</scope>
<version>2.0.9</version>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.time.temporal.ChronoUnit;

@SuppressWarnings("CdiManagedBeanInconsistencyInspection")
@RegisterAIService(tools = BookingService.class, chatMemoryMaxMessages = 10, chatLanguageModelName = "chat-model")
@RegisterAIService(tools = BookingService.class, chatLanguageModelName = "chat-model") // had chatMemoryMaxMessages = 10
public interface ChatAiService {

@SystemMessage("""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
import io.smallrye.llm.spi.RegisterAIService;

@SuppressWarnings("CdiManagedBeanInconsistencyInspection")
@RegisterAIService(chatMemoryMaxMessages = 5,

chatLanguageModelName = "chat-model")
@RegisterAIService(chatLanguageModelName = "chat-model") // had chatMemoryMaxMessages = 5
public interface FraudAiService {

@SystemMessage("""
Expand Down
13 changes: 2 additions & 11 deletions examples/helidon-car-booking-portable-ext/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,21 @@

<properties>
<mainClass>io.helidon.Main</mainClass>
<dev.langchain4j.version>0.36.0</dev.langchain4j.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.helidon</groupId>
<artifactId>helidon-bom</artifactId>
<version>4.0.7</version>
<version>4.0.12</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.helidon</groupId>
<artifactId>helidon-dependencies</artifactId>
<version>4.0.7</version>
<version>4.0.12</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -38,12 +37,10 @@
<dependency>
<groupId>io.smallrye.llm</groupId>
<artifactId>smallrye-llm-langchain4j-portable-extension</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.smallrye.llm</groupId>
<artifactId>smallrye-llm-langchain4j-config-mpconfig</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<!-- Adds all features available in MicroProfile -->
<dependency>
Expand Down Expand Up @@ -96,35 +93,29 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.32</version>
<scope>provided</scope>
</dependency>
<!-- langchain4j dependencies -->
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j</artifactId>
<version>${dev.langchain4j.version}</version>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-hugging-face</artifactId>
<version>${dev.langchain4j.version}</version>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-open-ai</artifactId>
<version>${dev.langchain4j.version}</version>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-embeddings-all-minilm-l6-v2</artifactId>
<version>${dev.langchain4j.version}</version>
</dependency>
<!-- Avoid ClassNotFoundException com.azure.xml.XmlProviders -->
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-xml</artifactId>
<version>1.0.0-beta.3</version>
<scope>runtime</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import io.smallrye.llm.spi.RegisterAIService;

@SuppressWarnings("CdiManagedBeanInconsistencyInspection")
@RegisterAIService(tools = BookingService.class, chatMemoryMaxMessages = 10, chatLanguageModelName = "chat-model")
@RegisterAIService(tools = BookingService.class, chatLanguageModelName = "chat-model") // had chatMemoryMaxMessages = 10
public interface ChatAiService {

@SystemMessage("""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
import io.smallrye.llm.spi.RegisterAIService;

@SuppressWarnings("CdiManagedBeanInconsistencyInspection")
@RegisterAIService(chatMemoryMaxMessages = 5,

chatLanguageModelName = "chat-model")
@RegisterAIService(chatLanguageModelName = "chat-model") // had chatMemoryMaxMessages = 5
public interface FraudAiService {

@SystemMessage("""
Expand Down
11 changes: 2 additions & 9 deletions examples/helidon-car-booking/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
<dependency>
<groupId>io.helidon</groupId>
<artifactId>helidon-bom</artifactId>
<version>4.0.7</version>
<version>4.0.12</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.helidon</groupId>
<artifactId>helidon-dependencies</artifactId>
<version>4.0.7</version>
<version>4.0.12</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -38,12 +38,10 @@
<dependency>
<groupId>io.smallrye.llm</groupId>
<artifactId>smallrye-llm-langchain4j-buildcompatible-extension</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.smallrye.llm</groupId>
<artifactId>smallrye-llm-langchain4j-config-mpconfig</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<!-- Adds all features available in MicroProfile -->
<dependency>
Expand Down Expand Up @@ -100,7 +98,6 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.32</version>
<scope>provided</scope>
</dependency>
<!-- langchain4j dependencies -->
Expand All @@ -111,23 +108,19 @@
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-hugging-face</artifactId>
<version>${dev.langchain4j.version}</version>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-open-ai</artifactId>
<version>${dev.langchain4j.version}</version>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-embeddings-all-minilm-l6-v2</artifactId>
<version>${dev.langchain4j.version}</version>
</dependency>
<!-- Avoid ClassNotFoundException com.azure.xml.XmlProviders -->
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-xml</artifactId>
<version>1.0.0-beta.3</version>
<scope>runtime</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import io.smallrye.llm.spi.RegisterAIService;

@SuppressWarnings("CdiManagedBeanInconsistencyInspection")
@RegisterAIService(tools = BookingService.class, chatMemoryMaxMessages = 10, chatLanguageModelName = "chat-model")
@RegisterAIService(tools = BookingService.class, chatLanguageModelName = "chat-model") // had chatMemoryMaxMessages = 10
public interface ChatAiService {

@SystemMessage("""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
import io.smallrye.llm.spi.RegisterAIService;

@SuppressWarnings("CdiManagedBeanInconsistencyInspection")
@RegisterAIService(chatMemoryMaxMessages = 5,

chatLanguageModelName = "chat-model")
@RegisterAIService(chatLanguageModelName = "chat-model") // had chatMemoryMaxMessages = 5
public interface FraudAiService {

@SystemMessage("""
Expand Down
Loading

0 comments on commit fc5c976

Please sign in to comment.