move stuff

school starts today wish me lcuk
This commit is contained in:
Minecon724 2024-09-02 08:08:07 +02:00
parent 983c108eed
commit 111e74ca6f
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8
18 changed files with 83 additions and 53 deletions

30
pom.xml
View file

@ -31,4 +31,34 @@
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>m724</id>
<url>https://git.m724.eu/api/packages/Minecon724/maven</url>
</repository>
<snapshotRepository>
<id>m724</id>
<url>https://git.m724.eu/api/packages/Minecon724/maven</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<allowTimestampedSnapshots>true</allowTimestampedSnapshots>
</configuration>
</plugin>
</plugins>
</build>
<scm>
<developerConnection>scm:git:git@git.m724.eu:Minecon724/chatapi.git</developerConnection>
<tag>HEAD</tag>
</scm>
</project>

View file

@ -1,14 +1,14 @@
package eu.m724;
package eu.m724.chatapi;
import eu.m724.chat.Chat;
import eu.m724.chat.ChatEvent;
import eu.m724.chat.ChatMessage;
import eu.m724.example.OaiSource;
import eu.m724.source.ChatResponse;
import eu.m724.source.ChatSource;
import eu.m724.source.exception.HttpException;
import eu.m724.source.option.Option;
import eu.m724.source.option.Options;
import eu.m724.chatapi.chat.Chat;
import eu.m724.chatapi.chat.ChatEvent;
import eu.m724.chatapi.chat.ChatMessage;
import eu.m724.chatapi.example.OaiSource;
import eu.m724.chatapi.source.ChatResponse;
import eu.m724.chatapi.source.ChatSource;
import eu.m724.chatapi.source.exception.HttpException;
import eu.m724.chatapi.source.option.Option;
import eu.m724.chatapi.source.option.Options;
import java.util.NoSuchElementException;
import java.util.Scanner;

View file

@ -1,4 +1,4 @@
package eu.m724.chat;
package eu.m724.chatapi.chat;
import java.util.ArrayList;
import java.util.List;

View file

@ -1,4 +1,4 @@
package eu.m724.chat;
package eu.m724.chatapi.chat;
public record ChatEvent(
String text,

View file

@ -1,4 +1,4 @@
package eu.m724.chat;
package eu.m724.chatapi.chat;
public record ChatMessage(boolean assistant, String text) {
public static ChatMessage assistant(String text) {

View file

@ -1,13 +1,13 @@
package eu.m724.example
package eu.m724.chatapi.example
import eu.m724.chat.Chat
import eu.m724.chat.ChatEvent
import eu.m724.chat.ChatMessage
import eu.m724.source.ChatResponse
import eu.m724.source.ChatSource
import eu.m724.source.ChatSourceInfo
import eu.m724.source.option.Options
import eu.m724.source.option.StringOption
import eu.m724.chatapi.chat.Chat
import eu.m724.chatapi.chat.ChatEvent
import eu.m724.chatapi.chat.ChatMessage
import eu.m724.chatapi.source.ChatResponse
import eu.m724.chatapi.source.ChatSource
import eu.m724.chatapi.source.ChatSourceInfo
import eu.m724.chatapi.source.option.Options
import eu.m724.chatapi.source.option.StringOption
import java.util.concurrent.CompletableFuture
import java.util.concurrent.LinkedBlockingQueue

View file

@ -1,14 +1,14 @@
package eu.m724.example
package eu.m724.chatapi.example
import eu.m724.chat.Chat
import eu.m724.source.ChatResponse
import eu.m724.source.ChatSource
import eu.m724.source.ChatSourceInfo
import eu.m724.source.exception.HttpException
import eu.m724.source.impl.StreamingChatResponse
import eu.m724.source.option.DoubleOption
import eu.m724.source.option.Options
import eu.m724.source.option.StringOption
import eu.m724.chatapi.chat.Chat
import eu.m724.chatapi.source.ChatResponse
import eu.m724.chatapi.source.ChatSource
import eu.m724.chatapi.source.ChatSourceInfo
import eu.m724.chatapi.source.exception.HttpException
import eu.m724.chatapi.source.impl.StreamingChatResponse
import eu.m724.chatapi.source.option.DoubleOption
import eu.m724.chatapi.source.option.Options
import eu.m724.chatapi.source.option.StringOption
import org.json.JSONArray
import org.json.JSONObject

View file

@ -1,7 +1,7 @@
package eu.m724.source;
package eu.m724.chatapi.source;
import eu.m724.chat.ChatEvent;
import eu.m724.chat.ChatMessage;
import eu.m724.chatapi.chat.ChatEvent;
import eu.m724.chatapi.chat.ChatMessage;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.LinkedBlockingQueue;

View file

@ -1,7 +1,7 @@
package eu.m724.source;
package eu.m724.chatapi.source;
import eu.m724.chat.Chat;
import eu.m724.source.option.Options;
import eu.m724.chatapi.chat.Chat;
import eu.m724.chatapi.source.option.Options;
public interface ChatSource {
/**

View file

@ -1,4 +1,4 @@
package eu.m724.source;
package eu.m724.chatapi.source;
public record ChatSourceInfo(String name, String author, String versionName, int version) {
}

View file

@ -1,4 +1,4 @@
package eu.m724.source.exception;
package eu.m724.chatapi.source.exception;
// TODO rename?
public class HttpException extends Exception {

View file

@ -1,8 +1,8 @@
package eu.m724.source.impl;
package eu.m724.chatapi.source.impl;
import eu.m724.chat.ChatEvent;
import eu.m724.chat.ChatMessage;
import eu.m724.source.ChatResponse;
import eu.m724.chatapi.chat.ChatEvent;
import eu.m724.chatapi.chat.ChatMessage;
import eu.m724.chatapi.source.ChatResponse;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.LinkedBlockingQueue;

View file

@ -1,8 +1,8 @@
package eu.m724.source.impl;
package eu.m724.chatapi.source.impl;
import eu.m724.chat.ChatEvent;
import eu.m724.chat.ChatMessage;
import eu.m724.source.ChatResponse;
import eu.m724.chatapi.chat.ChatEvent;
import eu.m724.chatapi.chat.ChatMessage;
import eu.m724.chatapi.source.ChatResponse;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.LinkedBlockingQueue;

View file

@ -1,4 +1,4 @@
package eu.m724.source.option;
package eu.m724.chatapi.source.option;
public class DoubleOption extends Option<Double> {
private double minValue = Double.MIN_VALUE;

View file

@ -1,4 +1,4 @@
package eu.m724.source.option;
package eu.m724.chatapi.source.option;
public class NumberOption extends Option<Integer> {
private int minValue = Integer.MIN_VALUE;

View file

@ -1,4 +1,4 @@
package eu.m724.source.option;
package eu.m724.chatapi.source.option;
import java.lang.reflect.ParameterizedType;

View file

@ -1,4 +1,4 @@
package eu.m724.source.option;
package eu.m724.chatapi.source.option;
import java.util.*;
import java.util.function.Function;

View file

@ -1,4 +1,4 @@
package eu.m724.source.option;
package eu.m724.chatapi.source.option;
import java.util.regex.Pattern;