-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from wxbty/graph
Add Graph module for saa
- Loading branch information
Showing
230 changed files
with
23,639 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
Copyright 2023-2024 the original author or authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
https://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.alibaba.cloud.ai</groupId> | ||
<artifactId>spring-ai-alibaba</artifactId> | ||
<version>${revision}</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>spring-ai-alibaba-graph</artifactId> | ||
<packaging>pom</packaging> | ||
|
||
<modules> | ||
<module>spring-ai-alibaba-graph-core</module> | ||
<module>spring-ai-alibaba-graph-samples</module> | ||
<module>spring-ai-alibaba-graph-studio</module> | ||
</modules> | ||
|
||
|
||
</project> |
3 changes: 3 additions & 0 deletions
3
spring-ai-alibaba-graph/spring-ai-alibaba-graph-core/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 🦜🕸️ SpringAiAlibabaGraph Core | ||
|
||
This is the core library for SpringAiAlibabaGraph. |
80 changes: 80 additions & 0 deletions
80
spring-ai-alibaba-graph/spring-ai-alibaba-graph-core/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.alibaba.cloud.ai</groupId> | ||
<artifactId>spring-ai-alibaba</artifactId> | ||
<version>${revision}</version> | ||
<relativePath>../../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>spring-ai-alibaba-graph-core</artifactId> | ||
<packaging>jar</packaging> | ||
<name>spring-ai-alibaba::core::jdk8</name> | ||
<description>A library for building stateful, multi-agents applications with LLMs</description> | ||
|
||
|
||
<properties> | ||
<maven.compiler.source>8</maven.compiler.source> | ||
<maven.compiler.target>8</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<!-- | ||
<dependency> | ||
<groupId>net.jodah</groupId> | ||
<artifactId>typetools</artifactId> | ||
<version>0.6.3</version> | ||
</dependency> | ||
--> | ||
|
||
<dependency> | ||
<groupId>org.bsc.async</groupId> | ||
<artifactId>async-generator-jdk8</artifactId> | ||
<version>2.0.1</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-jdk14</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
</build> | ||
|
||
<reporting> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<configuration> | ||
<!-- Specify the Java version | ||
<source>1.8</source> | ||
--> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</reporting> | ||
</project> |
56 changes: 56 additions & 0 deletions
56
.../spring-ai-alibaba-graph-core/src/main/java/com/alibaba/cloud/ai/graph/CompileConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package com.alibaba.cloud.ai.graph; | ||
|
||
import lombok.Getter; | ||
import com.alibaba.cloud.ai.graph.checkpoint.BaseCheckpointSaver; | ||
|
||
import java.util.Optional; | ||
|
||
import static java.util.Optional.ofNullable; | ||
|
||
public class CompileConfig { | ||
|
||
private BaseCheckpointSaver checkpointSaver; | ||
|
||
@Getter | ||
private String[] interruptBefore = {}; | ||
|
||
@Getter | ||
private String[] interruptAfter = {}; | ||
|
||
public Optional<BaseCheckpointSaver> checkpointSaver() { | ||
return ofNullable(checkpointSaver); | ||
} | ||
|
||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
public static class Builder { | ||
|
||
private final CompileConfig config = new CompileConfig(); | ||
|
||
public Builder checkpointSaver(BaseCheckpointSaver checkpointSaver) { | ||
this.config.checkpointSaver = checkpointSaver; | ||
return this; | ||
} | ||
|
||
public Builder interruptBefore(String... interruptBefore) { | ||
this.config.interruptBefore = interruptBefore; | ||
return this; | ||
} | ||
|
||
public Builder interruptAfter(String... interruptAfter) { | ||
this.config.interruptAfter = interruptAfter; | ||
return this; | ||
} | ||
|
||
public CompileConfig build() { | ||
return config; | ||
} | ||
|
||
} | ||
|
||
private CompileConfig() { | ||
} | ||
|
||
} |
Oops, something went wrong.