Skip to content

Add Responses API quickstart#55

Open
georgeatparallel wants to merge 2 commits into
parallel-web:mainfrom
georgeatparallel:feat/responses-api-cookbook
Open

Add Responses API quickstart#55
georgeatparallel wants to merge 2 commits into
parallel-web:mainfrom
georgeatparallel:feat/responses-api-cookbook

Conversation

@georgeatparallel

@georgeatparallel georgeatparallel commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • add a Python quickstart for cited research through the OpenAI-compatible Responses API
  • make exactly one API call per invocation, then parse and deduplicate URL citation annotations
  • surface a clear contract error when the response contains no citations instead of retrying client-side
  • add deterministic tests, an opt-in single-call live test, a locked uv environment, and cookbook registration

Why

The public cookbook did not have a direct Responses API example. This gives developers familiar with the OpenAI SDK a small, copyable first run that needs only a Parallel API key.

The example intentionally keeps the product contract visible: one request either returns cited output or fails clearly. It does not add retry behavior that could create extra billed calls or conceal missing citation annotations.

Validation

  • uv lock --check
  • uv run pytest -m "not live" -q (7 passed, 1 deselected)
  • RUN_LIVE_TESTS=1 uv run pytest -m live -q (1 passed, 7 deselected; exactly one API call)
  • Ruff format and lint
  • pre-commit secret and hygiene hooks
  • cookbook JSON schema validation

@georgeatparallel
georgeatparallel marked this pull request as ready for review July 20, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant