pika-shared 1.1.0 → 1.3.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.
@@ -1,6 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  // src/types/chatbot/chatbot-types.ts
4
+ var DEFAULT_MAX_MEMORY_RECORDS_PER_PROMPT = 25;
5
+ var DEFAULT_MAX_K_MATCHES_PER_STRATEGY = 5;
6
+ var DEFAULT_MEMORY_STRATEGIES = ["preferences", "semantic"];
7
+ var DEFAULT_EVENT_EXPIRY_DURATION = 7;
4
8
  var INSIGHT_STATUS_NEEDS_INSIGHTS_ANALYSIS = "NEEDS_INSIGHTS_ANALYSIS";
5
9
  var SESSION_FEEDBACK_STATUS = ["open", "in_review", "resolved", "closed"];
6
10
  var SESSION_FEEDBACK_STATUS_VALUES = [
@@ -165,6 +169,7 @@ var PikaUserRoles = [
165
169
  ];
166
170
  var FeatureTypeArr = ["instruction", "history"];
167
171
  var ClearConverseLambdaCacheTypes = ["agent", "tagDefinitions", "instructionAssistanceConfig", "all"];
172
+ var ConverseInvocationModes = ["chat-app", "direct-agent-invoke"];
168
173
  var SESSION_SEARCH_SORT_FIELDS = ["createDate", "lastUpdate", "sessionId", "inputTokens", "outputTokens", "totalCost", "insightGoalAchievementScore"];
169
174
  var SESSION_SEARCH_SORT_FIELDS_VALUES = [
170
175
  { name: "Create Date", value: "createDate" },
@@ -235,7 +240,9 @@ var FeatureIdList = [
235
240
  "sessionInsights",
236
241
  "userDataOverrides",
237
242
  "tags",
238
- "agentInstructionAssistance"
243
+ "agentInstructionAssistance",
244
+ "instructionAugmentation",
245
+ "userMemory"
239
246
  ];
240
247
  var EndToEndFeatureIdList = ["verifyResponse", "traces"];
241
248
  var FEATURE_NAMES = {
@@ -250,7 +257,9 @@ var FEATURE_NAMES = {
250
257
  sessionInsights: "Session Insights",
251
258
  userDataOverrides: "User Data Override",
252
259
  tags: "Tags",
253
- agentInstructionAssistance: "Agent Instruction Assistance"
260
+ agentInstructionAssistance: "Agent Instruction Assistance",
261
+ instructionAugmentation: "Instruction Augmentation",
262
+ userMemory: "User Memory"
254
263
  };
255
264
  var SiteAdminCommand = [
256
265
  "getAgent",
@@ -269,9 +278,17 @@ var SiteAdminCommand = [
269
278
  "createOrUpdateTagDefinition",
270
279
  "deleteTagDefinition",
271
280
  "searchTagDefinitions",
272
- "getInstructionAssistanceConfigFromSsm"
281
+ "searchSemanticDirectives",
282
+ "createOrUpdateSemanticDirective",
283
+ "deleteSemanticDirective",
284
+ "getInstructionAssistanceConfigFromSsm",
285
+ "getAllChatApps",
286
+ "getAllAgents",
287
+ "getAllTools",
288
+ "getAllMemoryRecords",
289
+ "getInstructionsAddedForUserMemory"
273
290
  ];
274
- var ClearSvelteKitCacheTypes = ["chatAppCache", "tagDefinitionsCache", "instructionAssistanceConfigCache", "all"];
291
+ var ClearSvelteKitCacheTypes = ["chatAppCache", "tagDefinitionsCache", "instructionAssistanceConfigCache", "encryptionKeysCache", "all"];
275
292
  var ContentAdminCommand = ["viewContentForUser", "stopViewingContentForUser", "getValuesForAutoComplete"];
276
293
  var UserOverrideDataCommand = ["getInitialDialogData", "getValuesForAutoComplete", "saveUserOverrideData", "clearUserOverrideData"];
277
294
  var Accurate = "A";
@@ -309,6 +326,19 @@ var VerifyResponseRetryableClassificationDescriptions = {
309
326
  },
310
327
  [Inaccurate]: { classification: Inaccurate, label: "Inaccurate", description: "The response is inaccurate or contains made up information" }
311
328
  };
329
+ var UserMemoryStrategies = ["preferences", "semantic", "summary"];
330
+ var InstructionAugmentationTypes = ["llm-semantic-directive-search"];
331
+ var InstructionAugmentationTypeDisplayNames = {
332
+ "llm-semantic-directive-search": "LLM Semantic Directive Search"
333
+ };
334
+ var InstructionAugmentationScopeTypes = ["chatapp", "agent", "tool", "entity", "agent-entity"];
335
+ var InstructionAugmentationScopeTypeDisplayNames = {
336
+ chatapp: "Chat App",
337
+ agent: "Agent",
338
+ tool: "Tool",
339
+ entity: "Entity",
340
+ "agent-entity": "Agent and Entity"
341
+ };
312
342
 
313
343
  exports.Accurate = Accurate;
314
344
  exports.AccurateWithStatedAssumptions = AccurateWithStatedAssumptions;
@@ -318,6 +348,11 @@ exports.ChatMessageFileUseCase = ChatMessageFileUseCase;
318
348
  exports.ClearConverseLambdaCacheTypes = ClearConverseLambdaCacheTypes;
319
349
  exports.ClearSvelteKitCacheTypes = ClearSvelteKitCacheTypes;
320
350
  exports.ContentAdminCommand = ContentAdminCommand;
351
+ exports.ConverseInvocationModes = ConverseInvocationModes;
352
+ exports.DEFAULT_EVENT_EXPIRY_DURATION = DEFAULT_EVENT_EXPIRY_DURATION;
353
+ exports.DEFAULT_MAX_K_MATCHES_PER_STRATEGY = DEFAULT_MAX_K_MATCHES_PER_STRATEGY;
354
+ exports.DEFAULT_MAX_MEMORY_RECORDS_PER_PROMPT = DEFAULT_MAX_MEMORY_RECORDS_PER_PROMPT;
355
+ exports.DEFAULT_MEMORY_STRATEGIES = DEFAULT_MEMORY_STRATEGIES;
321
356
  exports.EndToEndFeatureIdList = EndToEndFeatureIdList;
322
357
  exports.FEATURE_NAMES = FEATURE_NAMES;
323
358
  exports.FEEDBACK_INTERNAL_COMMENT_STATUS = FEEDBACK_INTERNAL_COMMENT_STATUS;
@@ -328,6 +363,10 @@ exports.FeatureIdList = FeatureIdList;
328
363
  exports.FeatureTypeArr = FeatureTypeArr;
329
364
  exports.INSIGHT_STATUS_NEEDS_INSIGHTS_ANALYSIS = INSIGHT_STATUS_NEEDS_INSIGHTS_ANALYSIS;
330
365
  exports.Inaccurate = Inaccurate;
366
+ exports.InstructionAugmentationScopeTypeDisplayNames = InstructionAugmentationScopeTypeDisplayNames;
367
+ exports.InstructionAugmentationScopeTypes = InstructionAugmentationScopeTypes;
368
+ exports.InstructionAugmentationTypeDisplayNames = InstructionAugmentationTypeDisplayNames;
369
+ exports.InstructionAugmentationTypes = InstructionAugmentationTypes;
331
370
  exports.MessageSource = MessageSource;
332
371
  exports.PikaUserRoles = PikaUserRoles;
333
372
  exports.RetryableVerifyResponseClassifications = RetryableVerifyResponseClassifications;
@@ -363,6 +402,7 @@ exports.SESSION_SEARCH_SORT_FIELDS_VALUES = SESSION_SEARCH_SORT_FIELDS_VALUES;
363
402
  exports.SiteAdminCommand = SiteAdminCommand;
364
403
  exports.UPDATEABLE_FEEDBACK_FIELDS = UPDATEABLE_FEEDBACK_FIELDS;
365
404
  exports.Unclassified = Unclassified;
405
+ exports.UserMemoryStrategies = UserMemoryStrategies;
366
406
  exports.UserOverrideDataCommand = UserOverrideDataCommand;
367
407
  exports.UserTypes = UserTypes;
368
408
  exports.VerifyResponseClassificationDescriptions = VerifyResponseClassificationDescriptions;