public interface StreamCallBack
| Modifier and Type | Method and Description |
|---|---|
default void |
onEnd(String callBackId,
StreamResult streamResult,
LLMResp llmResp)
结束调用,LLM流式调用结束后回调
|
default void |
onError(String callBackId,
StreamResult streamResult)
调用出错,LLM流式调用出错时回调
|
default void |
onNewToken(String callBackId,
LLMResp llmResp)
LLM流式调用返回新的结果时回调
|
default void |
onStart(String callBackId)
开始调用,在给LLM发送流式调用请求后回调
|
default void onStart(String callBackId)
callBackId - 一次回调过程中的唯一IDdefault void onEnd(String callBackId, StreamResult streamResult, LLMResp llmResp)
callBackId - 一次回调过程中的唯一IDstreamResult - 流式请求的结果llmResp - LLM完整的返回结果default void onError(String callBackId, StreamResult streamResult)
callBackId - 一次回调过程中的唯一IDstreamResult - 流式请求的结果Copyright © 2024. All rights reserved.