Adds Google VertexAI as model provider

This commit is contained in:
Hristo 2024-05-14 15:05:17 -04:00
parent cef75279c5
commit ebbe18ab45
12 changed files with 101 additions and 77 deletions

View file

@ -36,14 +36,11 @@ const useSocket = (url: string) => {
!embeddingModel ||
!embeddingModelProvider
) {
const providers = await clientFetch(
'/models',
{
headers: {
'Content-Type': 'application/json',
},
const providers = await clientFetch('/models', {
headers: {
'Content-Type': 'application/json',
},
).then(async (res) => await res.json());
}).then(async (res) => await res.json());
const chatModelProviders = providers.chatModelProviders;
const embeddingModelProviders = providers.embeddingModelProviders;
@ -103,8 +100,8 @@ const useSocket = (url: string) => {
const secretToken = getAccessKey();
if (secretToken) {
protocols = ["Authorization", `${secretToken}`];
};
protocols = ['Authorization', `${secretToken}`];
}
const ws = new WebSocket(wsURL.toString(), protocols);