mirror of
https://github.com/dathere/ckanaction.git
synced 2026-07-05 17:12:19 +00:00
11 lines
No EOL
325 B
TypeScript
11 lines
No EOL
325 B
TypeScript
import type { source } from "@/lib/source";
|
|
|
|
export async function getLLMText(page: (typeof source)['$inferPage']) {
|
|
if (page.type === 'openapi') return JSON.stringify(page.data.getSchema(), null, 2);
|
|
|
|
const processed = await page.data.getText('processed');
|
|
|
|
return `# ${page.data.title} (${page.url})
|
|
|
|
${processed}`;
|
|
} |