feat: support claude and gemini in vertex ai (#1621)

* feat: support claude and gemini in vertex ai

* fix: do not show api key field in channel page when the type is VertexAI

* fix: update getToken function to include channelId in cache key
This commit is contained in:
LiuVaayne
2024-07-13 14:59:28 +08:00
committed by GitHub
parent 65acb94f45
commit cf9b5f0b92
19 changed files with 590 additions and 24 deletions

View File

@@ -165,6 +165,8 @@ const EditModal = ({ open, channelId, onCancel, onOk }) => {
if (values.key === '') {
if (values.config.ak && values.config.sk && values.config.region) {
values.key = `${values.config.ak}|${values.config.sk}|${values.config.region}`;
} else if (values.config.region && values.config.vertex_ai_project_id && values.config.vertex_ai_adc) {
values.key = `${values.config.region}|${values.config.vertex_ai_project_id}|${values.config.vertex_ai_adc}`;
}
}