@Preview(value="3.1")
public interface ChatSession
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(ChatMessage... messages)
添加消息
|
void |
clear()
清空消息
|
List<ChatMessage> |
getMessages()
获取所有消息
|
String |
getSessionId()
获取会话id
|
default void |
loadNdjson(InputStream ins)
加载 ndjson
|
default void |
loadNdjson(String ndjson)
加载 ndjson
|
default String |
toNdjson()
转为 ndjson
|
default void |
toNdjson(OutputStream out)
转为 ndjson
|
String getSessionId()
List<ChatMessage> getMessages()
void addMessage(ChatMessage... messages)
void clear()
default String toNdjson() throws IOException
IOExceptiondefault void toNdjson(OutputStream out) throws IOException
IOExceptiondefault void loadNdjson(String ndjson) throws IOException
IOExceptiondefault void loadNdjson(InputStream ins) throws IOException
IOExceptionCopyright © 2025. All rights reserved.