public class ChatGPTStream extends Object
| Modifier and Type | Field and Description |
|---|---|
private String |
apiHost
反向代理
|
private String |
apiKey |
private List<String> |
apiKeyList |
private okhttp3.OkHttpClient |
okHttpClient |
private Proxy |
proxy
网络代理
|
private long |
timeout
连接超时
|
| Constructor and Description |
|---|
ChatGPTStream() |
| Modifier and Type | Method and Description |
|---|---|
ChatGPTStream |
init()
初始化
|
void |
streamChatCompletion(ChatCompletion chatCompletion,
okhttp3.sse.EventSourceListener eventSourceListener)
流式输出
|
void |
streamChatCompletion(List<Message> messages,
okhttp3.sse.EventSourceListener eventSourceListener)
流式输出
|
private String apiKey
private okhttp3.OkHttpClient okHttpClient
private long timeout
private Proxy proxy
private String apiHost
public ChatGPTStream init()
public void streamChatCompletion(ChatCompletion chatCompletion, okhttp3.sse.EventSourceListener eventSourceListener)
Copyright © 2024. All rights reserved.