adachsoft/ai-integration-open-ai-responses

OpenAI responses integration for adachsoft/ai-integration.

Maintainers

Package info

gitlab.com/a.adach/ai-integration-open-ai-responses

Issues

pkg:composer/adachsoft/ai-integration-open-ai-responses

Transparency log

Statistics

Installs: 10

Dependents: 0

Suggesters: 0

Stars: 0

v0.1.0 2026-08-24 09:52 UTC

This package is auto-updated.

Last update: 2026-08-24 07:54:13 UTC


README

OpenAI Responses API integration for the adachsoft/ai-integration tool-calling API.

Installation

composer require adachsoft/ai-integration-open-ai-responses

Usage

use AdachSoft\AiIntegration\PublicApi\Builder\ToolCallingChatFacadeBuilder;
use AdachSoft\AiIntegrationOpenAiResponses\OpenAiResponsesToolCallingChatSpi;

$apiKey = getenv('OPENAI_API_KEY');

if (!is_string($apiKey) || $apiKey === '') {
    throw new RuntimeException('OPENAI_API_KEY must be configured.');
}

$builder = ToolCallingChatFacadeBuilder::create();
$builder->withSpiProvider(
    'openai-responses',
    new OpenAiResponsesToolCallingChatSpi(apiKey: $apiKey),
);

$facade = $builder->build();

The provider requires a model ID in each tool-calling chat request. It sends requests to the OpenAI Responses API endpoint at https://api.openai.com/v1/responses.

Production test

The production test requires a valid OpenAI API key and uses the gpt-5.1 model by default.

export OPENAI_API_KEY=your_api_key_here

vendor/bin/phpunit tests/Production/ToolCalling/OpenAiResponsesProviderProductionTest.php --group production