apipool_testor_DR
This tool allows you to test multiple APIs and models in parallel for connectivity and accessibility more easliy. It helps identify which API endpoints and models are functional.
- Test multiple APIs with different models.
- Configurable prompts and settings.
- Results are displayed in a clear and organized format.
- Secure API key storage.
- Fill in your
api_key
andapi_url
inapi_config_example.json
, save it intoapi_config.json
. - Just run the script
cd apipool_testor_DR
python apipool_testor.py
- Clone the repository
git clone https://github.com/DirtyRattie/apipool_testor_DR.git
cd apipool_testor_DR
- Install the required dependencies
pip install -r requirements.txt
Add your API URLs and API keys to the api_config.json
file. Example:
[
{
"api_url": "https://your-api-url.com/v1/chat/completions",
"api_key": "your-api-key"
}
]
We have a template api_config_example.json
.
Define the models, system prompt, and user prompt to test. Example:
{
"models": ["gpt-4o", "claude-3-5-20241022"],
"system_prompt": "Answer briefly",
"user_prompt": "Who are you?"
}
You can save your private api in api_config.json
. api_config.json
will not be uploaded by default to prevent uploading your keys.
The tool will display results like this:
--- Testing Results ---
API URL: https://your-api-url.com/v1/chat/completions
- Model: gpt-4o
Status: accessible
Reply: Hello! How can I assist you today?
- Model: claude-3-5-20241022
Status: failed (status code: 401)
Error: Unauthorized access
...
Feel free to open an issue or submit a pull request for improvements!
This project is licensed under the MIT License.