mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 12:07:42 +00:00
[feature][headless-chat]Introduce ChatApp to support more flexible chat model config.#1739
This commit is contained in:
@@ -11,7 +11,6 @@ import lombok.NoArgsConstructor;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ChatApp {
|
||||
private String key;
|
||||
private String name;
|
||||
private String description;
|
||||
private String prompt;
|
||||
|
||||
@@ -8,8 +8,8 @@ import java.util.Map;
|
||||
public class ChatAppManager {
|
||||
private static final Map<String, ChatApp> chatApps = Maps.newConcurrentMap();
|
||||
|
||||
public static void register(ChatApp chatApp) {
|
||||
chatApps.put(chatApp.getKey(), chatApp);
|
||||
public static void register(String key, ChatApp app) {
|
||||
chatApps.put(key, app);
|
||||
}
|
||||
|
||||
public static Map<String, ChatApp> getAllApps() {
|
||||
|
||||
Reference in New Issue
Block a user