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
24 changes: 24 additions & 0 deletions src/lib/helpers/enums.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ const routingMode = {
};
export const RoutingMode = Object.freeze(routingMode);

const functionVisMode = {
Manual: "manual",
Auto: "auto"
};
export const FunctionVisMode = Object.freeze(functionVisMode);

const agentTaskStatus = {
Scheduled: 'scheduled',
New: 'new',
Expand Down Expand Up @@ -117,6 +123,24 @@ const knowledgePayloadName = {
};
export const KnowledgePayloadName = Object.freeze(knowledgePayloadName);

const vectorPayloadDataType = {
String: Object.freeze({ id: 1, name: 'String' }),
Boolean: Object.freeze({ id: 2, name: 'Boolean' }),
Integer: Object.freeze({ id: 3, name: 'Integer' }),
Double: Object.freeze({ id: 4, name: 'Double' }),
Datetime: Object.freeze({ id: 5, name: 'Datetime' }),
};
export const VectorPayloadDataType = Object.freeze(vectorPayloadDataType);

const vectorIndexSchemaType = {
Text: "text",
Integer: "integer",
Float: "float",
Boolean: "bool",
Datetime: "datetime"
};
export const VectorIndexSchemaType = Object.freeze(vectorIndexSchemaType);

const vectorDataSource = {
Api: 'api',
User: 'user',
Expand Down
1 change: 1 addition & 0 deletions src/lib/helpers/types/agentTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
* @property {string} description - Agent description.
* @property {string} type - Agent type
* @property {string?} mode - Agent routing mode
* @property {string?} function_visibility_mode - Agent function visibility mode
* @property {string} instruction - System prompt
* @property {ChannelInstruction[]} channel_instructions - Channel instructions
* @property {boolean} disabled
Expand Down
7 changes: 7 additions & 0 deletions src/lib/helpers/types/commonTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
* @typedef {Object} LlmModelSetting
* @property {string} name
* @property {string} type
* @property {any} reasoning
*/


Expand All @@ -70,4 +71,10 @@
* @property {string?} [displayName]
*/

/**
* @typedef {Object} SuccessFailResponse
* @property {any[]} success
* @property {any[]} fail
*/

export default {};
58 changes: 56 additions & 2 deletions src/lib/helpers/types/knowledgeTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,41 @@

/**
* @typedef {Object} VectorFilterGroup
* @property {string} [filter_operator] - The filter operator.
* @property {{ key: string, value: string }[]} [filters] - Search filters.
* @property {string} [logical_operator] - The logical operator.
* @property {VectorFilterSubGroup[]} [filters] - Search filters.
*/

/**
* @typedef {Object} VectorFilterSubGroup
* @property {string} [logical_operator] - The logical operator.
* @property {VectorFilterOperand[]} [operands] - Search operands.
*/

/**
* @typedef {Object} VectorFilterOperand
* @property {VectorFilterMatch?} [match] - The match filter.
* @property {VectorFilterRange?} [range] -The range filter.
*/

/**
* @typedef {Object} VectorFilterMatch
* @property {string} key - The field name.
* @property {string} value - The field value.
* @property {string} operator - The operator.
* @property {string} data_type -The field data type.
*/

/**
* @typedef {Object} VectorFilterRange
* @property {string} key - The field name.
* @property {string} data_type -The field data type.
* @property {VectorFilterRangeCondition[]} conditions -The conditions.
*/

/**
* @typedef {Object} VectorFilterRangeCondition
* @property {string} value - The field value.
* @property {string} operator -The operator.
*/

/**
Expand Down Expand Up @@ -100,4 +133,25 @@
* @property {number} dimension
*/

/**
* @typedef {Object} VectorCollectionDetails
* @property {string} status
* @property {number} vectors_count
* @property {number} points_count
* @property {PayloadSchemaDetail[]} payload_schema
*/

/**
* @typedef {Object} PayloadSchemaDetail
* @property {string} field_name
* @property {string} field_data_type
* @property {number} data_count
*/

/**
* @typedef {Object} VectorCollectionIndexOptions
* @property {string} field_name
* @property {string} field_schema_type
*/

export default {};
Loading