接口 StreamingLanguageModel
- 所有已知实现类:
DisabledStreamingLanguageModel
public interface StreamingLanguageModel
Represents a language model that has a simple text interface (as opposed to a chat interface)
and can stream a response one token at a time.
It is recommended to use the
StreamingChatLanguageModel instead,
as it offers more features.-
方法概要
修饰符和类型方法说明default voidgenerate(Prompt prompt, StreamingResponseHandler<String> handler) Generates a response from the model based on a prompt.voidgenerate(String prompt, StreamingResponseHandler<String> handler) Generates a response from the model based on a prompt.
-
方法详细资料
-
generate
Generates a response from the model based on a prompt.- 参数:
prompt- The prompt.handler- The handler for streaming the response.
-
generate
Generates a response from the model based on a prompt.- 参数:
prompt- The prompt.handler- The handler for streaming the response.
-