30 lines
907 B
TypeScript
30 lines
907 B
TypeScript
// import { query, mutation, action } from "./_generated/server";
|
|
// import { Kevisual } from '@kevisual/ai/browser'
|
|
// import { v } from "convex/values";
|
|
// export const get = query({
|
|
// args: {},
|
|
// handler: async (ctx) => {
|
|
// const auth = await ctx.auth.getUserIdentity();
|
|
// console.log("Query abcv.get called, auth:", auth);
|
|
// if (auth) {
|
|
// console.log("Authenticated user ID:", auth.subject);
|
|
// }
|
|
// return await ctx.db.query("abcv").collect();
|
|
// },
|
|
// });
|
|
|
|
// export const chat = action({
|
|
// args: { message: v.string() },
|
|
// handler: async (ctx, { message }) => {
|
|
// const kevisual = new Kevisual({
|
|
// apiKey: process.env.KEVISUAL_NEW_API_KEY || "",
|
|
// });
|
|
|
|
// const response = await kevisual.chat({
|
|
// messages: [
|
|
// { role: "user", content: message }
|
|
// ]
|
|
// })
|
|
// return kevisual.responseText;
|
|
// },
|
|
// });
|