OpenAI.jl icon indicating copy to clipboard operation
OpenAI.jl copied to clipboard

FR: Responses API

Open svilupp opened this issue 9 months ago • 2 comments

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

svilupp avatar Mar 11 '25 20:03 svilupp

I'd love to do this, but I need to find a day job first

roryl23 avatar Mar 13 '25 21:03 roryl23

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

kafisatz avatar Jun 03 '25 07:06 kafisatz