Python SDK
Installation
pip install promptmodel
API Key Setup
- Obtain your API key from the Project Settings page of your Promptmodel project.
- Add the key to your .env file:
# .env
PROMPTMODEL_API_KEY=YoUr_ApI_kEy
Self-hosting Configuration
For integrating your Self-hosted Promptmodel with your codebase, configure the backend and frontend URLs in your .env
file.
# .env
# set this to your self-hosted Promptmodel backend URL
PROMPTMODEL_BACKEND_PUBLIC_URL=http://localhost:8000
# set this to your self-hosted Promptmodel frontend URL
PROMPTMODEL_FRONTEND_PUBLIC_URL=http://localhost:3000
This setup links Promptmodel python SDK in your codebase with your self-hosted Promptmodel.