useage limits on OpenAI requests. closes #12

This commit is contained in:
Michael Dausmann
2023-09-10 22:46:32 +10:00
parent caf65a48c1
commit d65705732e
10 changed files with 95 additions and 5 deletions

View File

@@ -42,7 +42,7 @@ export const notesRouter = router({
.input(z.object({ user_prompt: z.string() }))
.query(async ({ ctx, input }) => {
const notesService = new NotesService();
const noteText = (ctx.activeAccountId)?await notesService.generateAINoteFromPrompt(input.user_prompt):null;
const noteText = (ctx.activeAccountId)?await notesService.generateAINoteFromPrompt(input.user_prompt, ctx.activeAccountId):null;
return {
noteText
}