Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ temp/
packages/*/dist/
packages/*/*.tsbuildinfo

# Example builds
examples/*/dist/
examples/*/*.d.ts
examples/*/*.d.ts.map
examples/*/*.js
!examples/*/*.config.js
!examples/*/*.config.ts

# Next.js
.next
out/
Expand Down
5 changes: 5 additions & 0 deletions content/docs/references/ai/ChunkingStrategy.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: ChunkingStrategy
description: ChunkingStrategy Schema Reference
---

15 changes: 15 additions & 0 deletions content/docs/references/ai/DocumentChunk.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: DocumentChunk
description: DocumentChunk Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Unique chunk identifier |
| **content** | `string` | ✅ | Chunk text content |
| **embedding** | `number[]` | optional | Embedding vector |
| **metadata** | `object` | ✅ | |
| **chunkIndex** | `integer` | ✅ | Chunk position in document |
| **tokens** | `integer` | optional | Token count |
18 changes: 18 additions & 0 deletions content/docs/references/ai/DocumentLoaderConfig.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: DocumentLoaderConfig
description: DocumentLoaderConfig Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **type** | `Enum<'file' \| 'directory' \| 'url' \| 'api' \| 'database' \| 'custom'>` | ✅ | |
| **source** | `string` | ✅ | Source path, URL, or identifier |
| **fileTypes** | `string[]` | optional | Accepted file extensions (e.g., [".pdf", ".md"]) |
| **recursive** | `boolean` | optional | Process directories recursively |
| **maxFileSize** | `integer` | optional | Maximum file size in bytes |
| **excludePatterns** | `string[]` | optional | Patterns to exclude |
| **extractImages** | `boolean` | optional | Extract text from images (OCR) |
| **extractTables** | `boolean` | optional | Extract and format tables |
| **loaderConfig** | `Record<string, any>` | optional | Custom loader-specific config |
19 changes: 19 additions & 0 deletions content/docs/references/ai/DocumentMetadata.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: DocumentMetadata
description: DocumentMetadata Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **source** | `string` | ✅ | Document source (file path, URL, etc.) |
| **sourceType** | `Enum<'file' \| 'url' \| 'api' \| 'database' \| 'custom'>` | optional | |
| **title** | `string` | optional | |
| **author** | `string` | optional | |
| **createdAt** | `string` | optional | ISO timestamp |
| **updatedAt** | `string` | optional | ISO timestamp |
| **tags** | `string[]` | optional | |
| **category** | `string` | optional | |
| **language** | `string` | optional | Document language (ISO 639-1 code) |
| **custom** | `Record<string, any>` | optional | Custom metadata fields |
16 changes: 16 additions & 0 deletions content/docs/references/ai/EmbeddingModel.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: EmbeddingModel
description: EmbeddingModel Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **provider** | `Enum<'openai' \| 'cohere' \| 'huggingface' \| 'azure_openai' \| 'local' \| 'custom'>` | ✅ | |
| **model** | `string` | ✅ | Model name (e.g., "text-embedding-3-large") |
| **dimensions** | `integer` | ✅ | Embedding vector dimensions |
| **maxTokens** | `integer` | optional | Maximum tokens per embedding |
| **batchSize** | `integer` | optional | Batch size for embedding |
| **endpoint** | `string` | optional | Custom endpoint URL |
| **apiKey** | `string` | optional | API key or reference to secret |
14 changes: 14 additions & 0 deletions content/docs/references/ai/Entity.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Entity
description: Entity Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **type** | `Enum<'object' \| 'field' \| 'value' \| 'operator' \| 'function' \| 'timeframe'>` | ✅ | |
| **text** | `string` | ✅ | Original text from query |
| **value** | `any` | optional | Normalized value |
| **confidence** | `number` | ✅ | Confidence score |
| **span** | `any[]` | optional | Character span in query |
13 changes: 13 additions & 0 deletions content/docs/references/ai/FieldSynonymConfig.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: FieldSynonymConfig
description: FieldSynonymConfig Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **object** | `string` | ✅ | Object name |
| **field** | `string` | ✅ | Field name |
| **synonyms** | `string[]` | ✅ | Natural language synonyms |
| **examples** | `string[]` | optional | Example queries using synonyms |
16 changes: 16 additions & 0 deletions content/docs/references/ai/ModelCapability.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: ModelCapability
description: ModelCapability Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **textGeneration** | `boolean` | optional | Supports text generation |
| **textEmbedding** | `boolean` | optional | Supports text embedding |
| **imageGeneration** | `boolean` | optional | Supports image generation |
| **imageUnderstanding** | `boolean` | optional | Supports image understanding |
| **functionCalling** | `boolean` | optional | Supports function calling |
| **codeGeneration** | `boolean` | optional | Supports code generation |
| **reasoning** | `boolean` | optional | Supports advanced reasoning |
23 changes: 23 additions & 0 deletions content/docs/references/ai/ModelConfig.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: ModelConfig
description: ModelConfig Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **id** | `string` | ✅ | Unique model identifier |
| **name** | `string` | ✅ | Model display name |
| **version** | `string` | ✅ | Model version (e.g., "gpt-4-turbo-2024-04-09") |
| **provider** | `Enum<'openai' \| 'azure_openai' \| 'anthropic' \| 'google' \| 'cohere' \| 'huggingface' \| 'local' \| 'custom'>` | ✅ | |
| **capabilities** | `object` | ✅ | |
| **limits** | `object` | ✅ | |
| **pricing** | `object` | optional | |
| **endpoint** | `string` | optional | Custom API endpoint |
| **apiKey** | `string` | optional | API key or reference to secret |
| **region** | `string` | optional | Deployment region (e.g., "us-east-1") |
| **description** | `string` | optional | |
| **tags** | `string[]` | optional | Tags for categorization |
| **deprecated** | `boolean` | optional | |
| **recommendedFor** | `string[]` | optional | Use case recommendations |
13 changes: 13 additions & 0 deletions content/docs/references/ai/ModelLimits.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: ModelLimits
description: ModelLimits Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **maxTokens** | `integer` | ✅ | Maximum tokens per request |
| **contextWindow** | `integer` | ✅ | Context window size |
| **maxOutputTokens** | `integer` | optional | Maximum output tokens |
| **rateLimit** | `object` | optional | |
13 changes: 13 additions & 0 deletions content/docs/references/ai/ModelPricing.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: ModelPricing
description: ModelPricing Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **currency** | `string` | optional | |
| **inputCostPer1kTokens** | `number` | optional | Cost per 1K input tokens |
| **outputCostPer1kTokens** | `number` | optional | Cost per 1K output tokens |
| **embeddingCostPer1kTokens** | `number` | optional | Cost per 1K embedding tokens |
15 changes: 15 additions & 0 deletions content/docs/references/ai/ModelProvider.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: ModelProvider
description: ModelProvider Schema Reference
---

