{"name":"@deckyard/openai","description":"A client for OpenAI-compatible APIs (OpenAI, Ollama, vLLM, OpenRouter, Azure): chat with tools and structured output, embeddings, models","versions":{"0.1.0":{"version":"0.1.0","kind":"git","url":"https://github.com/deckyard/deck-openai.git","ref":"0.1.0","commit":"45e5511f78d96891141557e1c6e865d762975d99","checksum":"","yanked":false,"license":"LGPL-3.0-only","requires":{},"engines":{"jennifer":"\u003e=0.26.0"},"capabilities":["net"],"keywords":["openai","llm","ai","chat","embeddings"],"description":"A client for OpenAI-compatible APIs (OpenAI, Ollama, vLLM, OpenRouter, Azure): chat with tools and structured output, embeddings, models","publishedAt":"1794770825","repoId":1458226970,"repoOwnerId":346943577,"repoOwner":"deckyard"},"0.2.0":{"version":"0.2.0","kind":"git","url":"https://github.com/deckyard/deck-openai.git","ref":"0.2.0","commit":"8643bba75f37426abddc139df9d0c0482316c84f","checksum":"","yanked":false,"license":"LGPL-3.0-only","requires":{},"engines":{"jennifer":"\u003e=0.28.0"},"capabilities":["net"],"keywords":["openai","llm","ai","chat","embeddings"],"description":"A client for OpenAI-compatible APIs (OpenAI, Ollama, vLLM, OpenRouter, Azure): chat with tools and structured output, embeddings, models","publishedAt":"1795647640","repoId":1458226970,"repoOwnerId":346943577,"repoOwner":"deckyard"}},"readme":"# @deckyard/openai\n\n[![test](https://github.com/deckyard/deck-openai/actions/workflows/test.yml/badge.svg)](https://github.com/deckyard/deck-openai/actions/workflows/test.yml)\n[![Documentation](https://img.shields.io/badge/docs-github%20pages-blue)](https://deckyard.github.io/deck-openai/)\n[![release](https://img.shields.io/github/v/release/deckyard/deck-openai)](https://github.com/deckyard/deck-openai/releases/latest)\n\nA client for the OpenAI™-compatible API for [Jennifer](https://jennifer-lang.dev/)\nprograms: Chat Completions with tools and structured output, a tool loop\nthat runs the model's tool calls through a function, embeddings and model\nlisting. The base URL is settable, so it talks to OpenAI, Azure™ OpenAI,\nOllama™, vLLM™, the llama.cpp™ server, LM Studio™, OpenRouter™, Groq™, Mistral™\nand Together™ alike. Every request has a deadline, a reply cap and retries\non 408, 409, 429, 5xx and a refused connection, never resending a request\nthe server may have received; errors carry the server's\nstatus, type, code, the wait it asked for and its rate-limit headers.\n\n**[Documentation](https://deckyard.github.io/deck-openai/)**\n\n## Install\n\n```sh\njvc add @deckyard/openai\n```\n\nThis vendors the deck to `vendor/\u003cscope\u003e/openai/`. Without `jvc`, unpack the\n`src/` subtree of a release archive (`\u003cscope\u003e-openai-\u003cversion\u003e.tar.gz`) there.\n\n## Usage\n\n```jennifer\nimport \"@deckyard/openai/\" as openai;\n\ndef c as openai.Client init openai.client(os.getEnv(\"OPENAI_API_KEY\"));\ndef req as json.Value init openai.newRequest(\"gpt-5.4-mini\");\n$req = openai.addUserText($req, \"Name three prime numbers.\");\nio.printf(\"%s\\n\", openai.text(openai.chat($c, $req)));\n```\n\nA local model through Ollama needs no key:\n\n```jennifer\ndef local as openai.Client init openai.withBaseUrl(openai.client(\"\"), \"http://127.0.0.1:11434/v1\");\n```\n\n## Requirements\n\nJennifer 0.28.0 or newer, the default binary: the deck opens sockets\n(capability `net`), which `jennifer-tiny` does not have. An API key for a\nhosted service, or a local OpenAI-compatible server. No streaming yet.\n\n## Development\n\n```sh\ntools/check-all.sh                   # the full gate, as CI runs it\njennifer test src/openai_test.j      # the test overlay (a loopback fake, no key needed)\ntools/check-docs.sh                  # docs against the code\ntools/pack.sh dist                   # build the release archive\n```\n\n## Licence\n\nLGPL-3.0-only, see [LICENSE](LICENSE). Copyright (C) 2026 mplx \u0026lt;mplx@jennifer-lang.dev\u0026gt;.\n\n## Trademarks\n\nOpenAI™ is a trademark of OpenAI Foundation. Azure™ and Microsoft Entra™ are\ntrademarks of Microsoft Corporation. Gemini™ is a trademark of Google LLC.\nGroq™ is a trademark of Groq, Inc. Ollama™ is a trademark of Ollama Inc.\nOpenRouter™ is a trademark of OpenRouter, Inc. LM Studio™ is a trademark of\nElement Labs Inc. Other product and company names may be trademarks of their\nrespective owners. They are used only to identify the products this deck\nworks with. This deck is an independent project, not affiliated with,\nsponsored or endorsed by OpenAI Foundation or any other provider named here.\n"}