OpenAI Adapter¶
The OpenAI Adapter allows Lanarky users to build microservices using the OpenAI Python SDK.
To enable this adapter, install lanarky with extra dependencies:
pip install lanarky[openai]
Tip
To use OpenAI, you need to create an openai account and generate an API key. Visit openai.com for more information.
To use the generated API key, you need to set the OPENAI_API_KEY
environment
variable.
Here's an overview of the supported features:
- OpenAI API Router: Lanarky router for OpenAI
Additionally, we will cover some advanced topics:
- Dependency Injection: use OpenAI as a dependency in your microservice
- FastAPI Backport: low-level modules for FastAPI users