This directory contains a Python example for connecting to OpenAI-compatible APIs.
- Python 3.8+
- pip
pip install -r requirements.txtSet environment variables:
export API_KEY=your_api_key_here
export BASE_URL=https://tken.shop/v1
export MODEL=gpt-4o-miniOr create a .env file in the project root (copy from .env.example).
python chat_completion.pyAPI: https://tken.shop/v1
Model: gpt-4o-mini
----------------------------------------
Success!
----------------------------------------
Response: Hello! How can I assist you today?
Model: gpt-4o-mini
Tokens: 15