cohere-webhooks-events

Featured

Implement Cohere streaming event handling, SSE patterns, and connector webhooks. Use when building streaming UIs, handling chat/tool events, or registering Cohere connectors for RAG. Trigger with phrases like "cohere streaming", "cohere events", "cohere SSE", "cohere connectors", "cohere webhook".

AI & Automation 2,944 stars 440 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Cohere Streaming Events & Connectors ## Overview Handle Cohere's streaming chat events (SSE), tool-call events, citation events, and register data connectors for RAG. Cohere does not use traditional webhooks — its event model is streaming-based. ## Prerequisites - `cohere-ai` SDK v7+ - Understanding of Server-Sent Events (SSE) - For connectors: HTTPS endpoint accessible from internet ## Instructions ### Step 1: Chat Streaming Events Cohere's `chatStream` returns a stream of typed events: ```typescript import { CohereClientV2 } from 'cohere-ai'; const cohere = new CohereClientV2(); async function handleStream(userMessage: string) { const stream = await cohere.chatStream({ model: 'command-a-03-2025', messages: [{ role: 'user', content: userMessage }], }); for await (const event of stream) { switch (event.type) { // Text content streaming case 'content-start': console.log('--- Generation started ---'); break; case 'content-delta': const text = event.delta?.message?.content?.text ?? ''; process.stdout.write(text); break; case 'content-end': console.log('\n--- Generation complete ---'); break; // Citation events (when using documents) case 'citation-start': console.log('Citation:', event.delta?.message?.citations); break; // Tool call events (when using tools) case 'tool-call-start': console.log('Tool call started:', event...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category