UNPKG

@aristech-org/nlp-client

Version:

A Node.js client library for the Aristech NLP Service

127 lines (126 loc) 4.74 kB
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; export declare const protobufPackage = "aristech.nlp"; /** Methods and datatypes for (vector) content management */ export interface GetProjectsRequest { } export interface Project { /** ID of the project */ id: string; /** Name of the project */ name: string; } /** adds a project to the underlying database(s) */ export interface AddProjectRequest { /** Project name */ name: string; /** description of the project */ description: string; /** model to use for vectorembeddings */ embeddingModel: EmbeddingModel | undefined; /** Fallback Messages */ fallbackMessages: FallbackMessage[]; /** default_threshold for search requests */ defaultThreshold: number; teamId: string; debugMode: boolean; excludeOutputFromSearch: boolean; history: History | undefined; configSlug: string; slug: string; } export interface FallbackMessage { message: string; type: FallbackMessage_Type; } export declare enum FallbackMessage_Type { CHAT = 0, EMAIL = 1, VOICE = 2, UNRECOGNIZED = -1 } export declare function fallbackMessage_TypeFromJSON(object: any): FallbackMessage_Type; export declare function fallbackMessage_TypeToJSON(object: FallbackMessage_Type): string; export interface History { /** object id with the creator id */ creatorId: string; /** id of the user who made the last change */ changedBy: string; /** Date of creation */ creationDate: string; /** date of last edit */ lastEditDate: string; } /** response for adding a project. returns the project_id of the created project */ export interface AddProjectResponse { /** id of the created project */ projectId: string; } /** removes the project and all of its content */ export interface RemoveProjectRequest { /** ID of the project to be removed */ projectId: string; } /** response for remove project request */ export interface RemoveProjectResponse { } /** request to get all available embedding models from the server */ export interface GetEmbeddingModelsRequest { } export interface EmbeddingModel { name: string; dimensions: number; baseLibrary: string; locale: string[]; } export interface UpdateProjectRequest { /** the id of the project to be updated, if no id is set, a new project is created */ projectId: string; /** Project name */ name: string; /** description of the project */ description: string; /** model to use for vectorembeddings */ embeddingModel: EmbeddingModel | undefined; /** Fallback Messages */ fallbackMessages: FallbackMessage[]; /** default_threshold for search requests */ defaultThreshold: number; debugMode: boolean; excludeOutputFromSearch: boolean; history: History | undefined; configSlug: string; slug: string; } export interface UpdateProjectResponse { } export declare const GetProjectsRequest: MessageFns<GetProjectsRequest>; export declare const Project: MessageFns<Project>; export declare const AddProjectRequest: MessageFns<AddProjectRequest>; export declare const FallbackMessage: MessageFns<FallbackMessage>; export declare const History: MessageFns<History>; export declare const AddProjectResponse: MessageFns<AddProjectResponse>; export declare const RemoveProjectRequest: MessageFns<RemoveProjectRequest>; export declare const RemoveProjectResponse: MessageFns<RemoveProjectResponse>; export declare const GetEmbeddingModelsRequest: MessageFns<GetEmbeddingModelsRequest>; export declare const EmbeddingModel: MessageFns<EmbeddingModel>; export declare const UpdateProjectRequest: MessageFns<UpdateProjectRequest>; export declare const UpdateProjectResponse: MessageFns<UpdateProjectResponse>; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]>; } : Partial<T>; type KeysOfUnion<T> = T extends T ? keyof T : never; export type Exact<P, I extends P> = P extends Builtin ? P : P & { [K in keyof P]: Exact<P[K], I[K]>; } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never; }; export interface MessageFns<T> { encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; create<I extends Exact<DeepPartial<T>, I>>(base?: I): T; fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T; } export {};