- Add llm-factory.ts: unified LLM provider abstraction (Google/Claude/OpenAI) - Install @langchain/anthropic and @langchain/openai packages - resolveAiProvider picks active provider from DB settings (Claude > OpenAI > Google) - All AI graphs (reminder, new-patient, reschedule, internal-chat) now accept provider+model params - Add claudeAiModel, openAiModel, googleAiModel columns to ai_settings table - New PUT /api/ai/provider-model route to save selected model per provider - UI model dropdowns for Claude (Haiku/Sonnet/Opus), OpenAI (GPT-5.x series), Google (Gemini 2.5/3.x) - Google AI section also gets model selector alongside existing API key field Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
26 lines
1.3 KiB
TypeScript
26 lines
1.3 KiB
TypeScript
import * as z from 'zod';
|
|
import type { Prisma } from '../../../generated/prisma';
|
|
import { SortOrderSchema } from '../enums/SortOrder.schema';
|
|
import { UserOrderByWithRelationInputObjectSchema as UserOrderByWithRelationInputObjectSchema } from './UserOrderByWithRelationInput.schema'
|
|
|
|
const makeSchema = () => z.object({
|
|
id: SortOrderSchema.optional(),
|
|
userId: SortOrderSchema.optional(),
|
|
apiKey: SortOrderSchema.optional(),
|
|
aiEnabled: SortOrderSchema.optional(),
|
|
openAiKey: SortOrderSchema.optional(),
|
|
openAiEnabled: SortOrderSchema.optional(),
|
|
claudeAiKey: SortOrderSchema.optional(),
|
|
claudeAiEnabled: SortOrderSchema.optional(),
|
|
claudeAiModel: SortOrderSchema.optional(),
|
|
openAiModel: SortOrderSchema.optional(),
|
|
googleAiModel: SortOrderSchema.optional(),
|
|
dentalMgmtKey: SortOrderSchema.optional(),
|
|
dentalMgmtEnabled: SortOrderSchema.optional(),
|
|
afterHoursEnabled: SortOrderSchema.optional(),
|
|
openPhoneReply: SortOrderSchema.optional(),
|
|
user: z.lazy(() => UserOrderByWithRelationInputObjectSchema).optional()
|
|
}).strict();
|
|
export const AiSettingsOrderByWithRelationInputObjectSchema: z.ZodType<Prisma.AiSettingsOrderByWithRelationInput> = makeSchema() as unknown as z.ZodType<Prisma.AiSettingsOrderByWithRelationInput>;
|
|
export const AiSettingsOrderByWithRelationInputObjectZodSchema = makeSchema();
|