OpenAI.jl
OpenAI.jl copied to clipboard
FR: Responses API
It would be great to integrate the new Responses API from OpenAI.
Announcement: https://openai.com/index/new-tools-for-building-agents/
It seems mostly like copy&paste with completions endpoint but with a few added fields: https://platform.openai.com/docs/api-reference/responses/create
I'd love to do this, but I need to find a day job first
this works for me, maybe just add it to the source code?
It is almost a 1:1 copy of create_chat
export create_responses
function create_responses(api_key::String,
model_id::String,
input;
http_kwargs::NamedTuple = NamedTuple(),
streamcallback = nothing,
kwargs...)
return OpenAI.openai_request("responses",
api_key;
method = "POST",
http_kwargs = http_kwargs,
model = model_id,
input = input,
streamcallback = streamcallback,
kwargs...)
end