Skip to main content

Cohere connector for Python

Install with pip install dex-connector-cohere==0.1.0. The package requires dex-connectors-sdk==0.1.0 and dex-python-sdk>=1.28.0, and implements the manifest Queries embed and rerank with the same branches, defaults, and failure classification as the Go module.

Operations

Operation Factory Happy branch Optional branches
embed new_embed_step embedded providerRejected, invalidResponse, defect
rerank new_rerank_step ranked providerRejected, invalidResponse, defect

embed takes a model, 1 to 96 nonblank texts, and an input type (search_document, search_query, classification, or clustering) and returns one float vector per text. rerank takes a model, a query, 1 to 1000 nonblank documents, and an optional top_n, and returns each document's index and relevance score in ranked order. Both calls may be billed, so the manifest allows three attempts within five minutes. 408, 409, 429, 5xx, and transport failures retry; 401 and 498 select providerRejected with an authentication kind, and 403 with an authorization kind.

Authorization

Create a Dex Web connection named cohere as described in the connector README. The API key travels only in the Authorization: Bearer header and is resolved for every attempt.

Example

examples/cohere_search embeds a query and then reranks candidate documents. Run the Worker with uv run python -m examples.cohere_search.worker after dexcli dev has loaded a project containing the cohere connection.

Tests

coheremock.Mock scripts both Queries and defaults to the manifest answers. Run uv run pytest tests for provider parity and manifest contract checks.

Metadata

Release files for dex-connector-cohere 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dex-connector-cohere 0.1.0
File Size Uploaded Provenance Actions
dex_connector_cohere-0.1.0.tar.gz 71.6 kB Without provenance Details for dex_connector_cohere-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dex-connector-cohere 0.1.0
File Interpreter ABI Platform Actions
dex_connector_cohere-0.1.0-py3-none-any.whl Python 3 none any Details for dex_connector_cohere-0.1.0-py3-none-any.whl

Total release size: 88.5 kB

Release files / dex_connector_cohere-0.1.0.tar.gz

Download URL dex_connector_cohere-0.1.0.tar.gz
Size 71.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0834bd821982bfa332d389020c4c5337d8116ba91c4d7c594c915cfed2d542b9
BLAKE2b-256 checksum
How to use checksums
9e90309679cd90de5310f08c35a4662e5a99f2adc4dbcd10c0f7f56a1c83a7a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / dex_connector_cohere-0.1.0-py3-none-any.whl

Download URL dex_connector_cohere-0.1.0-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f425dde98f8ff3d8dcf0adf049ba763068d40e3397c96702e1c6006dd6243aa
BLAKE2b-256 checksum
How to use checksums
d4dd4ea3483d04055bc463a6e78c9cd53674411d55df65aad1813e7b681351be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for dex-connector-cohere 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page