このページはまだお使いの言語に翻訳されていないか、翻訳が技術レビュー待ちです。以下には英語の原文を表示しています。 英語のページを開く
Cohere Integration
Add governance to Cohere Command R API calls. Control Zero intercepts requests through the Governance Gateway and enforces your dashboard policies on every interaction.
Overview
Cohere provides language models including Command R and Command R+. When routed through the Control Zero Governance Gateway via the OpenAI-compatible /v1/chat/completions endpoint, every request is governed by your policies and logged for audit.
Cohere supports the OpenAI-compatible wire format, so the integration reuses the same interceptors and policy enforcement as the OpenAI integration.
Setup
1. Configure the Gateway
Enable the Cohere provider in your Governance Gateway configuration:
# Environment variables for the gateway
CZ_GATEWAY_COHERE_ENABLED=true
CZ_GATEWAY_COHERE_API_KEY=your_cohere_api_key
2. Route Requests Through the Gateway
Point your client at the gateway's Cohere endpoint:
import openai
# Route through Control Zero gateway instead of direct Cohere
client = openai.OpenAI(
base_url="http://localhost:8000/cohere/v1",
api_key="cz_live_your_key_here",
)
response = client.chat.completions.create(
model="command-r-plus",
messages=[{"role": "user", "content": "Summarize the key points of this quarterly report."}],
)
print(response.choices[0].message.content)