| Modifier and Type | Method and Description |
|---|---|
static ChatResponse |
toChatResponse(PromptResult result)
PromptResult → ChatResponse。
|
static PromptRequest |
toPromptRequest(ChatRequest chatRequest)
ChatRequest → PromptRequest。
|
public static PromptRequest toPromptRequest(ChatRequest chatRequest)
取最后一条 user 消息的 content 作为 text part;model "provider/model" 拆分为 ModelRef; agent / system 直传。
chatRequest - OpenAI 风格的聊天请求public static ChatResponse toChatResponse(PromptResult result)
getTextContent() → choices[0].message.content。
result - OpenCode Prompt 执行结果Copyright © 2026. All rights reserved.