Skip to main content

OpenAI Target adapter for Waken — routes waken Events to the OpenAI Responses API.

Project description

waken-openai

CI License: MIT

OpenAI Target adapter for Waken — "nginx for AI agents." Routes a waken Event to the OpenAI Responses API and returns a Response.

Install

pip install waken-openai

OPENAI_API_KEY must be set in the environment — that's the openai SDK's own convention, nothing waken-specific.

Usage

from waken import Runtime
from waken_openai import OpenAIAdapter

runtime = Runtime()
runtime.target("openai", OpenAIAdapter())
runtime.run()
waken send openai "Build tic tac toe." --wait

OpenAIAdapter keeps a waken session_id -> OpenAI response id map internally, so a multi-turn conversation (same event.session_id across calls) resumes via the Responses API's own previous_response_id — its native server-side continuation mechanism — instead of starting over each turn. Pass a model or extra client options at construction time:

runtime.target("openai", OpenAIAdapter(model="gpt-4o", organization="org-..."))

model defaults to "gpt-4.1". Any other keyword argument is forwarded straight to AsyncOpenAI(...) (api_key, organization, base_url, ...).

Development

git clone https://github.com/WakenHQ/waken-openai
cd waken-openai
pip install -e ".[dev]"
pytest

Tests mock openai.AsyncOpenAI entirely — no API key or network access needed to run the suite.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

waken_openai-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

waken_openai-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file waken_openai-0.1.0.tar.gz.

File metadata

  • Download URL: waken_openai-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for waken_openai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0ddc4318ea10b15813d5500aa02b0ebdfd68758b8725d2c94024189d17d6b19c
MD5 3aee3f54ca54777d123410ef7b985101
BLAKE2b-256 0d32f1d998b6c4e56a24a4bd6b4c36ea70436f38c781b05f52fbb787981e7073

See more details on using hashes here.

Provenance

The following attestation bundles were made for waken_openai-0.1.0.tar.gz:

Publisher: publish.yml on WakenHQ/waken-openai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file waken_openai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: waken_openai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for waken_openai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad09c8e224dbc176ee5b70b378792a65db197b94216fd73adec4e034c90771a9
MD5 3d95e8c30f554e47fb77fb87cf6935d4
BLAKE2b-256 0f093dc00a8192d52bcc971ce3864d750507142a73a464a78a831b94671bdb22

See more details on using hashes here.

Provenance

The following attestation bundles were made for waken_openai-0.1.0-py3-none-any.whl:

Publisher: publish.yml on WakenHQ/waken-openai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page