This repository has been archived by the owner on Sep 15, 2024. It is now read-only.
forked from ChatGPTNextWeb/ChatGPT-Next-Web
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proxy route for Google AI API & Pass Context LLM Api Logic (#212)
* Feat [UI/UX] [Next JS Router] Proxy route for Google AI API - [+] chore(next.config.mjs): add proxy route for Google AI API - [+] feat(next.config.mjs): add proxy route for Google AI API * Refactor Google AI (Better LLM Logic) Pass Context - [+] chore(google.ts): add interfaces for GoogleResponse, MessagePart, Message, and ModelConfig - [+] feat(google.ts): update extractMessage method to handle gemini-pro response - [+] feat(google.ts): update chat method to handle role in neighboring messages and model configuration - [+] feat(google.ts): update path method to use template literals for endpoint * Chore [Constants] [Google AI] Update Comment for LLM - [+] chore(google.ts): fix typo in copyright notice - [+] chore(constant.ts): add comment explaining the purpose of DEFAULT_SYSTEM_TEMPLATE constant * Chore [UI/UX Front End] Comment out unused variable - [+] chore(chat.ts): comment out unused variable 'modelStartsWithGemini' - [+] chore(chat.ts): remove unnecessary condition for logging system prompts * Refactor [Model Config] Now Support Inject System Prompt - [+] fix(google.ts): add todo comment to fix tauri desktop app issue - [+] fix(model-config.tsx): refactor conditional rendering of model config options * Refactor [Model Config] Inject System Prompt - [+] feat(model-config.tsx): add ModelProvider import from constant file - [+] refactor(model-config.tsx): remove unused variable 'isGoogleAIModel' - [+] refactor(model-config.tsx): replace condition 'isGoogleAIModel' with 'allModels' * Feat JS Docs [LLM Google Api] module documentation comments - [+] chore(google.ts): add module documentation comments - [+] chore(google.ts): add copyright notice - [+] chore(google.ts): add interface for GoogleResponse - [+] chore(google.ts): add interface for MessagePart - [+] chore(google.ts): add interface for Message - [+] chore(google.ts): add interface for ModelConfig - [+] chore(google.ts): add class documentation comments - [+] chore(google.ts): add method documentation comments for extractMessage - [+] chore(google.ts): add method documentation comments for chat - [+] chore(google.ts): add method documentation comments for usage - [+] chore(google.ts): add method documentation comments for models * Fix [UI/UX] Trim Topic - [+] fix(utils.ts): update trimTopic function to handle additional punctuation characters - [+] chore(utils.ts): remove unused variable 'isApp' * Chore [Constants] Update Knowledge Cut Off Date - [+] chore(constant.ts): update KnowledgeCutOffDate for "gemini-pro" model * Fix [UI/UX] [Next JS Router] Proxy route for Google AI API - [+] fix(next.config.mjs): update source path for /api/proxy route to include "google" * Fix [LLM Api] [Google AI] Client Router Path - [+] fix(google.ts): import missing constants DEFAULT_API_HOST, DEFAULT_CORS_HOST, GEMINI_BASE_URL - [+] chore(google.ts): add JSDoc comments to path() method - [+] feat(google.ts): update path() method to handle routing requests through a CORS proxy for Tauri desktop app
- Loading branch information
1 parent
343841f
commit b9ed661
Showing
6 changed files
with
152 additions
and
92 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
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
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