Files
docs/apps/bot-docs/lib/chat/inkeep-qa-schema.ts
zeekay 632d7201e0 fix: remove papers deploy workflow, sync workspace packages for CI
- Remove deploy-papers.yml (papers app already removed)
- Update bot-docs with AI chat deps (ai-sdk, remark, etc.)
- Rename zen-docs models from zen/zen2 to zen3/zen4 naming
- Add chat and services docs content
- Add .code/ to gitignore
2026-02-22 14:56:03 -08:00

51 lines
1.1 KiB
TypeScript

import { z } from 'zod';
const InkeepRecordTypes = z.enum([
'documentation',
'site',
'discourse_post',
'github_issue',
'github_discussion',
'stackoverflow_question',
'discord_forum_post',
'discord_message',
'custom_question_answer',
]);
const LinkType = z.union([
InkeepRecordTypes,
z.string(), // catch all
]);
const LinkSchema = z.looseObject({
label: z.string().nullish(), // the value of the footnote, e.g. `1`
url: z.string(),
title: z.string().nullish(),
type: LinkType.nullish(),
breadcrumbs: z.array(z.string()).nullish(),
});
const LinksSchema = z.array(LinkSchema).nullish();
export const ProvideLinksToolSchema = z.object({
links: LinksSchema,
});
const KnownAnswerConfidence = z.enum([
'very_confident',
'somewhat_confident',
'not_confident',
'no_sources',
'other',
]);
const AnswerConfidence = z.union([KnownAnswerConfidence, z.string()]); // evolvable
const AIAnnotationsToolSchema = z.looseObject({
answerConfidence: AnswerConfidence,
});
export const ProvideAIAnnotationsToolSchema = z.object({
aiAnnotations: AIAnnotationsToolSchema,
});