aboutsummaryrefslogtreecommitdiff
path: root/apps/cf-ai-backend
diff options
context:
space:
mode:
authorKush Thaker <[email protected]>2024-08-09 18:50:05 +0530
committerGitHub <[email protected]>2024-08-09 18:50:05 +0530
commited5ed419e184c56f7f09deb3eb733a8bbc1dc6c3 (patch)
treeee3e74b4e2b9ceb806625622b64e224c63b0c388 /apps/cf-ai-backend
parentremove unwanted console logs (diff)
parentMerge pull request #236 from CodeTorso/queue (diff)
downloadsupermemory-kush/be-queue-fixes.tar.xz
supermemory-kush/be-queue-fixes.zip
Merge branch 'main' into kush/be-queue-fixeskush/be-queue-fixes
Diffstat (limited to 'apps/cf-ai-backend')
-rw-r--r--apps/cf-ai-backend/src/helper.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/cf-ai-backend/src/helper.ts b/apps/cf-ai-backend/src/helper.ts
index 70efaecd..1c4dd69f 100644
--- a/apps/cf-ai-backend/src/helper.ts
+++ b/apps/cf-ai-backend/src/helper.ts
@@ -9,7 +9,7 @@ import { z } from "zod";
import { seededRandom } from "./utils/seededRandom";
import { bulkInsertKv } from "./utils/kvBulkInsert";
-export async function initQuery(env: Env, model: string = "gpt-4o") {
+export async function initQuery(env: Env, model: string = "gemini-1.5-pro") {
const embeddings = new OpenAIEmbeddings({
apiKey: env.OPENAI_API_KEY,
modelName: "text-embedding-3-small",
@@ -35,12 +35,13 @@ export async function initQuery(env: Env, model: string = "gpt-4o") {
console.log("Selected model: ", selectedModel);
break;
case "gemini-1.5-pro":
+ console.log("YES GOOGLE");
const googleai = createGoogleGenerativeAI({
apiKey: env.GOOGLE_AI_API_KEY,
baseURL:
"https://gateway.ai.cloudflare.com/v1/47c2b4d598af9d423c06fc9f936226d5/supermemory/google-vertex-ai",
});
- selectedModel = googleai.chat("models/gemini-1.5-pro-latest");
+ selectedModel = googleai.chat("models/gemini-pro");
console.log("Selected model: ", selectedModel);
break;
case "gpt-4o":
@@ -49,7 +50,6 @@ export async function initQuery(env: Env, model: string = "gpt-4o") {
apiKey: env.OPENAI_API_KEY,
baseURL:
"https://gateway.ai.cloudflare.com/v1/47c2b4d598af9d423c06fc9f936226d5/supermemory/openai",
- compatibility: "strict",
});
selectedModel = openai.chat("gpt-4o-mini");
break;