@nexo-labs/payload-typesense 1.7.4 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -99,7 +99,7 @@ interface TokenUsage {
99
99
  /**
100
100
  * Service types for spending tracking
101
101
  */
102
- type ServiceType = 'openai_embedding' | 'openai_llm';
102
+ type ServiceType = 'openai_embedding' | 'openai_llm' | 'gemini_embedding' | 'gemini_llm';
103
103
  /**
104
104
  * Spending entry for tracking AI service costs
105
105
  */
@@ -110,14 +110,21 @@ interface SpendingEntry {
110
110
  cost_usd?: number;
111
111
  timestamp: string;
112
112
  }
113
+ /**
114
+ * Error data structure for SSE events
115
+ */
116
+ interface SSEErrorData {
117
+ error: string;
118
+ message?: string;
119
+ chatId?: string;
120
+ [key: string]: unknown;
121
+ }
113
122
  /**
114
123
  * SSE event structure
115
124
  */
116
125
  interface SSEEvent {
117
126
  type: SSEEventType;
118
- data: string | ChunkSource[] | {
119
- error: string;
120
- } | UsageInfo;
127
+ data: string | ChunkSource[] | SSEErrorData | UsageInfo;
121
128
  }
122
129
  /**
123
130
  * Typesense search hit document (chunk-specific)
@@ -169,6 +176,8 @@ interface TypesenseQueryConfig {
169
176
  kResults?: number;
170
177
  /** Advanced search config */
171
178
  advancedConfig?: AdvancedSearchConfig;
179
+ /** Taxonomy slugs to filter RAG content */
180
+ taxonomySlugs?: string[];
172
181
  }
173
182
  /**
174
183
  * Embedding result with usage tracking
@@ -219,7 +228,7 @@ interface RAGCallbacks {
219
228
  reset_at?: string;
220
229
  }>;
221
230
  /** Save chat session function (optional) */
222
- saveChatSession?: (payload: Payload, userId: string | number, conversationId: string, userMessage: string, assistantMessage: string, sources: ChunkSource[], spending: SpendingEntry[], collectionName: CollectionSlug) => Promise<void>;
231
+ saveChatSession?: (payload: Payload, userId: string | number, conversationId: string, userMessage: string, assistantMessage: string, sources: ChunkSource[], spending: SpendingEntry[], collectionName: CollectionSlug, agentSlug?: string) => Promise<void>;
223
232
  /** Create embedding spending function (optional) */
224
233
  createEmbeddingSpending?: (model: string, tokens: number) => SpendingEntry;
225
234
  /** Estimate tokens from text function (optional) */
@@ -236,10 +245,14 @@ interface RAGConfig {
236
245
  /** Advanced search settings */
237
246
  advanced?: AdvancedSearchConfig;
238
247
  }
248
+ /**
249
+ * Function that retrieves agents dynamically (e.g. from DB)
250
+ */
251
+ type AgentProvider = (payload: Payload) => Promise<AgentConfig[]>;
239
252
  interface RAGFeatureConfig extends RAGConfig {
240
253
  enabled: boolean;
241
254
  callbacks?: RAGCallbacks;
242
- agents: AgentConfig[];
255
+ agents: AgentConfig[] | AgentProvider;
243
256
  }
244
257
  type TypesenseProtocol = "http" | "https";
