@nuclia/core
Advanced tools
Comparing version 1.14.2 to 1.14.3
@@ -0,1 +1,11 @@ | ||
# 1.14.3 (2024-03-38) | ||
### Improvements | ||
- Knowledge Box `title` and `slug` are required fields in `IKnowledgeBoxCreation` model | ||
- Adding optional `allowed_origins` field in `IKnowledgeBoxCreation` model | ||
- Improve reliability of resource creation and modification | ||
- Update `getParagraphText`, `getSentenceText` and `getDataKeyFromFieldType` methods to support conversation fields | ||
- Support rephrase feature and add more RAG strategies | ||
# 1.14.2 (2024-03-15) | ||
@@ -2,0 +12,0 @@ |
@@ -28,4 +28,4 @@ import type { Observable } from 'rxjs'; | ||
id: string; | ||
slug?: string; | ||
title?: string; | ||
slug: string; | ||
title: string; | ||
state?: KBStates; | ||
@@ -35,2 +35,3 @@ description?: string; | ||
uuid?: string; | ||
allowed_origins?: string[] | null; | ||
} | ||
@@ -227,8 +228,34 @@ export interface IKnowledgeBoxItem extends IKnowledgeBoxCreation { | ||
citations?: boolean; | ||
rephrase?: boolean; | ||
} | ||
export type RAGStrategyName = 'field_extension' | 'full_resource'; | ||
export interface RAGStrategy { | ||
name: RAGStrategyName; | ||
fields?: string[]; | ||
export declare enum RagStrategyName { | ||
FIELD_EXTENSION = "field_extension", | ||
FULL_RESOURCE = "full_resource", | ||
HIERARCHY = "hierarchy" | ||
} | ||
export interface FieldExtensionStrategy { | ||
name: RagStrategyName.FIELD_EXTENSION; | ||
fields: string[]; | ||
} | ||
export interface FullResourceStrategy { | ||
name: RagStrategyName.FULL_RESOURCE; | ||
count?: number; | ||
} | ||
export interface HierarchyStrategy { | ||
name: RagStrategyName.HIERARCHY; | ||
count?: number; | ||
} | ||
export type RAGStrategy = FieldExtensionStrategy | FullResourceStrategy | HierarchyStrategy; | ||
export declare enum RagImageStrategyName { | ||
PAGE_IMAGE = "page_image", | ||
PARAGRAPH_IMAGE = "paragraph_image" | ||
} | ||
export interface PageImageStrategy { | ||
name: RagImageStrategyName.PAGE_IMAGE; | ||
count?: number; | ||
} | ||
export interface ParagraphImageStrategy { | ||
name: RagImageStrategyName.PARAGRAPH_IMAGE; | ||
} | ||
export type RAGImageStrategy = PageImageStrategy | ParagraphImageStrategy; | ||
export interface Counters { | ||
@@ -235,0 +262,0 @@ resources: number; |
import type { Classification, TokenAnnotation, UserFieldMetadata } from './resource.models'; | ||
import { RetryConfig } from 'rxjs'; | ||
export declare const deDuplicateList: (a: any[]) => any[]; | ||
@@ -7,1 +8,2 @@ export declare const setLabels: (fieldId: string, fieldType: string, paragraphId: string, labels: Classification[], allEntries: UserFieldMetadata[]) => UserFieldMetadata[]; | ||
export declare const lengthUnicode: (str: string | undefined) => number; | ||
export declare const resourceRetryConfig: RetryConfig; |
@@ -35,2 +35,5 @@ export interface IResource { | ||
}; | ||
conversations?: { | ||
[key: string]: ConversationFieldData; | ||
}; | ||
}; | ||
@@ -37,0 +40,0 @@ export interface ICreateResource { |
import type { ExtractedDataTypes, FIELD_TYPE, FieldId, IFieldData, IResource, RelationEntityType, RelationType } from '../resource'; | ||
import type { ResourceProperties } from '../db.models'; | ||
import { RAGStrategy } from '../kb'; | ||
import { RAGImageStrategy, RAGStrategy } from '../kb'; | ||
export type ResourceStatus = 'PENDING' | 'PROCESSED' | 'ERROR'; | ||
@@ -49,3 +49,5 @@ export type SortOrder = 'asc' | 'desc'; | ||
rag_strategies?: RAGStrategy[]; | ||
rag_images_strategies?: RAGImageStrategy[]; | ||
generative_model?: string; | ||
rephrase?: boolean; | ||
} | ||
@@ -52,0 +54,0 @@ export interface SearchOptions extends BaseSearchOptions { |
{ | ||
"name": "@nuclia/core", | ||
"version": "1.14.2", | ||
"version": "1.14.3", | ||
"description": "SDK allowing to integrate Nuclia services in your frontend application", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -28,4 +28,4 @@ import type { Observable } from 'rxjs'; | ||
id: string; | ||
slug?: string; | ||
title?: string; | ||
slug: string; | ||
title: string; | ||
state?: KBStates; | ||
@@ -35,2 +35,3 @@ description?: string; | ||
uuid?: string; | ||
allowed_origins?: string[] | null; | ||
} | ||
@@ -227,8 +228,34 @@ export interface IKnowledgeBoxItem extends IKnowledgeBoxCreation { | ||
citations?: boolean; | ||
rephrase?: boolean; | ||
} | ||
export type RAGStrategyName = 'field_extension' | 'full_resource'; | ||
export interface RAGStrategy { | ||
name: RAGStrategyName; | ||
fields?: string[]; | ||
export declare enum RagStrategyName { | ||
FIELD_EXTENSION = "field_extension", | ||
FULL_RESOURCE = "full_resource", | ||
HIERARCHY = "hierarchy" | ||
} | ||
export interface FieldExtensionStrategy { | ||
name: RagStrategyName.FIELD_EXTENSION; | ||
fields: string[]; | ||
} | ||
export interface FullResourceStrategy { | ||
name: RagStrategyName.FULL_RESOURCE; | ||
count?: number; | ||
} | ||
export interface HierarchyStrategy { | ||
name: RagStrategyName.HIERARCHY; | ||
count?: number; | ||
} | ||
export type RAGStrategy = FieldExtensionStrategy | FullResourceStrategy | HierarchyStrategy; | ||
export declare enum RagImageStrategyName { | ||
PAGE_IMAGE = "page_image", | ||
PARAGRAPH_IMAGE = "paragraph_image" | ||
} | ||
export interface PageImageStrategy { | ||
name: RagImageStrategyName.PAGE_IMAGE; | ||
count?: number; | ||
} | ||
export interface ParagraphImageStrategy { | ||
name: RagImageStrategyName.PARAGRAPH_IMAGE; | ||
} | ||
export type RAGImageStrategy = PageImageStrategy | ParagraphImageStrategy; | ||
export interface Counters { | ||
@@ -235,0 +262,0 @@ resources: number; |
import type { Classification, TokenAnnotation, UserFieldMetadata } from './resource.models'; | ||
import { RetryConfig } from 'rxjs'; | ||
export declare const deDuplicateList: (a: any[]) => any[]; | ||
@@ -7,1 +8,2 @@ export declare const setLabels: (fieldId: string, fieldType: string, paragraphId: string, labels: Classification[], allEntries: UserFieldMetadata[]) => UserFieldMetadata[]; | ||
export declare const lengthUnicode: (str: string | undefined) => number; | ||
export declare const resourceRetryConfig: RetryConfig; |
@@ -35,2 +35,5 @@ export interface IResource { | ||
}; | ||
conversations?: { | ||
[key: string]: ConversationFieldData; | ||
}; | ||
}; | ||
@@ -37,0 +40,0 @@ export interface ICreateResource { |
import type { ExtractedDataTypes, FIELD_TYPE, FieldId, IFieldData, IResource, RelationEntityType, RelationType } from '../resource'; | ||
import type { ResourceProperties } from '../db.models'; | ||
import { RAGStrategy } from '../kb'; | ||
import { RAGImageStrategy, RAGStrategy } from '../kb'; | ||
export type ResourceStatus = 'PENDING' | 'PROCESSED' | 'ERROR'; | ||
@@ -49,3 +49,5 @@ export type SortOrder = 'asc' | 'desc'; | ||
rag_strategies?: RAGStrategy[]; | ||
rag_images_strategies?: RAGImageStrategy[]; | ||
generative_model?: string; | ||
rephrase?: boolean; | ||
} | ||
@@ -52,0 +54,0 @@ export interface SearchOptions extends BaseSearchOptions { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
462261
8999