Skip to content

Commit

Permalink
Merge tag 'v1.0-beta1' into develop
Browse files Browse the repository at this point in the history
first beta release
  • Loading branch information
bsorrentino committed Aug 2, 2024
2 parents df07e2d + 19accd3 commit 3e4ddc1
Show file tree
Hide file tree
Showing 11 changed files with 201 additions and 34 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path

name: Deploy New Version

on:
workflow_dispatch:
release:
types: [created]

jobs:
deploy-jdk8:

runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '17' ]
name: Java ${{ matrix.Java }} deploy
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: ${{ matrix.java }}
java-package: jdk
- name: GPG Setup
env:
GPG_KEY_BASE64: ${{ secrets.GPG_KEY_BASE64 }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: ./gpg-setup.sh
- name: Deploy to OSS Sonatype
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OSS_SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: mvn -B -Prelease source:jar javadoc:jar deploy --file pom.xml -s settings-template.xml -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,42 @@

# LangGraph for Java

[![Javadoc](https://img.shields.io/badge/Javadoc-Documentation-blue)][javadocs] [![Static Badge](https://img.shields.io/badge/maven--snapshots-1.0--SNAPSHOT-blue)][snapshots] [![Maven Central](https://img.shields.io/maven-central/v/org.bsc.langgraph4j-jdk8/langgraph4j-jdk8.svg)]()
[![Javadoc](https://img.shields.io/badge/Javadoc-Documentation-blue)][javadocs] [![Static Badge](https://img.shields.io/badge/maven--snapshots-1.0--SNAPSHOT-blue)]
[snapshots] [![Maven Central](https://img.shields.io/maven-central/v/org.bsc.langgraph4j/langgraph4j-core-jdk8.svg)]()

🦜🕸️LangGraph for Java. A library for building stateful, multi-agents applications with LLMs, built for work with [langchain4j]
> It is a porting of original [LangGraph] from [LangChain AI project][langchain.ai] in Java fashion

## News

| Date | Release | info
|--------------| --- | ---
| Jul 29, 2024 | `1.0-SNAPSHOT` | upgrade to langchain4j 0.33.0. improve **Playground Webapp**
| Jul 19, 2024 | `1.0-SNAPSHOT` | Add support of an embed **Playground Webapp** able to run Langgrap4j flow - [issue #9](https://github.com/bsorrentino/langgraph4j/issues/9)
| Jun 21, 2024 | `1.0-SNAPSHOT` | Add support of [Mermaid] diagram generation - [issue #5](https://github.com/bsorrentino/langgraph4j/issues/5)
| Jun 19, 2024 | `1.0-SNAPSHOT` | Add [adaptive rag](adaptice-rag/README.md) sample
| Jun 10, 2024 | `1.0-SNAPSHOT` | Refactoring how generate graph representation (plantuml)
| May 20, 2024 | `1.0-SNAPSHOT` | Add "[Image To PlantUML Diagram](agents-jdk8/README.md#generate-plantuml-diagram-from-image)" sample
| May 18, 2024 | `1.0-SNAPSHOT` | Add `getGraph()` method to `CompiledGraph` to return a [PlantUML] representation of your Graph
| Date | Release | info
|--------------|----------------| ---
| Aug 02, 2024 | `1.0-beta1` | first official beta release


## Quick Start

### Adding LangGraph dependency

> 👉 Currently are available only the developer SNAPSHOTs
#### Last stable version

**Maven**
```xml
<dependency>
<groupId>org.bsc.langgraph4j</groupId>
<artifactId>langgraph4j-core-jdk8</artifactId>
<version>1.0-beta1</version>
<dependency>
```

#### Development Version

**Maven**
```xml
<dependency>
<groupId>org.bsc.langgraph4j</groupId>
<artifactId>langgraph4j-jdk8</artifactId>
<artifactId>langgraph4j-core-jdk8</artifactId>
<version>1.0-SNAPSHOT</version>
<dependency>
```
Expand Down
4 changes: 2 additions & 2 deletions adaptive-rag/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.bsc.langgraph4j</groupId>
<artifactId>langgraph4j-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-beta1</version>
</parent>

<artifactId>langgraph4j-adaptive-rag</artifactId>
Expand All @@ -19,7 +19,7 @@

<dependency>
<groupId>org.bsc.langgraph4j</groupId>
<artifactId>langgraph4j-jdk8</artifactId>
<artifactId>langgraph4j-core-jdk8</artifactId>
<version>${project.version}</version>
</dependency>

Expand Down
4 changes: 2 additions & 2 deletions agent-executor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.bsc.langgraph4j</groupId>
<artifactId>langgraph4j-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-beta1</version>
</parent>

<artifactId>langgraph4j-agent-executor</artifactId>
Expand All @@ -19,7 +19,7 @@

<dependency>
<groupId>org.bsc.langgraph4j</groupId>
<artifactId>langgraph4j-jdk8</artifactId>
<artifactId>langgraph4j-core-jdk8</artifactId>
<version>${project.version}</version>
</dependency>

Expand Down
4 changes: 2 additions & 2 deletions core-jdk8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<parent>
<groupId>org.bsc.langgraph4j</groupId>
<artifactId>langgraph4j-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-beta1</version>
</parent>

<artifactId>langgraph4j-jdk8</artifactId>
<artifactId>langgraph4j-core-jdk8</artifactId>
<packaging>jar</packaging>
<name>langgraph4j::core::jdk8</name>
<description>A library for building stateful, multi-agents applications with LLMs</description>
Expand Down
9 changes: 9 additions & 0 deletions gpg-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

#
# Prepare GPG Key is expected to be in base64
# Exported with gpg -a --export-secret-keys "your@email" | base64 > gpg.base64
#
printf "$GPG_KEY_BASE64" | base64 --decode > gpg.asc
echo ${GPG_PASSPHRASE} | gpg --batch --yes --passphrase-fd 0 --import gpg.asc
gpg -k
4 changes: 2 additions & 2 deletions image-to-diagram/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.bsc.langgraph4j</groupId>
<artifactId>langgraph4j-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-beta1</version>
</parent>

<artifactId>langgraph4j-image-to-diagram</artifactId>
Expand All @@ -19,7 +19,7 @@

<dependency>
<groupId>org.bsc.langgraph4j</groupId>
<artifactId>langgraph4j-jdk8</artifactId>
<artifactId>langgraph4j-core-jdk8</artifactId>
<version>${project.version}</version>
</dependency>

Expand Down
53 changes: 42 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.bsc.langgraph4j</groupId>
<artifactId>langgraph4j-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-beta1</version>
<packaging>pom</packaging>

<name>langgraph4j::parent</name>
Expand All @@ -28,15 +28,6 @@
</snapshotRepository>
</distributionManagement>

<!--
<modules>
<module>core-jdk8</module>
<module>agent-executor</module>
<module>image-to-diagram</module>
<module>adaptive-rag</module>
<module>jetty</module>
</modules>
-->

<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -120,6 +111,47 @@
</dependencies>

</plugin>

<!--
====================================================================================
# https://github.com/keybase/keybase-issues/issues/2798
export GPG_TTY=$(tty)
mvn -Prelease source:jar javadoc:jar deploy -Dgpg.passphrase=thephrase
====================================================================================
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<keyname>bartolomeo.sorrentino@gmail.com</keyname>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>sonatype-server</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>

</plugins>

</pluginManagement>
Expand Down Expand Up @@ -152,7 +184,6 @@
<module>server-jetty</module>
</modules>
<build>
<!-- Define configuration for JDK >= 11 -->
</build>
</profile>
</profiles>
Expand Down
13 changes: 13 additions & 0 deletions scripts/changelog.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,18 @@
{{/commits}}
{{/ifContainsType}}

{{#ifContainsType commits type='ci'}}
### Continuous Integration

{{#commits}}
{{#ifCommitType . type='ci'}}
- {{#eachCommitScope .}} **{{.}}** {{/eachCommitScope}} {{{commitDescription .}}} ([{{hash}}](https://github.com/bsorrentino/langgraph4j/commit/{{hashFull}}))
{{#messageBodyItems}} > {{.}}
{{/messageBodyItems}}

{{/ifCommitType}}
{{/commits}}
{{/ifContainsType}}


{{/tags}}
7 changes: 4 additions & 3 deletions server-jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.bsc.langgraph4j</groupId>
<artifactId>langgraph4j-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-beta1</version>
</parent>

<artifactId>langgraph4j-server-jetty</artifactId>
Expand All @@ -30,7 +30,7 @@
<dependencies>
<dependency>
<groupId>org.bsc.langgraph4j</groupId>
<artifactId>langgraph4j-jdk8</artifactId>
<artifactId>langgraph4j-core-jdk8</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
Expand Down Expand Up @@ -138,7 +138,8 @@
<configuration>
<executable>java</executable>
<arguments>
<argument>-Djava.util.logging.config.file=${project.basedir}/logging.properties</argument>
<argument>-Djava.util.logging.config.file=${project.basedir}/
logging.properties</argument>
<argument>-classpath</argument>
<classpath/>
<argument>org.bsc.langgraph4j.AdaptiveRAGStreamingServer</argument>
Expand Down
70 changes: 70 additions & 0 deletions settings-template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings 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 http://maven.apache.org/xsd/settings-1.1.0.xsd">
<servers>

<server>
<id>sonatype-server</id>
<username>yEKudvqX</username>
<password>${env.OSS_SONATYPE_TOKEN}</password>
</server>

<server>
<id>github</id>
<username>bsorrentino</username>
<password>${env.GITHUB_TOKEN}</password>
</server>

</servers>

<profiles>

<profile>
<id>sonatype</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<snapshot.repo.id>sonatype-server</snapshot.repo.id>
<snapshot.repo.url>https://oss.sonatype.org/content/repositories/snapshots</snapshot.repo.url>
<release.repo.id>sonatype-server</release.repo.id>
<release.repo.url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</release.repo.url>
<group.repo.url>https://oss.sonatype.org/content/groups/public/</group.repo.url>
</properties>

<repositories>

<repository>
<id>sonatype-server</id>
<name>sonatype snapshots</name>
<url>${snapshot.repo.url}</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>

</repositories>

<pluginRepositories>

<pluginRepository>
<id>sonatype-server</id>
<name>sonatype snapshots</name>
<url>${snapshot.repo.url}</url>

<snapshots>
<updatePolicy>always</updatePolicy>
<checksumPolicy>ignore</checksumPolicy>
</snapshots>

</pluginRepository>

</pluginRepositories>
</profile>

</profiles>

</settings>

0 comments on commit 3e4ddc1

Please sign in to comment.