Class ChatResponse

java.lang.Object
io.github.easy4j.opencode.api.model.ChatResponse

public class ChatResponse extends Object
OpenAI Chat Completions API response (aligned with OpenClaw/Hermes).

OpenCode internally returns PromptResult; the SDK automatically converts: PromptResult.getTextContent() is mapped to choices[0].message.content.

Since:
1.0.0
Author:
Loong Wan
See Also:
  • Constructor Details

    • ChatResponse

      public ChatResponse()
  • Method Details

    • getContent

      public String getContent()
      快捷获取第一选择的消息内容。
      Returns:
      服务端或 CLI 返回的文本值;无内容时可能为空字符串