@@ -3,7 +3,7 @@ import { getLoggedInClient } from "./supabaseContext";
33import { Result } from "./types" ;
44import normalizePageTitle from "roamjs-components/queries/normalizePageTitle" ;
55import findDiscourseNode from "./findDiscourseNode" ;
6- const { nextApiRoot } = require ( "@repo/utils/execContext" ) ;
6+ import { nextApiRoot } from "@repo/utils/execContext" ;
77
88type ApiEmbeddingResponse = {
99 data : Array < {
@@ -93,11 +93,11 @@ const generateHypotheticalNode: HypotheticalNodeGenerator = async ({
9393} ) => {
9494 const { relationLabel, relatedNodeText, relatedNodeFormat } = relationType ;
9595
96- const userPromptContent = `Given the source discourse node \`\`\`${ node } \`\`\`,
97- and considering the relation \`\`\`${ relationLabel } \`\`\`
98- which typically connects to a node of type \`\`\`${ relatedNodeText } \`\`\`
99- (formatted like \`\`\`${ relatedNodeFormat } \`\`\`),
100- generate a hypothetical related discourse node text that would plausibly fit this relationship.
96+ const userPromptContent = `Given the source discourse node \`\`\`${ node } \`\`\`,
97+ and considering the relation \`\`\`${ relationLabel } \`\`\`
98+ which typically connects to a node of type \`\`\`${ relatedNodeText } \`\`\`
99+ (formatted like \`\`\`${ relatedNodeFormat } \`\`\`),
100+ generate a hypothetical related discourse node text that would plausibly fit this relationship.
101101Only return the text of the hypothetical node.` ;
102102 const requestBody = {
103103 documents : [ { role : "user" , content : userPromptContent } ] ,
0 commit comments