mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-07 02:58:11 +00:00
chore: bump extension version
This commit is contained in:
parent
a6c7263477
commit
59648d9937
5 changed files with 57 additions and 14 deletions
|
|
@ -38,8 +38,6 @@ export async function initQuery(env: Env, model: string = "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-flash-8b");
|
||||
console.log("Selected model: ", selectedModel);
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import {
|
|||
} from "./queueConsumer/chunkers/chunkPageOrNotes";
|
||||
import { queue } from "./queueConsumer";
|
||||
import { isErr } from "./errors/results";
|
||||
import { createOpenAI } from "@ai-sdk/openai";
|
||||
|
||||
const app = new Hono<{ Bindings: Env }>();
|
||||
|
||||
|
|
@ -300,7 +301,11 @@ app.post(
|
|||
const { query, user } = c.req.valid("query");
|
||||
const { chatHistory } = c.req.valid("json");
|
||||
|
||||
const { store, model } = await initQuery(c.env);
|
||||
const openai = createOpenAI({
|
||||
apiKey: c.env.OPENAI_API_KEY,
|
||||
});
|
||||
const model = openai.chat("gpt-4o-mini");
|
||||
const { store } = await initQuery(c.env);
|
||||
|
||||
let task: "add" | "chat" = "chat";
|
||||
let thingToAdd: "page" | "image" | "text" | undefined = undefined;
|
||||
|
|
@ -319,15 +324,17 @@ app.post(
|
|||
"Decide if the user wants to add a document or chat with the AI",
|
||||
parameters: z.object({
|
||||
generatedTask: z.enum(["add", "chat"]),
|
||||
contentToAdd: z.object({
|
||||
thing: z.enum(["page", "image", "text"]),
|
||||
content: z.string(),
|
||||
}),
|
||||
contentToAdd: z
|
||||
.object({
|
||||
thing: z.enum(["page", "image", "text"]),
|
||||
content: z.string(),
|
||||
})
|
||||
.optional(),
|
||||
}),
|
||||
execute: async ({ generatedTask, contentToAdd }) => {
|
||||
task = generatedTask;
|
||||
thingToAdd = contentToAdd.thing;
|
||||
addContent = contentToAdd.content;
|
||||
thingToAdd = contentToAdd?.thing;
|
||||
addContent = contentToAdd?.content;
|
||||
},
|
||||
}),
|
||||
},
|
||||
|
|
@ -681,17 +688,17 @@ app.post(
|
|||
},
|
||||
);
|
||||
|
||||
app.delete(
|
||||
app.post(
|
||||
"/api/delete",
|
||||
zValidator(
|
||||
"query",
|
||||
"json",
|
||||
z.object({
|
||||
websiteUrl: z.string(),
|
||||
user: z.string(),
|
||||
}),
|
||||
),
|
||||
async (c) => {
|
||||
const { websiteUrl, user } = c.req.valid("query");
|
||||
const { websiteUrl, user } = c.req.valid("json");
|
||||
|
||||
const { store } = await initQuery(c.env);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"manifest_version": 3,
|
||||
"$schema": "https://json.schemastore.org/chrome-manifest",
|
||||
"version": "2.63.3",
|
||||
"version": "2.63.4",
|
||||
"name": "supermemory",
|
||||
"description": "An extension for https://supermemory.ai - an AI hub for all your bookmarks.",
|
||||
"background": {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@
|
|||
"dev": "extension dev",
|
||||
"start": "extension start",
|
||||
"build": "extension build",
|
||||
"style": "tailwindcss -i ../../packages/tailwind-config/globals.css -o ./public/output.css --watch"
|
||||
"style": "tailwindcss -i ../../packages/tailwind-config/globals.css -o ./public/output.css --watch",
|
||||
"zip": "cd dist && zip -r extension.zip chrome"
|
||||
},
|
||||
"name": "supermemory-extension",
|
||||
"private": true,
|
||||
|
|
|
|||
|
|
@ -1846,6 +1846,17 @@ video {
|
|||
margin-top: auto;
|
||||
}
|
||||
|
||||
.mb-4 {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.line-clamp-1 {
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
}
|
||||
|
||||
.\!block {
|
||||
display: block !important;
|
||||
}
|
||||
|
|
@ -2037,6 +2048,11 @@ video {
|
|||
height: 0.25rem;
|
||||
}
|
||||
|
||||
.h-min {
|
||||
height: -moz-min-content;
|
||||
height: min-content;
|
||||
}
|
||||
|
||||
.max-h-96 {
|
||||
max-height: 24rem;
|
||||
}
|
||||
|
|
@ -2137,6 +2153,10 @@ video {
|
|||
max-width: 32rem;
|
||||
}
|
||||
|
||||
.max-w-32 {
|
||||
max-width: 8rem;
|
||||
}
|
||||
|
||||
.flex-1 {
|
||||
flex: 1 1 0%;
|
||||
}
|
||||
|
|
@ -2192,6 +2212,13 @@ video {
|
|||
scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
}
|
||||
|
||||
.translate-y-20 {
|
||||
--tw-translate-y: 5rem;
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y))
|
||||
rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
|
||||
scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
}
|
||||
|
||||
.transform {
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y))
|
||||
rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
|
||||
|
|
@ -2705,6 +2732,16 @@ video {
|
|||
background-color: rgb(209 213 219 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-\[\#2F353C\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(47 53 60 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-\[\#3C464D\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(60 70 77 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-page-gradient {
|
||||
background-image: radial-gradient(
|
||||
ellipse 80% 50% at 50% -20%,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue