Skip to content

Examples for Azure ACA Dynamic Sessions tool and interfaces #142

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions azure-aca-dynamic-sessions-examples/helloworld.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!"");
}
}
156 changes: 156 additions & 0 deletions azure-aca-dynamic-sessions-examples/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/xsd/maven-4.0.0.xsd">

<!-- Model Version -->
<modelVersion>4.0.0</modelVersion>

<!-- Project Coordinates -->
<groupId>dev.langchain4j.examples</groupId>
<artifactId>azure-aca-dynamic-sessions-examples</artifactId>
<version>1.0.0-beta1</version>
<packaging>jar</packaging>

<!-- Properties -->
<properties>
<!-- Set Java version -->
<java.version>21</java.version>
</properties>

<!-- Dependencies -->
<dependencies>
<!-- LangChain4j Core -->
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j</artifactId>
<version>${project.version}</version>
</dependency>

<!-- LangChain4j OpenAI Module -->
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-azure-open-ai</artifactId>
<version>1.0.0-beta1</version>
</dependency>

<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-core</artifactId>
<version>${project.version}</version>
</dependency>

<!-- LangChain4j Azure ACA Dynamic Sessions Module --> <!-- LangChain4j Azure ACA Dynamic Sessions Module -->
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-azure-aca-dynamic-sessions</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Add HTTP client implementation for the langchain4j HTTP client abstraction -->
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-http-client-jdk</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Azure Identity SDK (if not included in your sessions module) -->
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.13.3</version>
</dependency>

<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.54.1</version>
</dependency>

<!-- OpenAI Java Client (if required) -->
<!-- Add any other necessary dependencies -->

<!-- Logging Dependencies (Optional) -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.22.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.22.0</version>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.4.12</version>
</dependency> <dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>

<!-- Testing Dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.10.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.8.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.8.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.24.2</version>
<scope>test</scope>
</dependency>

</dependencies>

<!-- Build Configuration -->
<build>
<plugins>
<!-- Maven Compiler Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<release>${java.version}</release>
<encoding>UTF-8</encoding>
</configuration>
</plugin>

<!-- Maven Exec Plugin (to run the example) -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<mainClass>aca.examples.AzureACADynamicSessionsExample</mainClass>
</configuration>
</plugin>
</plugins>
</build>

<!-- Repositories (if using SNAPSHOT versions or custom repositories) -->
<repositories>
<!-- Add repositories if necessary -->
</repositories>
</project>
Loading