Support for OpenAI Responses API
https://platform.openai.com/docs/api-reference/responses
@brainlid I'm working on a PR to support this for my own uses, but before going too-too far, would this be welcome from your end?
Hi @LannyBose! Yes! I'd welcome the help and focus there. Thanks. 💯
@brainlid See #318
oh damn, i didnt notice anyone else was working on this. my idea for it can be found here https://github.com/brainlid/langchain/pull/336
I'm trying to use tool calling with an OpenAI compatible API with gpt-oss-120B (namely scaleway generative API)
The current implementation fails with the following API error
Received error from API: "No call message found for call_830a6dbe8c1d4ca5b39a04caf053aa3d None"
After much time tinkering, the fix was to change the ToolCall support for_api/2 by statically adding the status as nil in the response
# ToolCall support
def for_api(%ChatOpenAIResponses{} = _model, %ToolCall{type: :function} = fun) do
%{
"arguments" => Jason.encode!(fun.arguments),
"call_id" => fun.call_id,
"name" => fun.name,
"type" => "function_call",
"status" => nil
}
end
Given I'm not using the official OpenAI APIs I'm wondering if that's an issue with Scaleway or not. Could someone tell me if the current implementation works with OpenAI APIs so I can push a fix accordingly ?
Thanks