Documentation
¶
Overview ¶
ABOUTME: OpenAI Responses API adapter implementing the ProviderAdapter interface. ABOUTME: Handles HTTP communication, SSE stream parsing, and request/response lifecycle.
ABOUTME: SSE stream event types and handlers for the OpenAI Responses API. ABOUTME: Split from adapter.go to keep files under 500 lines.
ABOUTME: Request/response translation between the unified llm types and OpenAI Responses API format. ABOUTME: Handles instructions extraction, flat input array mapping, tool definitions, and finish reasons.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter implements llm.ProviderAdapter for the OpenAI Responses API.
type Option ¶
type Option func(*Adapter)
Option configures an Adapter.
func WithBaseURL ¶
WithBaseURL overrides the default OpenAI API base URL.
func WithExtraHeaders ¶
WithExtraHeaders adds custom headers to every request. Useful for gateway authentication (e.g., cf-aig-token for Cloudflare AI Gateway).
func WithHTTPClient ¶
WithHTTPClient provides a custom http.Client.