UNPKG

mongodb-rag-core

Version:

Common elements used by MongoDB Chatbot Framework components.

45 lines 6.13 kB
import { z } from "zod"; import { LanguageModel } from "mongodb-rag-core/aiSdk"; import { MongoDbTag } from "./tags"; export declare const ClassifyMongoDbProgrammingLanguageSchema: z.ZodObject<{ programmingLanguage: z.ZodNullable<z.ZodEnum<["json" | "graphql" | "c" | "cpp" | "csharp" | "go" | "java" | "javascript" | "kotlin" | "objective-c" | "php" | "python" | "ruby" | "rust" | "scala" | "shell" | "swift" | "typescript" | "dart" | "perl", ...("json" | "graphql" | "c" | "cpp" | "csharp" | "go" | "java" | "javascript" | "kotlin" | "objective-c" | "php" | "python" | "ruby" | "rust" | "scala" | "shell" | "swift" | "typescript" | "dart" | "perl")[]]>>; }, "strip", z.ZodTypeAny, { programmingLanguage: "json" | "graphql" | "c" | "cpp" | "csharp" | "go" | "java" | "javascript" | "kotlin" | "objective-c" | "php" | "python" | "ruby" | "rust" | "scala" | "shell" | "swift" | "typescript" | "dart" | "perl" | null; }, { programmingLanguage: "json" | "graphql" | "c" | "cpp" | "csharp" | "go" | "java" | "javascript" | "kotlin" | "objective-c" | "php" | "python" | "ruby" | "rust" | "scala" | "shell" | "swift" | "typescript" | "dart" | "perl" | null; }>; /** Classify metadata relevant to the MongoDB docs chatbot from a user message in the conversation. */ export declare const classifyMongoDbProgrammingLanguage: (model: LanguageModel, data: string, maxRetries?: number) => Promise<"json" | "graphql" | "c" | "cpp" | "csharp" | "go" | "java" | "javascript" | "kotlin" | "objective-c" | "php" | "python" | "ruby" | "rust" | "scala" | "shell" | "swift" | "typescript" | "dart" | "perl" | null>; export declare const ClassifyMongoDbProductSchema: z.ZodObject<{ mongoDbProduct: z.ZodNullable<z.ZodEnum<[string, ...string[]]>>; }, "strip", z.ZodTypeAny, { mongoDbProduct: string | null; }, { mongoDbProduct: string | null; }>; export declare const classifyMongoDbProduct: (model: LanguageModel, data: string, maxRetries?: number) => Promise<"server" | "shell" | "driver" | "voyage_ai" | "aggregation" | "change_streams" | "gridfs" | "atlas" | "atlas_charts" | "atlas_search" | "atlas_vector_search" | "data_federation" | "atlas_cli" | "atlas_online_archive" | "atlas_stream_processing" | "atlas_triggers" | "atlas_operator" | "atlas_gov" | "atlas_performance_advisor" | "bi_connector" | "compass" | "mongodb_ops_manager" | "mongodb_cloud_manager" | "spark_connector" | "mongodb_vscode" | "mcp_server" | "mongodb_cli" | "database_tools" | "mongodb_analyzer" | "intellij" | "kafka_connector" | "django" | "cluster_sync" | "community_kubernetes_operator" | "enterprise_kubernetes_operator" | "mongodb_kubernetes_controllers" | "relational_migrator" | "mongodb_university" | "skills" | null>; export declare const ClassifyMongoDbTopicSchema: z.ZodObject<{ topic: z.ZodNullable<z.ZodEnum<[string, ...string[]]>>; }, "strip", z.ZodTypeAny, { topic: string | null; }, { topic: string | null; }>; export declare const classifyMongoDbTopic: (model: LanguageModel, data: string, maxRetries?: number) => Promise<"search" | "security" | "performance" | "change_streams" | "mongodb_university" | "multi_cloud" | "analytics" | "sharding" | "replication" | "indexes" | "billing" | "iam" | "time_series" | "monitoring" | "queries" | "troubleshoot_debug" | "certificate_exam" | "backup" | "migration" | "data_modeling" | "maintenance" | null>; export declare const classifyMongoDbProgrammingLanguageAndProduct: (model: LanguageModel, data: string, maxRetries?: number) => Promise<{ programmingLanguage: "json" | "graphql" | "c" | "cpp" | "csharp" | "go" | "java" | "javascript" | "kotlin" | "objective-c" | "php" | "python" | "ruby" | "rust" | "scala" | "shell" | "swift" | "typescript" | "dart" | "perl" | null; product: "server" | "shell" | "driver" | "voyage_ai" | "aggregation" | "change_streams" | "gridfs" | "atlas" | "atlas_charts" | "atlas_search" | "atlas_vector_search" | "data_federation" | "atlas_cli" | "atlas_online_archive" | "atlas_stream_processing" | "atlas_triggers" | "atlas_operator" | "atlas_gov" | "atlas_performance_advisor" | "bi_connector" | "compass" | "mongodb_ops_manager" | "mongodb_cloud_manager" | "spark_connector" | "mongodb_vscode" | "mcp_server" | "mongodb_cli" | "database_tools" | "mongodb_analyzer" | "intellij" | "kafka_connector" | "django" | "cluster_sync" | "community_kubernetes_operator" | "enterprise_kubernetes_operator" | "mongodb_kubernetes_controllers" | "relational_migrator" | "mongodb_university" | "skills" | null; }>; export declare const classifyMongoDbMetadata: (model: LanguageModel, data: string, maxRetries?: number) => Promise<{ programmingLanguage: "json" | "graphql" | "c" | "cpp" | "csharp" | "go" | "java" | "javascript" | "kotlin" | "objective-c" | "php" | "python" | "ruby" | "rust" | "scala" | "shell" | "swift" | "typescript" | "dart" | "perl" | null; product: "server" | "shell" | "driver" | "voyage_ai" | "aggregation" | "change_streams" | "gridfs" | "atlas" | "atlas_charts" | "atlas_search" | "atlas_vector_search" | "data_federation" | "atlas_cli" | "atlas_online_archive" | "atlas_stream_processing" | "atlas_triggers" | "atlas_operator" | "atlas_gov" | "atlas_performance_advisor" | "bi_connector" | "compass" | "mongodb_ops_manager" | "mongodb_cloud_manager" | "spark_connector" | "mongodb_vscode" | "mcp_server" | "mongodb_cli" | "database_tools" | "mongodb_analyzer" | "intellij" | "kafka_connector" | "django" | "cluster_sync" | "community_kubernetes_operator" | "enterprise_kubernetes_operator" | "mongodb_kubernetes_controllers" | "relational_migrator" | "mongodb_university" | "skills" | null; topic: "search" | "security" | "performance" | "change_streams" | "mongodb_university" | "multi_cloud" | "analytics" | "sharding" | "replication" | "indexes" | "billing" | "iam" | "time_series" | "monitoring" | "queries" | "troubleshoot_debug" | "certificate_exam" | "backup" | "migration" | "data_modeling" | "maintenance" | null; }>; /** Convert metadata to tags */ export declare function tagifyMetadata(metadata: Record<string, MongoDbTag | null>): MongoDbTag[]; //# sourceMappingURL=classifyMetadata.d.ts.map