Skip to main content

Cohere Target adapter for Waken — routes waken Events to Cohere's chat API.

Project description

waken-cohere

CI License: MIT

A Cohere Target adapter for Waken — routes waken Events to Cohere's chat API (cohere.AsyncClientV2) and returns a Response.

Install

pip install waken-cohere

COHERE_API_KEY (or Cohere's own preferred CO_API_KEY) must be set in the environment — the SDK reads it automatically, no wiring needed.

Usage

from waken import Runtime
from waken_cohere import CohereAdapter

runtime = Runtime()
runtime.target("cohere", CohereAdapter())
runtime.run()

Sessions

Cohere's chat API is stateless: there's no server-side conversation id to resume, just a message list you resend in full every turn. This adapter keeps that list itself, keyed by waken's session_id, entirely in memory — it is lost on restart and never shared across processes. Two Events sharing a session_id get a continued conversation; an Event with no session_id is a one-off call that leaves no trace.

Development

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

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_cohere-0.1.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

waken_cohere-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for waken_cohere-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1e9b215cdeb55fde11cb37dc9b9e129f73b2a2f62a0bdc6eb91586eae85bc66a
MD5 220b3e2b37e9901621bf21ad4d36440a
BLAKE2b-256 5f473bc559ce29f0cca61ecec9ad152f69b533aba6bab61a2b14caa155ecd415

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on WakenHQ/waken-cohere

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_cohere-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for waken_cohere-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 91ef57f39886709f23df6ea0ebffe8cee7112e52d6824696b0f2eade2633b75b
MD5 c8f5b568842d1bba91d126d77b922673
BLAKE2b-256 70bbbc0492de9e63cfafa9e089f2f2ae62d73318d9609ded6f334edcae87f67f

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on WakenHQ/waken-cohere

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