From 2e58dab30a1474cfcbcb2fbc2b2ec8725818153c Mon Sep 17 00:00:00 2001 From: Hristo <53634432+izo0x90@users.noreply.github.com> Date: Fri, 17 May 2024 14:08:57 -0400 Subject: [PATCH] Additional changes for VertexAI --- sample.env | 4 ++++ src/lib/providers.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/sample.env b/sample.env index 2c1861d..10d5bd6 100644 --- a/sample.env +++ b/sample.env @@ -18,3 +18,7 @@ REMOTE_BACKEND_ADDRESS=111.111.111.111:0000 # leave commented to have open access to all endpoints # Secret key to "secure" backend # SUPER_SECRET_KEY=THISISASUPERSECRETKEYSERIOUSLY + +# Uncomment and edit to configure a specific service account key file to use to +# auth with VertexAI when running (backend) full Perplexica stack locally +# GOOGLE_APPLICATION_CREDENTIALS=/absolute/path/to/gcp-service-account-key-file.json diff --git a/src/lib/providers.ts b/src/lib/providers.ts index 44867af..77c1e83 100644 --- a/src/lib/providers.ts +++ b/src/lib/providers.ts @@ -1,5 +1,6 @@ import { ChatOpenAI, OpenAIEmbeddings } from '@langchain/openai'; import { ChatOllama } from '@langchain/community/chat_models/ollama'; +import { VertexAI } from "@langchain/google-vertexai"; import { OllamaEmbeddings } from '@langchain/community/embeddings/ollama'; import { hasGCPCredentials } from '../auth'; import {