@nuclia/core
Advanced tools
Comparing version 1.14.3 to 1.14.4
@@ -0,1 +1,8 @@ | ||
# 1.14.4 (2024-04-05) | ||
### Improvements | ||
- Support the `/predict/query` endpoint | ||
- Add support for `xpath` selector in Link fields | ||
# 1.14.3 (2024-03-38) | ||
@@ -2,0 +9,0 @@ |
import { Observable } from 'rxjs'; | ||
import { AccountUsersPayload, FullAccountUser, IDb, INuclia, InviteAccountUserPayload, PendingInvitation } from '../models'; | ||
import { Account, AccountCreation, AccountModification, AccountStatus, KbIndex, LearningConfigurations, NUAClient, NUAClientPayload, PredictedToken, ProcessingPullResponse, ProcessingPushResponse, ProcessingStat, StatsPeriod, StatsRange, StatsType, Welcome } from './db.models'; | ||
import { Account, AccountCreation, AccountModification, AccountStatus, KbIndex, LearningConfigurations, NUAClient, NUAClientPayload, PredictedToken, ProcessingPullResponse, ProcessingPushResponse, ProcessingStat, QueryInfo, StatsPeriod, StatsRange, StatsType, Welcome } from './db.models'; | ||
import type { EventList, IKnowledgeBoxItem, KnowledgeBoxCreation } from './kb'; | ||
@@ -186,2 +186,6 @@ import { IStandaloneKb, WritableKnowledgeBox } from './kb'; | ||
/** | ||
* Analyse a sentence, returning the language, the entities intent and the embeddings. | ||
*/ | ||
predictQuery(text: string, rephrase?: boolean, model?: string): Observable<QueryInfo>; | ||
/** | ||
* Generate a summary from a text. | ||
@@ -188,0 +192,0 @@ * |
@@ -225,1 +225,25 @@ export type AccountTypes = 'stash-trial' | 'v3starter' | 'v3fly' | 'v3growth' | 'v3enterprise' | 'stash-basic' | 'stash-team' | 'stash-startup' | 'stash-starter' | 'stash-growth' | 'stash-enterprise' | 'stash-developer' | 'stash-business'; | ||
} | ||
export interface Ner { | ||
text: string; | ||
ner: string; | ||
start: number; | ||
end: number; | ||
} | ||
export interface TokenSearch { | ||
tokens: Ner[]; | ||
time: number; | ||
} | ||
export interface SentenceSearch { | ||
data: number[]; | ||
time: number; | ||
} | ||
export interface QueryInfo { | ||
language: string; | ||
stop_words: string[]; | ||
semantic_threshold: number; | ||
visual_llm: boolean; | ||
max_context: number; | ||
entities?: TokenSearch; | ||
sentence?: SentenceSearch; | ||
query: string; | ||
} |
@@ -245,2 +245,3 @@ export interface IResource { | ||
css_selector?: string | null; | ||
xpath?: string | null; | ||
} | ||
@@ -247,0 +248,0 @@ export declare class TextFieldData implements IFieldData { |
import type { Observable } from 'rxjs'; | ||
import type { AuthTokens, JwtUser, NucliaDBRole } from './auth'; | ||
import { Account, AccountCreation, AccountModification, AccountStatus, AccountTypes, EventList, IKnowledgeBoxItem, IStandaloneKb, KBRoles, KbIndex, KnowledgeBox, KnowledgeBoxCreation, LearningConfigurations, NUAClient, NUAClientPayload, PredictedToken, ProcessingPullResponse, ProcessingPushResponse, ProcessingStat, StatsPeriod, StatsRange, StatsType, Welcome, WritableKnowledgeBox } from './db'; | ||
import { Account, AccountCreation, AccountModification, AccountStatus, AccountTypes, EventList, IKnowledgeBoxItem, IStandaloneKb, KBRoles, KbIndex, KnowledgeBox, KnowledgeBoxCreation, LearningConfigurations, NUAClient, NUAClientPayload, PredictedToken, ProcessingPullResponse, ProcessingPushResponse, ProcessingStat, QueryInfo, StatsPeriod, StatsRange, StatsType, Welcome, WritableKnowledgeBox } from './db'; | ||
export interface INuclia { | ||
@@ -125,2 +125,3 @@ options: NucliaOptions; | ||
predictAnswer(question: string, context: string[], model?: string): Observable<string>; | ||
predictQuery(text: string, rephrase?: boolean, model?: string): Observable<QueryInfo>; | ||
predictSummarize(text: string, user_prompt?: string, model?: string, summary_kind?: 'simple' | 'extended'): Observable<string>; | ||
@@ -127,0 +128,0 @@ getAccountUser(accountSlug: string, userId: string): Observable<Partial<FullAccountUser>>; |
{ | ||
"name": "@nuclia/core", | ||
"version": "1.14.3", | ||
"version": "1.14.4", | ||
"description": "SDK allowing to integrate Nuclia services in your frontend application", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
import { Observable } from 'rxjs'; | ||
import { AccountUsersPayload, FullAccountUser, IDb, INuclia, InviteAccountUserPayload, PendingInvitation } from '../models'; | ||
import { Account, AccountCreation, AccountModification, AccountStatus, KbIndex, LearningConfigurations, NUAClient, NUAClientPayload, PredictedToken, ProcessingPullResponse, ProcessingPushResponse, ProcessingStat, StatsPeriod, StatsRange, StatsType, Welcome } from './db.models'; | ||
import { Account, AccountCreation, AccountModification, AccountStatus, KbIndex, LearningConfigurations, NUAClient, NUAClientPayload, PredictedToken, ProcessingPullResponse, ProcessingPushResponse, ProcessingStat, QueryInfo, StatsPeriod, StatsRange, StatsType, Welcome } from './db.models'; | ||
import type { EventList, IKnowledgeBoxItem, KnowledgeBoxCreation } from './kb'; | ||
@@ -186,2 +186,6 @@ import { IStandaloneKb, WritableKnowledgeBox } from './kb'; | ||
/** | ||
* Analyse a sentence, returning the language, the entities intent and the embeddings. | ||
*/ | ||
predictQuery(text: string, rephrase?: boolean, model?: string): Observable<QueryInfo>; | ||
/** | ||
* Generate a summary from a text. | ||
@@ -188,0 +192,0 @@ * |
@@ -225,1 +225,25 @@ export type AccountTypes = 'stash-trial' | 'v3starter' | 'v3fly' | 'v3growth' | 'v3enterprise' | 'stash-basic' | 'stash-team' | 'stash-startup' | 'stash-starter' | 'stash-growth' | 'stash-enterprise' | 'stash-developer' | 'stash-business'; | ||
} | ||
export interface Ner { | ||
text: string; | ||
ner: string; | ||
start: number; | ||
end: number; | ||
} | ||
export interface TokenSearch { | ||
tokens: Ner[]; | ||
time: number; | ||
} | ||
export interface SentenceSearch { | ||
data: number[]; | ||
time: number; | ||
} | ||
export interface QueryInfo { | ||
language: string; | ||
stop_words: string[]; | ||
semantic_threshold: number; | ||
visual_llm: boolean; | ||
max_context: number; | ||
entities?: TokenSearch; | ||
sentence?: SentenceSearch; | ||
query: string; | ||
} |
@@ -245,2 +245,3 @@ export interface IResource { | ||
css_selector?: string | null; | ||
xpath?: string | null; | ||
} | ||
@@ -247,0 +248,0 @@ export declare class TextFieldData implements IFieldData { |
import type { Observable } from 'rxjs'; | ||
import type { AuthTokens, JwtUser, NucliaDBRole } from './auth'; | ||
import { Account, AccountCreation, AccountModification, AccountStatus, AccountTypes, EventList, IKnowledgeBoxItem, IStandaloneKb, KBRoles, KbIndex, KnowledgeBox, KnowledgeBoxCreation, LearningConfigurations, NUAClient, NUAClientPayload, PredictedToken, ProcessingPullResponse, ProcessingPushResponse, ProcessingStat, StatsPeriod, StatsRange, StatsType, Welcome, WritableKnowledgeBox } from './db'; | ||
import { Account, AccountCreation, AccountModification, AccountStatus, AccountTypes, EventList, IKnowledgeBoxItem, IStandaloneKb, KBRoles, KbIndex, KnowledgeBox, KnowledgeBoxCreation, LearningConfigurations, NUAClient, NUAClientPayload, PredictedToken, ProcessingPullResponse, ProcessingPushResponse, ProcessingStat, QueryInfo, StatsPeriod, StatsRange, StatsType, Welcome, WritableKnowledgeBox } from './db'; | ||
export interface INuclia { | ||
@@ -125,2 +125,3 @@ options: NucliaOptions; | ||
predictAnswer(question: string, context: string[], model?: string): Observable<string>; | ||
predictQuery(text: string, rephrase?: boolean, model?: string): Observable<QueryInfo>; | ||
predictSummarize(text: string, user_prompt?: string, model?: string, summary_kind?: 'simple' | 'extended'): Observable<string>; | ||
@@ -127,0 +128,0 @@ getAccountUser(accountSlug: string, userId: string): Observable<Partial<FullAccountUser>>; |
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
465431
9092