initial commit
sorry for no commit yesterday
This commit is contained in:
commit
6abcd39837
13 changed files with 159 additions and 0 deletions
38
.gitignore
vendored
Normal file
38
.gitignore
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
4
.idea/.gitignore
vendored
Normal file
4
.idea/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
/uiDesigner.xml
|
7
.idea/encodings.xml
Normal file
7
.idea/encodings.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
14
.idea/misc.xml
Normal file
14
.idea/misc.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="temurin-21" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
7
README.md
Normal file
7
README.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
This is a Java library you can write scripts for to support an api with conversational language models
|
||||
|
||||
The scripts are written in Groovy because it's powerful, but I'm thinking about other languages like Lua (which has not many features but I think some can be added)
|
||||
|
||||
Right now there is no sandboxing so every script has access to what this library has access
|
||||
|
||||
Don't take everything I wrote here for granted because I still have to think about how to make this stuff
|
25
pom.xml
Normal file
25
pom.xml
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>eu.m724</groupId>
|
||||
<artifactId>chatapi</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.groovy</groupId>
|
||||
<artifactId>groovy</artifactId>
|
||||
<version>4.0.22</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
12
src/main/java/eu/m724/Main.java
Normal file
12
src/main/java/eu/m724/Main.java
Normal file
|
@ -0,0 +1,12 @@
|
|||
package eu.m724;
|
||||
|
||||
import groovy.lang.GroovyShell;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello world!");
|
||||
GroovyShell shell = new GroovyShell();
|
||||
Object result = shell.evaluate("2 + 2");
|
||||
System.out.println(result);
|
||||
}
|
||||
}
|
5
src/main/java/eu/m724/chat/Chat.java
Normal file
5
src/main/java/eu/m724/chat/Chat.java
Normal file
|
@ -0,0 +1,5 @@
|
|||
package eu.m724.chat;
|
||||
|
||||
public class Chat {
|
||||
|
||||
}
|
8
src/main/java/eu/m724/chat/ChatMessage.java
Normal file
8
src/main/java/eu/m724/chat/ChatMessage.java
Normal file
|
@ -0,0 +1,8 @@
|
|||
package eu.m724.chat;
|
||||
|
||||
public interface ChatMessage {
|
||||
boolean isStreaming();
|
||||
|
||||
String getContent();
|
||||
|
||||
}
|
6
src/main/java/eu/m724/responsesource/ChatResponse.java
Normal file
6
src/main/java/eu/m724/responsesource/ChatResponse.java
Normal file
|
@ -0,0 +1,6 @@
|
|||
package eu.m724.responsesource;
|
||||
|
||||
public interface ChatResponse {
|
||||
boolean isStreaming();
|
||||
// TODO
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package eu.m724.responsesource;
|
||||
|
||||
public interface ChatResponseSource {
|
||||
ChatResponseSourceInfo info();
|
||||
|
||||
ChatResponse
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package eu.m724.responsesource;
|
||||
|
||||
public class ChatResponseSourceInfo {
|
||||
public final String name;
|
||||
public final String author;
|
||||
public final String versionName;
|
||||
public final int version;
|
||||
|
||||
public ChatResponseSourceInfo(
|
||||
String name,
|
||||
String author,
|
||||
String versionName,
|
||||
int version
|
||||
) {
|
||||
this.name = name;
|
||||
this.author = author;
|
||||
this.versionName = versionName;
|
||||
this.version = version;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue