cohere-hello-world

Featured

Create a minimal working Cohere example with Chat, Embed, and Rerank. Use when starting a new Cohere integration, testing your setup, or learning basic Cohere API v2 patterns. Trigger with phrases like "cohere hello world", "cohere example", "cohere quick start", "simple cohere code".

AI & Automation 2,266 stars 315 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 Hello World ## Overview Three minimal working examples: Chat completion, text embedding, and search reranking. Each demonstrates a core Cohere API v2 endpoint. ## Prerequisites - Completed `cohere-install-auth` setup - `cohere-ai` package installed - `CO_API_KEY` environment variable set ## Instructions ### Example 1: Chat Completion ```typescript import { CohereClientV2 } from 'cohere-ai'; const cohere = new CohereClientV2(); async function chat() { const response = await cohere.chat({ model: 'command-a-03-2025', messages: [ { role: 'system', content: 'You are a helpful coding assistant.' }, { role: 'user', content: 'Explain what a closure is in JavaScript in 2 sentences.' }, ], }); console.log(response.message?.content?.[0]?.text); } chat().catch(console.error); ``` ### Example 2: Text Embedding ```typescript async function embed() { const response = await cohere.embed({ model: 'embed-v4.0', texts: ['Cohere builds enterprise AI', 'LLMs power modern search'], inputType: 'search_document', embeddingTypes: ['float'], }); const vectors = response.embeddings.float; console.log(`Generated ${vectors.length} embeddings`); console.log(`Dimensions: ${vectors[0].length}`); } embed().catch(console.error); ``` ### Example 3: Search Reranking ```typescript async function rerank() { const response = await cohere.rerank({ model: 'rerank-v3.5', query: 'What is machine learning?', documents: [ ...

Details

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

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

cohere-core-workflow-a

Build a complete RAG pipeline with Cohere Chat, Embed, and Rerank. Use when implementing retrieval-augmented generation, building grounded Q&A systems, or combining search with LLM generation. Trigger with phrases like "cohere RAG", "cohere retrieval", "cohere grounded generation", "cohere search and answer".

2,266 Updated today
jeremylongshore
AI & Automation Featured

cohere-performance-tuning

Optimize Cohere API performance with caching, batching, model selection, and streaming. Use when experiencing slow API responses, implementing caching strategies, or optimizing request throughput for Cohere Chat, Embed, and Rerank. Trigger with phrases like "cohere performance", "optimize cohere", "cohere latency", "cohere caching", "cohere slow", "cohere batch".

2,266 Updated today
jeremylongshore
AI & Automation Featured

cohere-reference-architecture

Implement Cohere reference architecture with layered project layout for RAG and agents. Use when designing new Cohere integrations, reviewing project structure, or establishing architecture standards for Cohere API v2 applications. Trigger with phrases like "cohere architecture", "cohere project structure", "cohere layout", "organize cohere app", "cohere design pattern".

2,266 Updated today
jeremylongshore
AI & Automation Featured

cohere-common-errors

Diagnose and fix Cohere API v2 errors and exceptions. Use when encountering Cohere errors, debugging failed requests, or troubleshooting CohereError, CohereTimeoutError, rate limits. Trigger with phrases like "cohere error", "fix cohere", "cohere not working", "debug cohere", "cohere 429", "cohere 400".

2,266 Updated today
jeremylongshore
AI & Automation Featured

cohere-install-auth

Install and configure Cohere SDK authentication with API v2. Use when setting up a new Cohere integration, configuring API keys, or initializing the CohereClientV2 in your project. Trigger with phrases like "install cohere", "setup cohere", "cohere auth", "configure cohere API key".

2,266 Updated today
jeremylongshore