@Preview(value="3.1") public class ChatSessionDefault extends Object implements ChatSession
| Constructor and Description |
|---|
ChatSessionDefault() |
ChatSessionDefault(String sessionId) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(ChatMessage... messages)
添加消息
|
void |
clear()
清空消息
|
List<ChatMessage> |
getMessages()
获取所有消息
|
String |
getSessionId()
获取会话id
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitloadNdjson, loadNdjson, toNdjson, toNdjsonpublic ChatSessionDefault()
public ChatSessionDefault(String sessionId)
public String getSessionId()
getSessionId in interface ChatSessionpublic List<ChatMessage> getMessages()
getMessages in interface ChatSessionpublic void addMessage(ChatMessage... messages)
addMessage in interface ChatSessionpublic void clear()
clear in interface ChatSessionCopyright © 2025. All rights reserved.