public class KimiEventSourceLinsener
extends okhttp3.sse.EventSourceListener
| 限定符和类型 | 字段和说明 |
|---|---|
private Callable<okhttp3.sse.EventSource> |
callBack |
private CountDownLatch |
eventLatch |
private List<CommonAIMessage> |
history |
private StringBuilder |
json |
private java.util.function.Consumer<String> |
kimiAiResponseDetail |
(专用程序包) Map<String,java.util.function.Function<Map<String,String>,String>> |
kimiFunctionDriverMap |
private StringBuilder |
localContent |
private List<KimiAiToolCallsMessage> |
messages |
private String |
upRole |
| 构造器和说明 |
|---|
KimiEventSourceLinsener(java.util.function.Consumer<String> kimiAiResponseDetail,
Callable callBack,
Map<String,java.util.function.Function<Map<String,String>,String>> kimiFunctionDriverMap,
List<CommonAIMessage> history,
CountDownLatch eventLatch) |
| 限定符和类型 | 方法和说明 |
|---|---|
(专用程序包) void |
addLocalContent(KimiChatResponse response) |
private void |
eventCancel(okhttp3.sse.EventSource eventSource) |
void |
onClosed(okhttp3.sse.EventSource eventSource) |
void |
onEvent(okhttp3.sse.EventSource eventSource,
String id,
String type,
String data) |
void |
onFailure(okhttp3.sse.EventSource eventSource,
Throwable t,
okhttp3.Response response) |
void |
onOpen(okhttp3.sse.EventSource eventSource,
okhttp3.Response response) |
private String upRole
private StringBuilder localContent
private StringBuilder json
private java.util.function.Consumer<String> kimiAiResponseDetail
private List<CommonAIMessage> history
private Callable<okhttp3.sse.EventSource> callBack
private volatile CountDownLatch eventLatch
Map<String,java.util.function.Function<Map<String,String>,String>> kimiFunctionDriverMap
private List<KimiAiToolCallsMessage> messages
public KimiEventSourceLinsener(java.util.function.Consumer<String> kimiAiResponseDetail, Callable callBack, Map<String,java.util.function.Function<Map<String,String>,String>> kimiFunctionDriverMap, List<CommonAIMessage> history, CountDownLatch eventLatch)
void addLocalContent(KimiChatResponse response)
public void onClosed(@NotNull
okhttp3.sse.EventSource eventSource)
onClosed 在类中 okhttp3.sse.EventSourceListenerpublic void onEvent(@NotNull
okhttp3.sse.EventSource eventSource,
@Nullable
String id,
@Nullable
String type,
@NotNull
String data)
onEvent 在类中 okhttp3.sse.EventSourceListenerprivate void eventCancel(okhttp3.sse.EventSource eventSource)
public void onFailure(@NotNull
okhttp3.sse.EventSource eventSource,
@Nullable
Throwable t,
@Nullable
okhttp3.Response response)
onFailure 在类中 okhttp3.sse.EventSourceListenerpublic void onOpen(@NotNull
okhttp3.sse.EventSource eventSource,
@NotNull
okhttp3.Response response)
onOpen 在类中 okhttp3.sse.EventSourceListenerCopyright © 2024. All rights reserved.