feat: add AIML API provider
What does this PR do?
This PR adds support for the AI/ML API provider โ a flexible, OpenAI-compatible platform that offers access to 300+ models (e.g., GPT-4o, Claude, Gemini, DeepSeek).
It enables users to configure and use aimlapi/<model> as a valid chat_model within Langroid.
โ Changes included:
AIML_API_KEYadded to.env-template- Docs updated (
llm-usage-options.md,non-openai-llms.md,local-llm-setup.md,supported-models.md) aimlapi/support added inopenai_gpt.pyfor config parsing and base URL override- Custom headers
X-TitleandRefereradded for tracking - Sync and async test cases for several
aimlapi/*models - Provider key logic extended in
test_keys()
๐ Documentation
Documentation added in the following files:
- llm-usage-options.md
- non-openai-llms.md
- local-llm-setup.md
- supported-models.md
๐งช Verification
All added tests (test_llm_aimlapi, test_llm_aimlapi_async) pass and return expected values for AIMLAPI models.
Let me know if anything should be adjusted or restructured!
From https://github.com/langroid/langroid/issues/860
From #860
Thank you. I will try to review it in the next week or so.
Hi! @pchalasani Can you pls look at the pr? Thanks!
Hi! @pchalasani Can you pls look at the pr? Thanks!
Thanks, will review in a few days.
Hi @pchalasani! Let me know if any changes need to be implemented after your review, we'll do those within 1-2 days