-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update API usage and add environment configuration
- Adjust API client initialization for OpenAI and Azure. - Modify image encoding to handle size limits and maintain aspect ratio. - Add new `OpenAICompatible` model class. - Introduce retry mechanism for API requests with configurable retries. - Update `.gitignore` to exclude `.env` and `scripts/`. .gitignore: - Exclude `.env` file for security. - Ensure no scripts directory is tracked. lmms_eval/models/gpt4v.py: - Refactor API client initialization to use new OpenAI and Azure clients. - Update image encoding to handle size limits with resizing logic. - Adjust retry logic for API calls, reducing sleep time. lmms_eval/models/openai_compatible.py: - Create new `OpenAICompatible` model class with similar structure. - Implement encoding functions for images and videos. - Integrate environment variable loading and persistent response caching. miscs/model_dryruns/openai_compatible.sh: - Add sample script for running the new model.
- Loading branch information
Showing
4 changed files
with
305 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.