← ClaudeAtlas

cohere-v2-pythonlisted

Master Cohere v2 Chat API with Python, specializing in entity extraction using JSON Schema mode for structured outputs. Use when extracting entities from text, building data extraction pipelines, implementing NER systems, or requiring validated JSON responses from LLMs.
aiskillstore/marketplace · ★ 329 · Data & Documents · score 79
Install: claude install-skill aiskillstore/marketplace
# Cohere v2 Python ## Overview Cohere's v2 Chat API provides powerful conversational AI capabilities with a specialized focus on structured outputs through JSON Schema mode. This skill covers entity extraction, data validation, and integration patterns for building production-ready systems that require consistent, validated responses from LLMs. ## When to Use This Skill Apply this skill when: - Extracting structured entities from unstructured text (names, dates, locations, organizations) - Building Named Entity Recognition (NER) systems - Implementing data extraction pipelines with validated outputs - Requiring JSON responses that conform to specific schemas - Processing documents for information extraction - Building classification systems with constrained outputs - Integrating LLM responses with downstream databases or APIs ## Core Capabilities ### 1. Basic Chat API Initialize and use the Cohere Client for conversational tasks: ```python import cohere co = cohere.ClientV2(api_key="<YOUR API KEY>") response = co.chat( model="command-a-03-2025", messages=[ {"role": "user", "content": "Summarize the key features of quantum computing."} ], ) print(response.message.content[0].text) ``` Available models: - `command-a-03-2025` - Latest generation model For comprehensive API parameters, streaming, RAG, and tool use, refer to `references/chat_api.md`. ### 2. Entity Extraction with JSON Schema Mode The primary strength of Cohere v2 is structured out