openai

Generate chat responses, embeddings, and structured tool outputs via the OpenAI Python SDK.

1|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/antonyfmunoz/OS --skill openai-antonyfmunoz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openai
Source: https://github.com/antonyfmunoz/OS/tree/main/skills/tools/openai
Command: npx skills add https://github.com/antonyfmunoz/OS --skill openai-antonyfmunoz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It streamlines building LLM features by providing a reliable, consistent way to call OpenAI models (and OpenAI-compatible providers) for chat generation, embeddings, and structured tool use.

Core Features & Use Cases

  • Chat Completions (SDK + compatibility routing): Use for GPT chat responses, including routing through OpenAI-compatible APIs like Groq and Perplexity via base_url.
  • Embeddings for semantic search: Use text-embedding-3-small/large to turn text into vectors for retrieval workflows.
  • Tool calling and structured outputs: Use function/tool calling plus schema-constrained outputs (via Pydantic parsing) to reliably extract or trigger actions.

Quick Start

Ask the AI to “Call the OpenAI chat completions endpoint using the OpenAI Python SDK to produce a concise summary with structured JSON output.”

Frequently Asked Questions about openai

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate chat completions with structured JSON output using the OpenAI Python SDK?

Generate chat completions with structured outputs by passing tool schemas to the OpenAI Python SDK and parsing responses with Pydantic. This enforces schema-constrained JSON extraction, enabling reliable function calling and structured data generation for production agents.

Can I route OpenAI API calls to compatible providers like Groq or Perplexity?

Route OpenAI API calls to compatible providers by applying optional base_url overrides in the OpenAI Python client. This redirects chat completions and embedding requests to alternative vendor endpoints while maintaining consistent SDK logic and tool calling support.

How do I create embeddings for semantic search using OpenAI text-embedding models?

Create embeddings for semantic search by sending text to OpenAI's text-embedding-3-small or text-embedding-3-large models via the SDK. This converts text into vector representations for retrieval workflows and semantic similarity matching.

What's the best way to handle streaming and tool calling in OpenAI production agents?

Handle streaming and tool calling in production agents by configuring the OpenAI Python SDK with streaming support and structured tool schemas. This allows real-time chat completion delivery while triggering specific actions through function calling workflows.

Do I need an OpenAI API key and specific SDK version to use base_url routing and structured outputs?

Using base_url routing and structured outputs requires an OpenAI Python SDK version 1.0 or higher and a valid OPENAI_API_KEY. Optional base_url overrides enable compatible vendor routing without additional authentication dependencies.