feat: implement pbUpsert helper for streamlined database operations and update related functions

This commit is contained in:
RaymondVerhoef
2026-05-22 19:56:23 +02:00
parent ca8945ea5b
commit 7b6ae265db
7 changed files with 38 additions and 69 deletions

View File

@@ -1,5 +1,5 @@
import * as db from './db';
import { callLLM } from './llm';
import { callLLM, cachedSystem } from './llm';
import {
EMIT_LEARNING_ARTICLE_TOOL,
EMIT_LEARNING_SLIDES_TOOL,
@@ -17,8 +17,6 @@ Always write in clear, professional English.
Emit the requested content through the matching tool — do not return prose JSON.`;
const cachedSystem = (text) => [{ type: 'text', text, cache_control: { type: 'ephemeral' } }];
const TOOL_BY_TYPE = {
article: EMIT_LEARNING_ARTICLE_TOOL,
slides: EMIT_LEARNING_SLIDES_TOOL,