UNPKG

aquanet-bot-lib

Version:

A library for building aquaculture chatbots with LLM integration

302 lines (301 loc) 11.6 kB
import { z } from 'zod'; /** * Validator cho nguồn dữ liệu * - Phải một trong các nguồn được định nghĩa * - Không được trùng lặp */ export declare const DataSourceSchema: z.ZodEffects<z.ZodArray<z.ZodEnum<["research_papers", "industry_standards", "technical_guidelines", "expert_knowledge", "case_studies", "market_reports"]>, "many">, ("research_papers" | "industry_standards" | "technical_guidelines" | "expert_knowledge" | "case_studies" | "market_reports")[], ("research_papers" | "industry_standards" | "technical_guidelines" | "expert_knowledge" | "case_studies" | "market_reports")[]>; /** * Validator cho công cụ tích hợp * - Các công cụ phải được bật/tắt ràng * - Nếu bật alertSystem thì phải ít nhất một nguồn dữ liệu */ export declare const ToolsSchema: z.ZodEffects<z.ZodObject<{ waterCalculator: z.ZodBoolean; farmingCalendar: z.ZodBoolean; alertSystem: z.ZodBoolean; diseaseIdentifier: z.ZodBoolean; feedOptimizer: z.ZodBoolean; }, "strip", z.ZodTypeAny, { waterCalculator: boolean; farmingCalendar: boolean; alertSystem: boolean; diseaseIdentifier: boolean; feedOptimizer: boolean; }, { waterCalculator: boolean; farmingCalendar: boolean; alertSystem: boolean; diseaseIdentifier: boolean; feedOptimizer: boolean; }>, { waterCalculator: boolean; farmingCalendar: boolean; alertSystem: boolean; diseaseIdentifier: boolean; feedOptimizer: boolean; }, { waterCalculator: boolean; farmingCalendar: boolean; alertSystem: boolean; diseaseIdentifier: boolean; feedOptimizer: boolean; }>; /** * Validator cho kiểm tra độ chính xác * - Ngưỡng đánh giá phải hợp (0.5-1.0) * - Nếu yêu cầu trích dẫn thì phải nguồn kiểm tra */ export declare const ValidationSchema: z.ZodEffects<z.ZodObject<{ requireSourceCitation: z.ZodBoolean; confidenceScoring: z.ZodBoolean; expertReviewThreshold: z.ZodNumber; factCheckSources: z.ZodArray<z.ZodString, "many">; }, "strip", z.ZodTypeAny, { requireSourceCitation: boolean; confidenceScoring: boolean; expertReviewThreshold: number; factCheckSources: string[]; }, { requireSourceCitation: boolean; confidenceScoring: boolean; expertReviewThreshold: number; factCheckSources: string[]; }>, { requireSourceCitation: boolean; confidenceScoring: boolean; expertReviewThreshold: number; factCheckSources: string[]; }, { requireSourceCitation: boolean; confidenceScoring: boolean; expertReviewThreshold: number; factCheckSources: string[]; }>; /** * Validator cho tùy chỉnh * - Các loài phải được định nghĩa ràng * - Phương pháp nuôi phải phù hợp với loài * - Hướng dẫn vùng miền phải hợp lệ */ export declare const CustomizationSchema: z.ZodEffects<z.ZodObject<{ speciesSpecific: z.ZodArray<z.ZodString, "many">; farmingMethods: z.ZodArray<z.ZodString, "many">; regionalGuidelines: z.ZodArray<z.ZodString, "many">; customPrompts: z.ZodRecord<z.ZodString, z.ZodString>; }, "strip", z.ZodTypeAny, { speciesSpecific: string[]; farmingMethods: string[]; regionalGuidelines: string[]; customPrompts: Record<string, string>; }, { speciesSpecific: string[]; farmingMethods: string[]; regionalGuidelines: string[]; customPrompts: Record<string, string>; }>, { speciesSpecific: string[]; farmingMethods: string[]; regionalGuidelines: string[]; customPrompts: Record<string, string>; }, { speciesSpecific: string[]; farmingMethods: string[]; regionalGuidelines: string[]; customPrompts: Record<string, string>; }>; /** * Validator chính cho aquaculture config * - Kiểm tra tính hợp lệ phụ thuộc giữa các thuộc tính * - Đảm bảo tính nhất quán của cấu hình */ export declare const AquacultureConfigSchema: z.ZodEffects<z.ZodObject<{ knowledgeDomains: z.ZodArray<z.ZodEnum<["farming_techniques", "water_quality", "disease_management", "breeding", "feed_management", "production", "market_analysis", "regulations"]>, "many">; dataSources: z.ZodEffects<z.ZodArray<z.ZodEnum<["research_papers", "industry_standards", "technical_guidelines", "expert_knowledge", "case_studies", "market_reports"]>, "many">, ("research_papers" | "industry_standards" | "technical_guidelines" | "expert_knowledge" | "case_studies" | "market_reports")[], ("research_papers" | "industry_standards" | "technical_guidelines" | "expert_knowledge" | "case_studies" | "market_reports")[]>; expertiseLevel: z.ZodEnum<["basic", "intermediate", "advanced"]>; language: z.ZodEnum<["vi", "en"]>; useIndustryTerms: z.ZodBoolean; tools: z.ZodEffects<z.ZodObject<{ waterCalculator: z.ZodBoolean; farmingCalendar: z.ZodBoolean; alertSystem: z.ZodBoolean; diseaseIdentifier: z.ZodBoolean; feedOptimizer: z.ZodBoolean; }, "strip", z.ZodTypeAny, { waterCalculator: boolean; farmingCalendar: boolean; alertSystem: boolean; diseaseIdentifier: boolean; feedOptimizer: boolean; }, { waterCalculator: boolean; farmingCalendar: boolean; alertSystem: boolean; diseaseIdentifier: boolean; feedOptimizer: boolean; }>, { waterCalculator: boolean; farmingCalendar: boolean; alertSystem: boolean; diseaseIdentifier: boolean; feedOptimizer: boolean; }, { waterCalculator: boolean; farmingCalendar: boolean; alertSystem: boolean; diseaseIdentifier: boolean; feedOptimizer: boolean; }>; validation: z.ZodEffects<z.ZodObject<{ requireSourceCitation: z.ZodBoolean; confidenceScoring: z.ZodBoolean; expertReviewThreshold: z.ZodNumber; factCheckSources: z.ZodArray<z.ZodString, "many">; }, "strip", z.ZodTypeAny, { requireSourceCitation: boolean; confidenceScoring: boolean; expertReviewThreshold: number; factCheckSources: string[]; }, { requireSourceCitation: boolean; confidenceScoring: boolean; expertReviewThreshold: number; factCheckSources: string[]; }>, { requireSourceCitation: boolean; confidenceScoring: boolean; expertReviewThreshold: number; factCheckSources: string[]; }, { requireSourceCitation: boolean; confidenceScoring: boolean; expertReviewThreshold: number; factCheckSources: string[]; }>; customization: z.ZodEffects<z.ZodObject<{ speciesSpecific: z.ZodArray<z.ZodString, "many">; farmingMethods: z.ZodArray<z.ZodString, "many">; regionalGuidelines: z.ZodArray<z.ZodString, "many">; customPrompts: z.ZodRecord<z.ZodString, z.ZodString>; }, "strip", z.ZodTypeAny, { speciesSpecific: string[]; farmingMethods: string[]; regionalGuidelines: string[]; customPrompts: Record<string, string>; }, { speciesSpecific: string[]; farmingMethods: string[]; regionalGuidelines: string[]; customPrompts: Record<string, string>; }>, { speciesSpecific: string[]; farmingMethods: string[]; regionalGuidelines: string[]; customPrompts: Record<string, string>; }, { speciesSpecific: string[]; farmingMethods: string[]; regionalGuidelines: string[]; customPrompts: Record<string, string>; }>; }, "strip", z.ZodTypeAny, { validation: { requireSourceCitation: boolean; confidenceScoring: boolean; expertReviewThreshold: number; factCheckSources: string[]; }; knowledgeDomains: ("farming_techniques" | "water_quality" | "disease_management" | "breeding" | "feed_management" | "production" | "market_analysis" | "regulations")[]; dataSources: ("research_papers" | "industry_standards" | "technical_guidelines" | "expert_knowledge" | "case_studies" | "market_reports")[]; expertiseLevel: "basic" | "intermediate" | "advanced"; language: "vi" | "en"; useIndustryTerms: boolean; tools: { waterCalculator: boolean; farmingCalendar: boolean; alertSystem: boolean; diseaseIdentifier: boolean; feedOptimizer: boolean; }; customization: { speciesSpecific: string[]; farmingMethods: string[]; regionalGuidelines: string[]; customPrompts: Record<string, string>; }; }, { validation: { requireSourceCitation: boolean; confidenceScoring: boolean; expertReviewThreshold: number; factCheckSources: string[]; }; knowledgeDomains: ("farming_techniques" | "water_quality" | "disease_management" | "breeding" | "feed_management" | "production" | "market_analysis" | "regulations")[]; dataSources: ("research_papers" | "industry_standards" | "technical_guidelines" | "expert_knowledge" | "case_studies" | "market_reports")[]; expertiseLevel: "basic" | "intermediate" | "advanced"; language: "vi" | "en"; useIndustryTerms: boolean; tools: { waterCalculator: boolean; farmingCalendar: boolean; alertSystem: boolean; diseaseIdentifier: boolean; feedOptimizer: boolean; }; customization: { speciesSpecific: string[]; farmingMethods: string[]; regionalGuidelines: string[]; customPrompts: Record<string, string>; }; }>, { validation: { requireSourceCitation: boolean; confidenceScoring: boolean; expertReviewThreshold: number; factCheckSources: string[]; }; knowledgeDomains: ("farming_techniques" | "water_quality" | "disease_management" | "breeding" | "feed_management" | "production" | "market_analysis" | "regulations")[]; dataSources: ("research_papers" | "industry_standards" | "technical_guidelines" | "expert_knowledge" | "case_studies" | "market_reports")[]; expertiseLevel: "basic" | "intermediate" | "advanced"; language: "vi" | "en"; useIndustryTerms: boolean; tools: { waterCalculator: boolean; farmingCalendar: boolean; alertSystem: boolean; diseaseIdentifier: boolean; feedOptimizer: boolean; }; customization: { speciesSpecific: string[]; farmingMethods: string[]; regionalGuidelines: string[]; customPrompts: Record<string, string>; }; }, { validation: { requireSourceCitation: boolean; confidenceScoring: boolean; expertReviewThreshold: number; factCheckSources: string[]; }; knowledgeDomains: ("farming_techniques" | "water_quality" | "disease_management" | "breeding" | "feed_management" | "production" | "market_analysis" | "regulations")[]; dataSources: ("research_papers" | "industry_standards" | "technical_guidelines" | "expert_knowledge" | "case_studies" | "market_reports")[]; expertiseLevel: "basic" | "intermediate" | "advanced"; language: "vi" | "en"; useIndustryTerms: boolean; tools: { waterCalculator: boolean; farmingCalendar: boolean; alertSystem: boolean; diseaseIdentifier: boolean; feedOptimizer: boolean; }; customization: { speciesSpecific: string[]; farmingMethods: string[]; regionalGuidelines: string[]; customPrompts: Record<string, string>; }; }>;