中立消息 ↔ OpenAI Responses API wire 格式转换。
OpenAI Responses 与 Chat Completions 的差别在协议形状,不在语义: system -> instructions;消息 -> input items;工具定义扁平化; function_call / function_call_output 是顶层 item。
中立消息 ↔ OpenAI Responses API wire 格式转换。 OpenAI Responses 与 Chat Completions 的差别在协议形状,不在语义: system -> instructions;消息 -> input items;工具定义扁平化; function_call / function_call_output 是顶层 item。
(neutral->wire system-prompt neutral-msgs)中立消息 -> {:instructions ... :input ...}。
config :system-prompt 在前,历史 system 消息在后;两者都存在时合并。
中立消息 -> {:instructions ... :input ...}。
config :system-prompt 在前,历史 system 消息在后;两者都存在时合并。(output-items response)读取 Responses 响应中的 output items(兼容 output 为单个 map 的旧实现)。
读取 Responses 响应中的 output items(兼容 output 为单个 map 的旧实现)。
Responses 原始 output items 的回放载荷标识。
Responses 原始 output items 的回放载荷标识。
(tool->wire tool)把 OpenAI Chat 工具 schema / 已带 :type 的原生工具转成 Responses 扁平工具。
把 OpenAI Chat 工具 schema / 已带 :type 的原生工具转成 Responses 扁平工具。
(wire-tool-call {:keys [call_id id name arguments] :as _item})Responses function_call item -> Chat Completions 形态的 tool_calls item。
Responses function_call item -> Chat Completions 形态的 tool_calls item。
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |