This commit refactors the Vertex AI integration to automatically derive the
Project ID from the provided Service Account JSON. This simplifies the
configuration process for users in "Full" (service account) authentication
mode by removing the need to specify the Project ID separately.
- Updated index.html to include options for Vertex AI authentication modes (Express and Full).
- Enhanced openai.js to manage Vertex AI settings, including project ID, region, and service account JSON.
- Added validation and handling for service account JSON in the backend.
- Modified API request handling in google.js to support both authentication modes for Vertex AI.
- Updated secrets.js to include a key for storing Vertex AI service account JSON.
- Improved error handling and user feedback for authentication issues.
* Add Vertex AI express mode support
Split Google AI Studio and Vertex AI
* Add support for Vertex AI, including updating default models and related settings, modifying frontend HTML to include Vertex AI options, and adjusting request processing logic in the backend API.
* Log API name in the console
* Merge sysprompt toggles back
* Use Gemma tokenizers for Vertex and LearnLM
* AI Studio parity updates
* Add link to express mode doc. Also technically it's not a form
* Split title
* Use array includes
* Add support for Google Vertex AI in image captioning feature
* Specify caption API name, add to compression list
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
API docs: https://dreamgen.com/docs/models/opus/v1
API keys: https://dreamgen.com/account/api-keys
I decided to base this on the text-completion API since it's more
flexible with SillyTavern's prompt formating capabilities.
This also means that custom context and instruct settings are required.
Will add documentation in a followup PR.