Create Cohere Connector

Generates a custom Cohere Connector with one command. Cohere Connectors enable to combine Cohere's large language models (LLMs), which power the Chat API, with up-to-date factual information. They enhance Cohere's retrieval augmented generation (RAG) offering, and can respond to user questions and prompts with substantive, grounded generations that contain citations to external public or private knowledge bases.
Note that this is an experimental project. If something doesn’t work, please file an issue.
You might also refer to the official Cohere repo for Connectors: https://github.com/cohere-ai/quick-start-connectors
🧮 What is included?
Your environment will have everything you need to quickly prototype and deploy a custom Cohere Connector:
API serviceimplementing the requiredsearchendpoint using FastAPI (support for Flask is planned).Bearer Token Authenticationusing the Authorization header in HTTP requests.Pydantic modelsfor data validation and serialization.Client classto retrieve data from a custom data source.Deploy scriptto register your connector with Cohere.
🚀 Quickstart
- Install
create-cohere-connectorpackage:
You might install this package globall:
poetry self add poetry-scaffold
or within a virtual environment:
# Windows
py -m venv .venv
.venv\scripts\activate
# macOS/Linux
python3 -m venv .venv
source .venv/bin/activate
pip3 install create-cohere-connector
- Bootstrap your project:
poetry run create-cohere-connector
This will prompt for a project name:
Project name [myconnector]: hello-connector
Api framework [FastAPI]: FastAPI
Authentication [Bearer]: Bearer
Caching [None]: None
generate the initial project structure:
myconnector
├── README.md
├── deploy.py
├── Dockerfile
├── pyproject.toml
├── poetry.lock
├── .gitignore
└── provider
├── __init__.py
├── app.py
├── config.py
├── client.py
├── provider.py
├── exceptions.py
└── datamodels.py
and install dependencies:
✅ Project created successfully!
- Set environment variables
You might rename .env_template to .env, and complete it.
- Span a shell within the virtual environment
poetry shell
- Install dependencies
poetry config virtualenvs.in-project true
poetry install --no-root
- Start API service
poetry run uvicorn app:app --app-dir provider --port 5000 --reload
- Deploy Cohere Connector
python deploy.py
👩💻 Contributions
If you would like to contribute, here are some features that we are planning to add:
- Improve Poetry virtual environment creation
- Flask support
- Semantic caching
- OAuth 2.0
- Data models scaffolding
⚖️ License
Create Cohere Connector is open source software licensed as Apache 2.0.
Release files for create-cohere-connector 0.1.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| create_cohere_connector-0.1.12.tar.gz | 13.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| create_cohere_connector-0.1.12-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.7 kB
Release files / create_cohere_connector-0.1.12.tar.gz
| Download URL | create_cohere_connector-0.1.12.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
481ed9959987c462e034d81c0e9ea949176e386b1ec015e772576d03f2cde34c
|
|
BLAKE2b-256 checksum How to use checksums |
ae9829b472c9b0d11be2acdf59d970c1d5dd3d5c2120b3f5dbbe3c97f2e8bb3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.1 Windows/11
|
Release files / create_cohere_connector-0.1.12-py3-none-any.whl
| Download URL | create_cohere_connector-0.1.12-py3-none-any.whl |
|---|---|
| Size | 17.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
60d4085bc81fdbcd4c6be0b7d0fd27b4b503168431681500262440639d6b4b97
|
|
BLAKE2b-256 checksum How to use checksums |
8bc4acc015627f2dbc2f211460d66d1d24e2bc461764be865466ff145175af83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.1 Windows/11
|