Adds Google VertexAI as model provider
This commit is contained in:
parent
cef75279c5
commit
ebbe18ab45
12 changed files with 101 additions and 77 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue