openai
OpenAI compatibility layer for Ollama. Use the official OpenAI Python library to interact with Ollama, enabling easy migration from OpenAI and compatibility with LangChain, LlamaIndex, and other OpenAI-based tools.
npx skills add majiayu000/claude-skill-registry --skill openai --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Ollama OpenAI Compatibility ## Overview Ollama provides an OpenAI-compatible API at `/v1/*` endpoints. This allows using the official `openai` Python library with Ollama, enabling: - **Migration** - Drop-in replacement for OpenAI API - **Tool ecosystem** - Works with LangChain, LlamaIndex, etc. - **Familiar interface** - Standard OpenAI patterns ## Quick Reference | Endpoint | Method | Purpose | |----------|--------|---------| | `/v1/models` | GET | List models | | `/v1/completions` | POST | Text generation | | `/v1/chat/completions` | POST | Chat completion | | `/v1/embeddings` | POST | Generate embeddings | ### Limitations The OpenAI compatibility layer does **not** support: - Show model details (`/api/show`) - List running models (`/api/ps`) - Copy model (`/api/copy`) - Delete model (`/api/delete`) Use `bazzite-ai-jupyter:chat` or `bazzite-ai-jupyter:ollama` for these operations. ## Setup ```python import os from openai import OpenAI OLLAMA_HOST = os.getenv("OLLAMA_HOST", "http://localhost:11434") client = OpenAI( base_url=f"{OLLAMA_HOST}/v1", api_key="ollama" # Required by library but ignored by Ollama ) ``` ## List Models ```python models = client.models.list() for model in
- Overview
- Quick Reference
- Limitations
- Setup
- List Models
- Text Completions
- Chat Completion
- Single Turn
- Multi-Turn Conversation
- Streaming
- Generate Embeddings
- Error Handling
- Migration from OpenAI
- Before (OpenAI)
What does the openai skill do?
OpenAI compatibility layer for Ollama. Use the official OpenAI Python library to interact with Ollama, enabling easy migration from OpenAI and compatibility with LangChain, LlamaIndex, and other OpenAI-based tools.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill openai --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
