chat-responses 0.1.0

Generic OpenAI Responses API client for chat-rs. Bring your own server.
Documentation

Generic OpenAI Responses API client.

Targets the /responses endpoint and its SSE event stream (response.created, response.output_text.delta, etc.). This crate owns the wire types — provider crates that ship a Responses-API surface (today: chat-openai; planned: chat-groq's Responses path) wrap [ResponsesBuilder] and preset URL + auth + any provider-specific tool declarations.

Provider-specific native tools (OpenAI's web_search, image_generation, etc.) are passed in as pre-materialized Values via [ResponsesBuilder::with_tool_declaration]. The wrapper owns the tool trait; this crate stays trait-agnostic.

use chat_responses::ResponsesBuilder;

let client = ResponsesBuilder::new()
    .with_base_url("https://api.openai.com/v1")
    .with_model("gpt-4o")
    .with_api_key("sk-...")
    .build();