Use Shakespeare DIY with InferFoundry¶
Shakespeare DIY is an open-source AI assistant framework. Connect it to InferFoundry to route requests through your regional endpoint with data residency and budget controls.
Prerequisites¶
- Shakespeare DIY installed (GitHub)
- An InferFoundry API key
Connect Shakespeare DIY to InferFoundry¶
Shakespeare DIY supports OpenAI-compatible APIs. Set these environment variables:
export OPENAI_API_KEY="your-inferfoundry-api-key"
export OPENAI_BASE_URL="https://gateway.dev.if-service.ai/v1"
Replace [your-region] with your region code (e.g. ch103, us103).
Then reload your shell:
Verify¶
Start Shakespeare DIY and run a query. Check portal.dev.if-service.ai → Usage to confirm requests are flowing through your InferFoundry endpoint.
Troubleshooting¶
- Auth errors
- Verify
OPENAI_API_KEYis set. Runecho $OPENAI_API_KEYto check. - Model not found
- Check Available Models for models available in your region.
- Connection errors
- Make sure
OPENAI_BASE_URLincludes/v1and uses the correct region code.