## Allowed Values

* `openai`
* `azure_openai`
* `anthropic`
* `google`
* `cohere`
* `huggingface`
* `local`
* `custom`
14 changes: 14 additions & 0 deletions content/docs/references/ai/ModelRegistry.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: ModelRegistry
description: ModelRegistry Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **name** | `string` | ✅ | Registry name |
| **models** | `Record<string, object>` | ✅ | Model entries by ID |
| **promptTemplates** | `Record<string, object>` | optional | Prompt templates by name |
| **defaultModel** | `string` | optional | Default model ID |
| **enableAutoFallback** | `boolean` | optional | Auto-fallback on errors |
14 changes: 14 additions & 0 deletions content/docs/references/ai/ModelRegistryEntry.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: ModelRegistryEntry
description: ModelRegistryEntry Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **model** | `object` | ✅ | |
| **status** | `Enum<'active' \| 'deprecated' \| 'experimental' \| 'disabled'>` | optional | |
| **priority** | `integer` | optional | Priority for model selection |
| **fallbackModels** | `string[]` | optional | Fallback model IDs |
| **healthCheck** | `object` | optional | |
15 changes: 15 additions & 0 deletions content/docs/references/ai/ModelSelectionCriteria.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: ModelSelectionCriteria
description: ModelSelectionCriteria Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **capabilities** | `string[]` | optional | Required capabilities |
| **maxCostPer1kTokens** | `number` | optional | Maximum acceptable cost |
| **minContextWindow** | `number` | optional | Minimum context window size |
| **provider** | `Enum<'openai' \| 'azure_openai' \| 'anthropic' \| 'google' \| 'cohere' \| 'huggingface' \| 'local' \| 'custom'>` | optional | |
| **tags** | `string[]` | optional | |
| **excludeDeprecated** | `boolean` | optional | |
20 changes: 20 additions & 0 deletions content/docs/references/ai/NLQAnalytics.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: NLQAnalytics
description: NLQAnalytics Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **totalQueries** | `integer` | ✅ | |
| **successfulQueries** | `integer` | ✅ | |
| **failedQueries** | `integer` | ✅ | |
| **averageConfidence** | `number` | ✅ | |
| **intentDistribution** | `Record<string, integer>` | ✅ | Count by intent type |
| **topQueries** | `object[]` | ✅ | |
| **averageParseTime** | `number` | ✅ | Average parse time in milliseconds |
| **averageExecutionTime** | `number` | optional | |
| **lowConfidenceQueries** | `object[]` | ✅ | |
| **startDate** | `string` | ✅ | ISO timestamp |
| **endDate** | `string` | ✅ | ISO timestamp |
14 changes: 14 additions & 0 deletions content/docs/references/ai/NLQFieldMapping.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: NLQFieldMapping
description: NLQFieldMapping Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **naturalLanguage** | `string` | ✅ | NL field name (e.g., "customer name") |
| **objectField** | `string` | ✅ | Actual field name (e.g., "account.name") |
| **object** | `string` | ✅ | Object name |
| **field** | `string` | ✅ | Field name |
| **confidence** | `number` | ✅ | |
23 changes: 23 additions & 0 deletions content/docs/references/ai/NLQModelConfig.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: NLQModelConfig
description: NLQModelConfig Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **modelId** | `string` | ✅ | Model from registry |
| **systemPrompt** | `string` | optional | System prompt override |
| **includeSchema** | `boolean` | optional | Include object schema in prompt |
| **includeExamples** | `boolean` | optional | Include examples in prompt |
| **enableIntentDetection** | `boolean` | optional | |
| **intentThreshold** | `number` | optional | |
| **enableEntityRecognition** | `boolean` | optional | |
| **entityRecognitionModel** | `string` | optional | |
| **enableFuzzyMatching** | `boolean` | optional | Fuzzy match field names |
| **fuzzyMatchThreshold** | `number` | optional | |
| **enableTimeframeDetection** | `boolean` | optional | |
| **defaultTimeframe** | `string` | optional | Default timeframe if not specified |
| **enableCaching** | `boolean` | optional | |
| **cacheTTL** | `integer` | optional | Cache TTL in seconds |
20 changes: 20 additions & 0 deletions content/docs/references/ai/NLQParseResult.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: NLQParseResult
description: NLQParseResult Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **originalQuery** | `string` | ✅ | |
| **intent** | `Enum<'select' \| 'aggregate' \| 'filter' \| 'sort' \| 'compare' \| 'trend' \| 'insight' \| 'create' \| 'update' \| 'delete'>` | ✅ | |
| **intentConfidence** | `number` | ✅ | |
| **entities** | `object[]` | ✅ | |
| **targetObject** | `string` | optional | Primary object to query |
| **fields** | `object[]` | optional | |
| **timeframe** | `object` | optional | |
| **ast** | `any` | optional | Generated ObjectQL AST |
| **confidence** | `number` | ✅ | Overall confidence |
| **ambiguities** | `object[]` | optional | Detected ambiguities requiring clarification |
| **alternatives** | `object[]` | optional | |
16 changes: 16 additions & 0 deletions content/docs/references/ai/NLQRequest.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: NLQRequest
description: NLQRequest Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **query** | `string` | ✅ | Natural language query |
| **context** | `object` | optional | |
| **includeAlternatives** | `boolean` | optional | Include alternative interpretations |
| **maxAlternatives** | `integer` | optional | |
| **minConfidence** | `number` | optional | Minimum confidence threshold |
| **executeQuery** | `boolean` | optional | Execute query and return results |
| **maxResults** | `integer` | optional | Maximum results to return |
15 changes: 15 additions & 0 deletions content/docs/references/ai/NLQResponse.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: NLQResponse
description: NLQResponse Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **parseResult** | `object` | ✅ | |
| **results** | `Record<string, any>[]` | optional | Query results |
| **totalCount** | `integer` | optional | |
| **executionTime** | `number` | optional | Execution time in milliseconds |
| **needsClarification** | `boolean` | ✅ | Whether query needs clarification |
| **suggestions** | `string[]` | optional | Query refinement suggestions |
17 changes: 17 additions & 0 deletions content/docs/references/ai/NLQTrainingExample.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: NLQTrainingExample
description: NLQTrainingExample Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **query** | `string` | ✅ | Natural language query |
| **context** | `object` | optional | |
| **expectedIntent** | `Enum<'select' \| 'aggregate' \| 'filter' \| 'sort' \| 'compare' \| 'trend' \| 'insight' \| 'create' \| 'update' \| 'delete'>` | ✅ | |
| **expectedObject** | `string` | optional | |
| **expectedAST** | `any` | optional | Expected ObjectQL AST |
| **category** | `string` | optional | Example category |
| **tags** | `string[]` | optional | |
| **notes** | `string` | optional | |
Loading
Loading