245
258
  type TypesenseNode = {
@@ -264,7 +277,7 @@ type TypesenseConnectionConfig = {
264
277
  /**
265
278
  * Configuration for a single conversational agent
266
279
  */
267
- interface AgentConfig {
280
+ interface AgentConfig<SearchCollections extends readonly string[] = string[]> {
268
281
  /**
269
282
  * Unique identifier for the agent (used in API requests)
270
283
  */
@@ -273,12 +286,12 @@ interface AgentConfig {
273
286
  * Display name for the agent (shown in UI)
274
287
  * If not provided, slug will be used.
275
288
  */
276
- name?: string;
289
+ name: string;
277
290
  /**
278
291
  * Optional API Key for the LLM provider.
279
292
  * If provided, this overrides the global embedding provider API key for this agent.
280
293
  */
281
- apiKey?: string;
294
+ apiKey: string;
282
295
  /**
283
296
  * System prompt that defines the agent's personality and constraints
284
297
  */
@@ -290,7 +303,7 @@ interface AgentConfig {
290
303
  /**
291
304
  * Collections this agent is allowed to search in
292
305
  */
293
- searchCollections: string[];
306
+ searchCollections: SearchCollections[number][];
294
307
  /**
295
308
  * Maximum context size in bytes. Default: 65536 (64KB)
296
309
  */
@@ -299,19 +312,72 @@ interface AgentConfig {
299
312
  * TTL for conversation history in seconds. Default: 86400 (24h)
300
313
  */
301
314
  ttl?: number;
302
- /**
303
- * Name of the conversation history collection. Default: 'conversation_history'
304
- */
305
- historyCollection?: string;
306
315
  /**
307
316
  * Number of chunks to retrieve for RAG context. Default: 10
308
317
  */
309
318
  kResults?: number;
319
+ /**
320
+ * Welcome message title displayed when starting a new chat
321
+ */
322
+ welcomeTitle?: string;
323
+ /**
324
+ * Welcome message subtitle displayed when starting a new chat
325
+ */
326
+ welcomeSubtitle?: string;
327
+ /**
328
+ * Suggested questions displayed to help users get started
329
+ */
330
+ suggestedQuestions?: Array<{
331
+ /**
332
+ * The full prompt text to send when clicked
333
+ */
334
+ prompt: string;
335
+ /**
336
+ * Short title for the suggestion
337
+ */
338
+ title: string;
339
+ /**
340
+ * Brief description of what the question is about
341
+ */
342
+ description: string;
343
+ }>;
344
+ /**
345
+ * Avatar URL for the agent (displayed in chat header and floating button)
346
+ * If not provided, a default avatar will be used
347
+ */
348
+ avatar?: string;
349
+ /**
350
+ * Taxonomy slugs to filter RAG content.
351
+ * If empty/undefined, searches all content.
352
+ */
353
+ taxonomySlugs?: string[];
354
+ /**
355
+ * Maximum number of tokens the LLM can generate in responses.
356
+ * Default: 16000 (suitable for most use cases)
357
+ * Lower values save costs but may truncate responses.
358
+ * Higher values allow longer responses but cost more.
359
+ */
360
+ maxTokens?: number;
361
+ /**
362
+ * Temperature controls randomness in the model's output.
363
+ * Range: 0.0 to 2.0
364
+ * - Lower values (e.g., 0.3): More focused and deterministic
365
+ * - Higher values (e.g., 0.9): More creative and varied
366
+ * Default: 0.7
367
+ */
368
+ temperature?: number;
369
+ /**
370
+ * Top-p (nucleus sampling) controls diversity.
371
+ * Range: 0.0 to 1.0
372
+ * Default: 0.95
373
+ */
374
+ topP?: number;
310
375
  }
311
376
  //#endregion
312
377
  //#region src/plugin/rag-types.d.ts
313
378
  /**
314
379
  * Search feature configuration for the Typesense RAG plugin
380
+ * ...
315
381
  */
316
382
  interface TypesenseSearchConfig {
317
383
  /** Enable search endpoints */
@@ -328,12 +394,7 @@ interface TypesenseSearchConfig {
328
394
  }
329
395
  /**
330
396
  * Configuration for the Typesense RAG plugin
331
- *
332
- * This plugin handles all Typesense-specific functionality:
333
- * - Search endpoints
334
- * - RAG endpoints
335
- * - Schema synchronization
336
- * - Agent synchronization
397
+ * ...
337
398
  */
338
399
  interface TypesenseRAGPluginConfig<TSlug extends CollectionSlug> {
339
400
  /** Typesense connection configuration */
@@ -350,7 +411,7 @@ interface TypesenseRAGPluginConfig<TSlug extends CollectionSlug> {
350
411
  /** Search configuration */
351
412
  search?: TypesenseSearchConfig;
352
413
  /** RAG agent configurations */
353
- agents?: AgentConfig[];
414
+ agents?: AgentConfig[] | AgentProvider;
354
415
  /** Callback functions for permissions, session management, etc. */
355
416
  callbacks?: RAGCallbacks;
356
417
  /** Hybrid search configuration */
@@ -376,14 +437,14 @@ interface TypesenseRAGPluginConfig<TSlug extends CollectionSlug> {
376
437
  */
377
438
  declare function createTypesenseRAGPlugin<TConfig extends Config, TSlug extends CollectionSlug>(config: TypesenseRAGPluginConfig<TSlug>): (payloadConfig: TConfig) => TConfig;
378
439
  //#endregion
379
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Errors/TypesenseError.d.ts
440
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Errors/TypesenseError.d.ts
380
441
  declare class TypesenseError extends Error {
381
442
  httpStatus?: number;
382
443
  httpBody?: string;
383
444
  constructor(message?: string, httpBody?: string, httpStatus?: number);
384
445
  }
385
446
  //#endregion
386
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/ApiCall.d.ts
447
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/ApiCall.d.ts
387
448
  interface Node extends NodeConfiguration {
388
449
  isHealthy: boolean;
389
450
  index: string | number;
@@ -507,7 +568,7 @@ declare class ApiCall implements HttpClient {
507
568
  private invokeOnErrorCallback;
508
569
  }
509
570
  //#endregion
510
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Types.d.ts
571
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Types.d.ts
511
572
  type DropTokensMode = "right_to_left" | "left_to_right" | "both_sides:3";
512
573
  type OperationMode = "off" | "always" | "fallback";
513
574
  type CommaSeparated<T extends string, ToExtend, OriginalString extends string = T, Previous extends string[] = []> = T extends `${infer Start},${infer Rest}` ? TrimString<Start> extends ToExtend ? CommaSeparated<Rest, ToExtend, OriginalString, [...Previous, TrimString<Start>]> : {
@@ -676,7 +737,7 @@ type MultiSearchResultsParameters<T extends DocumentSchema[], Infix extends stri
676
737
  type Whitespace = " " | "\n" | "\t";
677
738
  type TrimString<S extends string> = S extends `${Whitespace}${infer S}` ? TrimString<S> : S extends `${infer S}${Whitespace}` ? TrimString<S> : S;
678
739
  //#endregion
679
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/RequestWithCache.d.ts
740
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/RequestWithCache.d.ts
680
741
  declare class RequestWithCache {
681
742
  private responseCache;
682
743
  private responsePromiseCache;
@@ -689,7 +750,7 @@ interface CacheOptions$1 {
689
750
  maxSize?: number;
690
751
  }
691
752
  //#endregion
692
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/SearchOnlyDocuments.d.ts
753
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/SearchOnlyDocuments.d.ts
693
754
  declare class SearchOnlyDocuments<T extends DocumentSchema> implements SearchableDocuments<T> {
694
755
  protected collectionName: string;
695
756
  protected apiCall: ApiCall;
@@ -705,7 +766,7 @@ declare class SearchOnlyDocuments<T extends DocumentSchema> implements Searchabl
705
766
  static get RESOURCEPATH(): string;
706
767
  }
707
768
  //#endregion
708
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Documents.d.ts
769
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Documents.d.ts
709
770
  type DeleteQuery = {
710
771
  truncate?: true;
711
772
  } | {
@@ -885,7 +946,7 @@ declare class Documents<T extends DocumentSchema = object> extends SearchOnlyDoc
885
946
  exportStream(options?: DocumentsExportParameters): Promise<ReadStream>;
886
947
  }
887
948
  //#endregion
888
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Configuration.d.ts
949
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Configuration.d.ts
889
950
  interface NodeConfiguration {
890
951
  host: string;
891
952
  port: number;
@@ -1025,7 +1086,7 @@ declare class Configuration {
1025
1086
  private shuffleArray;
1026
1087
  }
1027
1088
  //#endregion
1028
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Override.d.ts
1089
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Override.d.ts
1029
1090
  interface OverrideSchema extends OverrideCreateSchema {
1030
1091
  id: string;
1031
1092
  }
@@ -1042,7 +1103,7 @@ declare class Override {
1042
1103
  private endpointPath;
1043
1104
  }
1044
1105
  //#endregion
1045
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Overrides.d.ts
1106
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Overrides.d.ts
1046
1107
  interface OverrideRuleQuerySchema {
1047
1108
  query?: string;
1048
1109
  match?: "exact" | "contains";
@@ -1085,7 +1146,7 @@ declare class Overrides {
1085
1146
  static get RESOURCEPATH(): string;
1086
1147
  }
1087
1148
  //#endregion
1088
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Synonym.d.ts
1149
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Synonym.d.ts
1089
1150
  interface SynonymSchema extends SynonymCreateSchema {
1090
1151
  id: string;
1091
1152
  }
@@ -1102,7 +1163,7 @@ declare class Synonym {
1102
1163
  private endpointPath;
1103
1164
  }
1104
1165
  //#endregion
1105
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Synonyms.d.ts
1166
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Synonyms.d.ts
1106
1167
  interface SynonymCreateSchema {
1107
1168
  synonyms: string[];
1108
1169
  root?: string;
@@ -1122,7 +1183,7 @@ declare class Synonyms {
1122
1183
  static get RESOURCEPATH(): string;
1123
1184
  }
1124
1185
  //#endregion
1125
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Document.d.ts
1186
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Document.d.ts
1126
1187
  declare class Document<T extends DocumentSchema = object> {
1127
1188
  private collectionName;
1128
1189
  private documentId;
@@ -1134,7 +1195,7 @@ declare class Document<T extends DocumentSchema = object> {
1134
1195
  private endpointPath;
1135
1196
  }
1136
1197
  //#endregion
1137
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Collection.d.ts
1198
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Collection.d.ts
1138
1199
  type FieldType = "string" | "int32" | "int64" | "float" | "bool" | "geopoint" | "geopolygon" | "geopoint[]" | "string[]" | "int32[]" | "int64[]" | "float[]" | "bool[]" | "object" | "object[]" | "auto" | "string*" | "image";
1139
1200
  interface CollectionFieldSchema extends Partial<Pick<BaseCollectionCreateSchema, "token_separators" | "symbols_to_index">> {
1140
1201
  name: string;
@@ -1190,7 +1251,7 @@ declare class Collection<T extends DocumentSchema = object> {
1190
1251
  private endpointPath;
1191
1252
  }
1192
1253
  //#endregion
1193
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Collections.d.ts
1254
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Collections.d.ts
1194
1255
  interface BaseCollectionCreateSchema {
1195
1256
  name: string;
1196
1257
  default_sorting_field?: string;
@@ -1229,7 +1290,7 @@ declare class Collections {
1229
1290
  static get RESOURCEPATH(): string;
1230
1291
  }
1231
1292
  //#endregion
1232
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Aliases.d.ts
1293
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Aliases.d.ts
1233
1294
  interface CollectionAliasCreateSchema {
1234
1295
  collection_name: string;
1235
1296
  }
@@ -1248,7 +1309,7 @@ declare class Aliases {
1248
1309
  static get RESOURCEPATH(): string;
1249
1310
  }
1250
1311
  //#endregion
1251
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Alias.d.ts
1312
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Alias.d.ts
1252
1313
  declare class Alias {
1253
1314
  private name;
1254
1315
  private apiCall;
@@ -1258,7 +1319,7 @@ declare class Alias {
1258
1319
  private endpointPath;
1259
1320
  }
1260
1321
  //#endregion
1261
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Key.d.ts
1322
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Key.d.ts
1262
1323
  interface KeyCreateSchema {
1263
1324
  actions: Actions[] | (string & {})[];
1264
1325
  collections: string[];
@@ -1291,7 +1352,7 @@ declare class Key {
1291
1352
  private endpointPath;
1292
1353
  }
1293
1354
  //#endregion
1294
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Keys.d.ts
1355
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Keys.d.ts
1295
1356
  interface KeysRetrieveSchema {
1296
1357
  keys: KeySchema[];
1297
1358
  }
@@ -1309,7 +1370,7 @@ declare class Keys {
1309
1370
  static get RESOURCEPATH(): string;
1310
1371
  }
1311
1372
  //#endregion
1312
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Debug.d.ts
1373
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Debug.d.ts
1313
1374
  interface DebugResponseSchema {
1314
1375
  state: number;
1315
1376
  version: string;
@@ -1320,7 +1381,7 @@ declare class Debug {
1320
1381
  retrieve(): Promise<DebugResponseSchema>;
1321
1382
  }
1322
1383
  //#endregion
1323
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Metrics.d.ts
1384
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Metrics.d.ts
1324
1385
  interface MetricsResponse {
1325
1386
  [key: `system_cpu${number}_active_percentage`]: string;
1326
1387
  system_cpu_active_percentage: string;
@@ -1346,7 +1407,7 @@ declare class Metrics {
1346
1407
  retrieve(): Promise<MetricsResponse>;
1347
1408
  }
1348
1409
  //#endregion
1349
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Stats.d.ts
1410
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Stats.d.ts
1350
1411
  interface EndpointStats {
1351
1412
  [endpoint: string]: number;
1352
1413
  }
@@ -1371,7 +1432,7 @@ declare class Metrics$1 {
1371
1432
  retrieve(): Promise<StatsResponse>;
1372
1433
  }
1373
1434
  //#endregion
1374
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Health.d.ts
1435
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Health.d.ts
1375
1436
  interface HealthResponse {
1376
1437
  ok: boolean;
1377
1438
  }
@@ -1381,14 +1442,14 @@ declare class Health {
1381
1442
  retrieve(): Promise<HealthResponse>;
1382
1443
  }
1383
1444
  //#endregion
1384
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Operations.d.ts
1445
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Operations.d.ts
1385
1446
  declare class Operations {
1386
1447
  private apiCall;
1387
1448
  constructor(apiCall: ApiCall);
1388
1449
  perform(operationName: "vote" | "snapshot" | "cache/clear" | "schema_changes" | (string & {}), queryParameters?: Record<string, any>): Promise<any>;
1389
1450
  }
1390
1451
  //#endregion
1391
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/MultiSearch.d.ts
1452
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/MultiSearch.d.ts
1392
1453
  declare class MultiSearch {
1393
1454
  private apiCall;
1394
1455
  private configuration;
@@ -1405,7 +1466,7 @@ declare class MultiSearch {
1405
1466
  private isStreamingRequest;
1406
1467
  }
1407
1468
  //#endregion
1408
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Preset.d.ts
1469
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Preset.d.ts
1409
1470
  interface PresetSchema<T extends DocumentSchema> extends PresetCreateSchema<T, string> {
1410
1471
  name: string;
1411
1472
  }
@@ -1421,7 +1482,7 @@ declare class Preset {
1421
1482
  private endpointPath;
1422
1483
  }
1423
1484
  //#endregion
1424
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Presets.d.ts
1485
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Presets.d.ts
1425
1486
  interface PresetCreateSchema<T extends DocumentSchema, Infix extends string> {
1426
1487
  value: SearchParams$1<T, Infix> | MultiSearchRequestsSchema<T, Infix>;
1427
1488
  }
@@ -1437,7 +1498,7 @@ declare class Presets {
1437
1498
  static get RESOURCEPATH(): string;
1438
1499
  }
1439
1500
  //#endregion
1440
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/AnalyticsRule.d.ts
1501
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/AnalyticsRule.d.ts
1441
1502
  interface AnalyticsRuleCreateSchema {
1442
1503
  type: "popular_queries" | "nohits_queries" | "counter" | "log";
1443
1504
  params: {
@@ -1473,7 +1534,7 @@ declare class AnalyticsRule {
1473
1534
  private endpointPath;
1474
1535
  }
1475
1536
  //#endregion
1476
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/AnalyticsRules.d.ts
1537
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/AnalyticsRules.d.ts
1477
1538
  interface AnalyticsRulesRetrieveSchema {
1478
1539
  rules: AnalyticsRuleSchema[];
1479
1540
  }
@@ -1486,14 +1547,14 @@ declare class AnalyticsRules {
1486
1547
  static get RESOURCEPATH(): string;
1487
1548
  }
1488
1549
  //#endregion
1489
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/AnalyticsEvent.d.ts
1550
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/AnalyticsEvent.d.ts
1490
1551
  interface AnalyticsEventCreateSchema {
1491
1552
  type: string;
1492
1553
  name: string;
1493
1554
  data: Record<string, unknown>;
1494
1555
  }
1495
1556
  //#endregion
1496
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/AnalyticsEvents.d.ts
1557
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/AnalyticsEvents.d.ts
1497
1558
  declare class AnalyticsEvents {
1498
1559
  private readonly apiCall;
1499
1560
  constructor(apiCall: ApiCall);
@@ -1502,7 +1563,7 @@ declare class AnalyticsEvents {
1502
1563
  static get RESOURCEPATH(): string;
1503
1564
  }
1504
1565
  //#endregion
1505
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Analytics.d.ts
1566
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Analytics.d.ts
1506
1567
  declare class Analytics {
1507
1568
  private readonly apiCall;
1508
1569
  private readonly _analyticsRules;
@@ -1515,7 +1576,7 @@ declare class Analytics {
1515
1576
  static get RESOURCEPATH(): string;
1516
1577
  }
1517
1578
  //#endregion
1518
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Stopword.d.ts
1579
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Stopword.d.ts
1519
1580
  interface StopwordSchema {
1520
1581
  id: string;
1521
1582
  stopwords: string[] | {
@@ -1536,7 +1597,7 @@ declare class Stopword {
1536
1597
  private endpointPath;
1537
1598
  }
1538
1599
  //#endregion
1539
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Stopwords.d.ts
1600
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Stopwords.d.ts
1540
1601
  interface StopwordCreateSchema {
1541
1602
  stopwords: string[];
1542
1603
  locale?: string;
@@ -1553,7 +1614,7 @@ declare class Stopwords {
1553
1614
  static get RESOURCEPATH(): string;
1554
1615
  }
1555
1616
  //#endregion
1556
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/ConversationModel.d.ts
1617
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/ConversationModel.d.ts
1557
1618
  interface ConversationModelCreateSchema {
1558
1619
  id?: string;
1559
1620
  model_name: string;
@@ -1584,7 +1645,7 @@ declare class ConversationModel {
1584
1645
  private endpointPath;
1585
1646
  }
1586
1647
  //#endregion
1587
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/ConversationModels.d.ts
1648
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/ConversationModels.d.ts
1588
1649
  declare class ConversationModels {
1589
1650
  private readonly apiCall;
1590
1651
  constructor(apiCall: ApiCall);
@@ -1594,7 +1655,7 @@ declare class ConversationModels {
1594
1655
  static get RESOURCEPATH(): string;
1595
1656
  }
1596
1657
  //#endregion
1597
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Conversation.d.ts
1658
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Conversation.d.ts
1598
1659
  interface ConversationDeleteSchema {
1599
1660
  id: number;
1600
1661
  }
@@ -1617,7 +1678,7 @@ declare class Conversation {
1617
1678
  private endpointPath;
1618
1679
  }
1619
1680
  //#endregion
1620
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Conversations.d.ts
1681
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Conversations.d.ts
1621
1682
  interface ConversationsRetrieveSchema {
1622
1683
  conversations: ConversationSchema[];
1623
1684
  }
@@ -1632,7 +1693,7 @@ declare class Conversations {
1632
1693
  static get RESOURCEPATH(): string;
1633
1694
  }
1634
1695
  //#endregion
1635
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/StemmingDictionary.d.ts
1696
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/StemmingDictionary.d.ts
1636
1697
  interface StemmingDictionaryCreateSchema {
1637
1698
  root: string;
1638
1699
  word: string;
@@ -1649,7 +1710,7 @@ declare class StemmingDictionary {
1649
1710
  private endpointPath;
1650
1711
  }
1651
1712
  //#endregion
1652
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/StemmingDictionaries.d.ts
1713
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/StemmingDictionaries.d.ts
1653
1714
  interface StemmingDictionariesRetrieveSchema {
1654
1715
  dictionaries: string[];
1655
1716
  }
@@ -1662,7 +1723,7 @@ declare class StemmingDictionaries {
1662
1723
  static get RESOURCEPATH(): string;
1663
1724
  }
1664
1725
  //#endregion
1665
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Stemming.d.ts
1726
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Stemming.d.ts
1666
1727
  declare class Stemming {
1667
1728
  private readonly apiCall;
1668
1729
  private readonly _stemmingDictionaries;
@@ -1673,7 +1734,7 @@ declare class Stemming {
1673
1734
  static get RESOURCEPATH(): string;
1674
1735
  }
1675
1736
  //#endregion
1676
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/NLSearchModels.d.ts
1737
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/NLSearchModels.d.ts
1677
1738
  interface NLSearchModelBase {
1678
1739
  model_name: string;
1679
1740
  api_key?: string;
@@ -1710,7 +1771,7 @@ declare class NLSearchModels {
1710
1771
  static get RESOURCEPATH(): string;
1711
1772
  }
1712
1773
  //#endregion
1713
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/NLSearchModel.d.ts
1774
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/NLSearchModel.d.ts
1714
1775
  type NLSearchModelUpdateSchema = NLSearchModelBase;
1715
1776
  interface NLSearchModelDeleteSchema {
1716
1777
  id: string;
@@ -1725,7 +1786,7 @@ declare class NLSearchModel {
1725
1786
  private endpointPath;
1726
1787
  }
1727
1788
  //#endregion
1728
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Client.d.ts
1789
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Client.d.ts
1729
1790
  declare class Client {
1730
1791
  configuration: Configuration;
1731
1792
  apiCall: ApiCall;
@@ -1768,7 +1829,7 @@ declare class Client {
1768
1829
  nlSearchModels(id: string): NLSearchModel;
1769
1830
  }
1770
1831
  //#endregion
1771
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/SearchOnlyCollection.d.ts
1832
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/SearchOnlyCollection.d.ts
1772
1833
  declare class SearchOnlyCollection<T extends DocumentSchema> {
1773
1834
  private readonly name;
1774
1835
  private readonly apiCall;
@@ -1778,7 +1839,7 @@ declare class SearchOnlyCollection<T extends DocumentSchema> {
1778
1839
  documents(): SearchableDocuments<T>;
1779
1840
  }
1780
1841
  //#endregion
1781
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/SearchClient.d.ts
1842
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/SearchClient.d.ts
1782
1843
  declare class SearchClient {
1783
1844
  readonly multiSearch: MultiSearch;
1784
1845
  private readonly configuration;
@@ -1789,31 +1850,31 @@ declare class SearchClient {
1789
1850
  collections<TDocumentSchema extends DocumentSchema>(collectionName: string): SearchOnlyCollection<TDocumentSchema>;
1790
1851
  }
1791
1852
  //#endregion
1792
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Errors/HTTPError.d.ts
1853
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Errors/HTTPError.d.ts
1793
1854
  declare class HTTPError extends TypesenseError {}
1794
1855
  //#endregion
1795
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.d.ts
1856
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Errors/MissingConfigurationError.d.ts
1796
1857
  declare class MissingConfigurationError extends TypesenseError {}
1797
1858
  //#endregion
1798
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.d.ts
1859
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Errors/ObjectAlreadyExists.d.ts
1799
1860
  declare class ObjectAlreadyExists extends TypesenseError {}
1800
1861
  //#endregion
1801
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.d.ts
1862
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Errors/ObjectNotFound.d.ts
1802
1863
  declare class ObjectNotFound extends TypesenseError {}
1803
1864
  //#endregion
1804
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.d.ts
1865
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Errors/ObjectUnprocessable.d.ts
1805
1866
  declare class ObjectUnprocessable extends TypesenseError {}
1806
1867
  //#endregion
1807
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Errors/RequestMalformed.d.ts
1868
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Errors/RequestMalformed.d.ts
1808
1869
  declare class RequestMalformed extends TypesenseError {}
1809
1870
  //#endregion
1810
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.d.ts
1871
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Errors/RequestUnauthorized.d.ts
1811
1872
  declare class RequestUnauthorized extends TypesenseError {}
1812
1873
  //#endregion
1813
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Errors/ServerError.d.ts
1874
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Errors/ServerError.d.ts
1814
1875
  declare class ServerError extends TypesenseError {}
1815
1876
  //#endregion
1816
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense/Errors/ImportError.d.ts
1877
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense/Errors/ImportError.d.ts
1817
1878
  interface ImportErrorPayload {
1818
1879
  documentsInJSONLFormat: string | ReadStream$1;
1819
1880
  options: DocumentImportParameters;
@@ -1829,7 +1890,7 @@ declare namespace index_d_exports {
1829
1890
  export { HTTPError, ImportError, MissingConfigurationError, ObjectAlreadyExists, ObjectNotFound, ObjectUnprocessable, RequestMalformed, RequestUnauthorized, ServerError, TypesenseError };
1830
1891
  }
1831
1892
  //#endregion
1832
- //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.4/node_modules/typesense/lib/Typesense.d.ts
1893
+ //#region ../../node_modules/.pnpm/typesense@2.1.0_@babel+runtime@7.28.6/node_modules/typesense/lib/Typesense.d.ts
1833
1894
  declare const _default: {
1834
1895
  Client: typeof Client;
1835
1896
  SearchClient: typeof SearchClient;
@@ -2381,6 +2442,8 @@ type RAGSearchConfig = {
2381
2442
  prefix?: boolean;
2382
2443
  dropTokensThreshold?: number;
2383
2444
  };
2445
+ /** Taxonomy slugs to filter RAG content */
2446
+ taxonomySlugs?: string[];
2384
2447
  };
2385
2448
  /**
2386
2449
  * Request parameters for RAG chat
@@ -2555,8 +2618,9 @@ interface ChatMessageWithSources {
2555
2618
  * @param sources - Source chunks used for the response
2556
2619
  * @param spending - Token spending entries
2557
2620
  * @param collectionName - Collection name for sessions (default: 'chat-sessions')
2621
+ * @param agentSlug - Slug of the agent used in this conversation (optional)
2558
2622
  */
2559
- declare function saveChatSession(payload: Payload, userId: string | number, conversationId: string, userMessage: string, assistantMessage: string, sources: ChunkSource[], spending: SpendingEntry[], collectionName: CollectionSlug): Promise<void>;
2623
+ declare function saveChatSession(payload: Payload, userId: string | number, conversationId: string, userMessage: string, assistantMessage: string, sources: ChunkSource[], spending: SpendingEntry[], collectionName: CollectionSlug, agentSlug?: string): Promise<void>;
2560
2624
  //#endregion
2561
2625
  //#region src/features/rag/endpoints/types.d.ts
2562
2626
  /**
@@ -2644,6 +2708,10 @@ declare function createRAGPayloadHandlers<TSlug extends CollectionSlug>(config:
2644
2708
  }>;
2645
2709
  //#endregion
2646
2710
  //#region src/core/config/constants.d.ts
2711
+ /**
2712
+ * Constants for payload-typesense plugin
2713
+ * Centralizes all magic numbers and configuration defaults
2714
+ */
2647
2715
  /**
2648
2716
  * Default alpha value for hybrid search (0 = pure semantic, 1 = pure keyword)
2649
2717
  */
@@ -2673,5 +2741,5 @@ declare const DEFAULT_SESSION_TTL_SEC: number;
2673
2741
  */
2674
2742
  declare const DEFAULT_RAG_LLM_MODEL = "gpt-4o-mini";
2675
2743
  //#endregion
2676
- export { type ApiContext, type ApiResponse, type AuthenticateMethod, type BaseDocument, type BaseSearchInputProps, type CacheEntry, type CacheOptions, type ChatMessageWithSources, type ChatSessionData, type ChunkFetchConfig, type ChunkFetchResult, type ConversationEvent, DEFAULT_CACHE_TTL_MS, DEFAULT_HYBRID_SEARCH_ALPHA, DEFAULT_RAG_CONTEXT_LIMIT, DEFAULT_RAG_LLM_MODEL, DEFAULT_RAG_MAX_TOKENS, DEFAULT_SEARCH_LIMIT, DEFAULT_SESSION_TTL_SEC, type ErrorResponse, type HealthCheckResponse, type ModularPluginConfig, type PayloadDocument, type RAGChatRequest, type RAGSearchConfig, type RAGSearchResult, type SearchFeatureConfig, type SearchParams, type SearchResponse, type SearchResult, type SessionConfig, type StreamProcessingResult, type SuggestResponse, type SuggestResult, type SyncFeatureConfig, TypesenseAdapter, type TypesenseChunkDocument, type TypesenseConnectionConfig, type TypesenseDocument, type TypesenseFieldMapping, type TypesenseFieldType, type TypesenseRAGPluginConfig, type TypesenseSearchConfig, buildContextText, buildConversationalUrl, buildHybridSearchParams, buildMultiSearchRequestBody, buildMultiSearchRequests, closeSession, createRAGPayloadHandlers, createSSEForwardStream, createSearchEndpoints, createTypesenseAdapter, createTypesenseAdapterFromClient, createTypesenseClient, createTypesenseRAGPlugin, deleteDocumentFromTypesense, ensureConversationCollection, executeRAGSearch, extractSourcesFromResults, fetchChunkById, formatSSEEvent, generateEmbedding, generateEmbeddingWithUsage, generateEmbeddingsBatchWithUsage, getActiveSession, getDefaultRAGConfig, getSessionByConversationId, jsonResponse, mergeRAGConfigWithDefaults, parseConversationEvent, processConversationStream, saveChatSession, sendSSEEvent, testTypesenseConnection };
2744
+ export { type AgentConfig, type AgentProvider, type ApiContext, type ApiResponse, type AuthenticateMethod, type BaseDocument, type BaseSearchInputProps, type CacheEntry, type CacheOptions, type ChatMessageWithSources, type ChatSessionData, type ChunkFetchConfig, type ChunkFetchResult, type ConversationEvent, DEFAULT_CACHE_TTL_MS, DEFAULT_HYBRID_SEARCH_ALPHA, DEFAULT_RAG_CONTEXT_LIMIT, DEFAULT_RAG_LLM_MODEL, DEFAULT_RAG_MAX_TOKENS, DEFAULT_SEARCH_LIMIT, DEFAULT_SESSION_TTL_SEC, type ErrorResponse, type HealthCheckResponse, type ModularPluginConfig, type PayloadDocument, type RAGChatRequest, type RAGSearchConfig, type RAGSearchResult, type SearchFeatureConfig, type SearchParams, type SearchResponse, type SearchResult, type SessionConfig, type StreamProcessingResult, type SuggestResponse, type SuggestResult, type SyncFeatureConfig, TypesenseAdapter, type TypesenseChunkDocument, type TypesenseConnectionConfig, type TypesenseDocument, type TypesenseFieldMapping, type TypesenseFieldType, type TypesenseRAGPluginConfig, type TypesenseSearchConfig, buildContextText, buildConversationalUrl, buildHybridSearchParams, buildMultiSearchRequestBody, buildMultiSearchRequests, closeSession, createRAGPayloadHandlers, createSSEForwardStream, createSearchEndpoints, createTypesenseAdapter, createTypesenseAdapterFromClient, createTypesenseClient, createTypesenseRAGPlugin, deleteDocumentFromTypesense, ensureConversationCollection, executeRAGSearch, extractSourcesFromResults, fetchChunkById, formatSSEEvent, generateEmbedding, generateEmbeddingWithUsage, generateEmbeddingsBatchWithUsage, getActiveSession, getDefaultRAGConfig, getSessionByConversationId, jsonResponse, mergeRAGConfigWithDefaults, parseConversationEvent, processConversationStream, saveChatSession, sendSSEEvent, testTypesenseConnection };
2677
2745
  //# sourceMappingURL=index.d.mts.map