File tree Expand file tree Collapse file tree
src/main/java/io/github/hiwepy/opencode Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 * 三条通信通道相互独立:
1717 * </p>
1818 * <ul>
19- * <li><b>HTTP</b>:{@link #prompt } / {@link #promptAsync } / {@link #createSession} 等 — REST API</li>
19+ * <li><b>HTTP</b>:{@link #chatCompletion } / {@link #chatCompletionAsync } / {@link #createSession} 等 — REST API</li>
2020 * <li><b>SSE</b>:{@link #sse()} — 事件流</li>
2121 * <li><b>CLI</b>:{@link #cli()} — 本地 {@code opencode} 命令封装</li>
2222 * </ul>
@@ -158,20 +158,20 @@ public String ensureSession(String sessionKey) {
158158 }
159159
160160 /**
161- * 异步发送 prompt ,不等待响应。
161+ * 异步发送消息 ,不等待响应。
162162 *
163163 * @param sessionId 会话 ID
164164 * @param request prompt 请求
165165 * @return 是否成功提交
166166 */
167- public boolean promptAsync (String sessionId , PromptRequest request ) {
167+ public boolean chatCompletionAsync (String sessionId , PromptRequest request ) {
168168 return httpClient .promptAsync (sessionId , request );
169169 }
170170
171171 /**
172- * 快捷方式:异步发送纯文本 prompt 。
172+ * 快捷方式:异步发送纯文本消息 。
173173 */
174- public boolean promptAsync (String sessionId , String text ) {
174+ public boolean chatCompletionAsync (String sessionId , String text ) {
175175 return httpClient .promptAsync (sessionId , PromptRequest .ofText (text ));
176176 }
177177
You can’t perform that action at this time.
0 commit comments