Overview
@johannes.latzel/llm-chat-openai is the OpenAI and OpenAI-compatible
provider for @johannes.latzel/llm-chat. The abstract engine stays
provider-neutral; this package owns the OpenAI SDK dependency and the
provider-specific request and response handling.
flowchart LR
accTitle: OpenAI provider boundary
accDescr: An application uses OpenAIChatService from this package. The provider extends ChatService from llm-chat and converts neutral ToolDefinition values from llm-chat-tool into OpenAI function tools before calling an OpenAI-compatible API.
app["Application"] -->|"uses"| service["OpenAIChatService<br/>this package"]
service -->|"extends"| engine["ChatService<br/>llm-chat"]
engine -->|"ToolDefinition"| tool["llm-chat-tool"]
service -->|"HTTP"| api["OpenAI-compatible API"]
Navigation
- Quick start: install, configure and send a message
- Service and configuration:
OpenAIChatService, its builder and every option - Environment variables:
OPENAI_*andLLM_CHAT_OPENAI_* - Examples: structured output, usage, reasoning and local endpoints
- Architecture: provider boundary and request flow
- API reference: classes, configuration and enums
Related packages
This package is the OpenAI / OpenAI-compatible provider implementing
ChatService.createStream().
@johannes.latzel/llm-chat: Provider-neutral chat engine: tool-call loop, streaming, hooks, prompt trees, serialization.@johannes.latzel/llm-chat-message: Provider-neutral message, role, finish-reason and writer primitives; zero runtime dependencies.@johannes.latzel/llm-chat-tool: Provider-neutral tool, hook and result primitives; zero runtime dependencies.
License
MIT. See LICENSE.