@squiz/dxp-ai-client
Advanced tools
Comparing version
# @squiz/dxp-ai-client | ||
## 1.1.0 | ||
### Minor Changes | ||
- e2aefa4: Add reference links to chatbot responses. | ||
## 1.0.0 | ||
@@ -4,0 +10,0 @@ |
@@ -56,3 +56,3 @@ export type AiAuthType = 'none' | 'dxp'; | ||
finishedAt: string | null; | ||
outputs: RecordString40ActionFlowsGetExecutionOutputsActionEnumDatumReference58Path63StringOrStringArrayReferenceIdStringTypeFlowsGetExecutionOutputsTypeEnum1ExperienceIdStringTypeFlowsGetExecutionOutputsTypeEnumValueStringOrNumberOrBooleanOrFlowsGetExecutionOutputsValueEnumOrRecordStringStringOrNumberOrBooleanOrFlowsGetExecutionOutputsValueEnum1OrFlowsGetExecutionOutputsValueEnum2OrActionFlowsGetExecutionOutputsActionEnum1DatumReference58Path63StringOrStringArrayReferenceIdStringTypeFlowsGetExecutionOutputsTypeEnum3EntityIdStringOrNullExperienceIdStringSchemaIdStringTypeFlowsGetExecutionOutputsTypeEnum2OrActionFlowsGetExecutionOutputsActionEnum2To58TypeFlowsGetExecutionOutputsTypeEnum5UrlStringOrPathStringTypeFlowsGetExecutionOutputsTypeEnum6OrDatumInputs63RecordStringStringOrNumberOrBooleanOrFlowsGetExecutionOutputsDatumInputsEnumOrRecordStringStringOrNumberOrBooleanOrFlowsGetExecutionOutputsDatumInputsEnum1OrFlowsGetExecutionOutputsDatumInputsEnum2ExperienceIdStringExperiencePathStringSpaceIdStringTypeFlowsGetExecutionOutputsTypeEnum7OrEntityId63StringOrNullSchemaIdStringSpaceIdStringTypeFlowsGetExecutionOutputsTypeEnum8TypeFlowsGetExecutionOutputsTypeEnum441Or40FlowsGetExecutionOutputsOutputsEnumOrAnyOrStringOrNumberOrBooleanOrAllowedBlocks63FlowsGetExecutionOutputsAllowedBlocksEnumArrayAllowedMarks63FlowsGetExecutionOutputsAllowedMarksEnumArrayDescription63StringOrNullHoveringToolbar63BooleanNameStringOrderNumberRequired63BooleanOrNullShowInTable63BooleanOrNullTypeFlowsGetExecutionOutputsTypeEnum9OrAnyArrayOrRecordStringAny41; | ||
outputs: RecordString40ActionFlowsGetExecutionOutputsActionEnumDatumReference58Path63StringOrStringArrayReferenceIdStringTypeFlowsGetExecutionOutputsTypeEnum1ExperienceIdStringTypeFlowsGetExecutionOutputsTypeEnumValueStringOrNumberOrBooleanOrFlowsGetExecutionOutputsValueEnumOrRecordStringStringOrNumberOrBooleanOrFlowsGetExecutionOutputsValueEnum1Or40StringOrNumberOrBooleanOrFlowsGetExecutionOutputsValueEnum241ArrayOrFlowsGetExecutionOutputsValueEnum3OrActionFlowsGetExecutionOutputsActionEnum1DatumReference58Path63StringOrStringArrayReferenceIdStringTypeFlowsGetExecutionOutputsTypeEnum3EntityIdStringOrNullExperienceIdStringSchemaIdStringTypeFlowsGetExecutionOutputsTypeEnum2OrActionFlowsGetExecutionOutputsActionEnum2To58TypeFlowsGetExecutionOutputsTypeEnum5UrlStringOrPathStringTypeFlowsGetExecutionOutputsTypeEnum6OrDatumInputs63RecordStringStringOrNumberOrBooleanOrFlowsGetExecutionOutputsDatumInputsEnumOrRecordStringStringOrNumberOrBooleanOrFlowsGetExecutionOutputsDatumInputsEnum1Or40StringOrNumberOrBooleanOrFlowsGetExecutionOutputsDatumInputsEnum241ArrayOrFlowsGetExecutionOutputsDatumInputsEnum3ExperienceIdStringExperiencePathStringSpaceIdStringTypeFlowsGetExecutionOutputsTypeEnum7OrEntityId63StringOrNullSchemaIdStringSpaceIdStringTypeFlowsGetExecutionOutputsTypeEnum8TypeFlowsGetExecutionOutputsTypeEnum441Or40FlowsGetExecutionOutputsOutputsEnumOrAnyOrStringOrNumberOrBooleanOrAllowedBlocks63FlowsGetExecutionOutputsAllowedBlocksEnumArrayAllowedMarks63FlowsGetExecutionOutputsAllowedMarksEnumArrayDescription63StringOrNullHoveringToolbar63BooleanNameStringOrder63NumberPlaceholder63StringRequired63BooleanOrNullShowInTable63BooleanOrNullTypeFlowsGetExecutionOutputsTypeEnum9OrAnyArrayOrRecordStringAnyOrRecordStringAny41; | ||
startedAt: string | null; | ||
@@ -223,5 +223,10 @@ status: FlowsGetExecutionOutputsStatusEnum; | ||
query: string; | ||
references: MessageReference[]; | ||
response: string | null; | ||
updatedAt?: string | null; | ||
} | ||
export interface MessageReference { | ||
title: string; | ||
url: string; | ||
} | ||
export type OmitAiTenantOrMetadata = PickAiExcludeKeysTenantOrMetadata; | ||
@@ -407,3 +412,3 @@ export type OmitCrawlerLastCrawledAtOrScheduleArn = PickCrawlerExcludeKeysLastCrawledAtOrScheduleArn; | ||
} | ||
export type RecordString40ActionFlowsGetExecutionOutputsActionEnumDatumReference58Path63StringOrStringArrayReferenceIdStringTypeFlowsGetExecutionOutputsTypeEnum1ExperienceIdStringTypeFlowsGetExecutionOutputsTypeEnumValueStringOrNumberOrBooleanOrFlowsGetExecutionOutputsValueEnumOrRecordStringStringOrNumberOrBooleanOrFlowsGetExecutionOutputsValueEnum1OrFlowsGetExecutionOutputsValueEnum2OrActionFlowsGetExecutionOutputsActionEnum1DatumReference58Path63StringOrStringArrayReferenceIdStringTypeFlowsGetExecutionOutputsTypeEnum3EntityIdStringOrNullExperienceIdStringSchemaIdStringTypeFlowsGetExecutionOutputsTypeEnum2OrActionFlowsGetExecutionOutputsActionEnum2To58TypeFlowsGetExecutionOutputsTypeEnum5UrlStringOrPathStringTypeFlowsGetExecutionOutputsTypeEnum6OrDatumInputs63RecordStringStringOrNumberOrBooleanOrFlowsGetExecutionOutputsDatumInputsEnumOrRecordStringStringOrNumberOrBooleanOrFlowsGetExecutionOutputsDatumInputsEnum1OrFlowsGetExecutionOutputsDatumInputsEnum2ExperienceIdStringExperiencePathStringSpaceIdStringTypeFlowsGetExecutionOutputsTypeEnum7OrEntityId63StringOrNullSchemaIdStringSpaceIdStringTypeFlowsGetExecutionOutputsTypeEnum8TypeFlowsGetExecutionOutputsTypeEnum441Or40FlowsGetExecutionOutputsOutputsEnumOrAnyOrStringOrNumberOrBooleanOrAllowedBlocks63FlowsGetExecutionOutputsAllowedBlocksEnumArrayAllowedMarks63FlowsGetExecutionOutputsAllowedMarksEnumArrayDescription63StringOrNullHoveringToolbar63BooleanNameStringOrderNumberRequired63BooleanOrNullShowInTable63BooleanOrNullTypeFlowsGetExecutionOutputsTypeEnum9OrAnyArrayOrRecordStringAny41 = { | ||
export type RecordString40ActionFlowsGetExecutionOutputsActionEnumDatumReference58Path63StringOrStringArrayReferenceIdStringTypeFlowsGetExecutionOutputsTypeEnum1ExperienceIdStringTypeFlowsGetExecutionOutputsTypeEnumValueStringOrNumberOrBooleanOrFlowsGetExecutionOutputsValueEnumOrRecordStringStringOrNumberOrBooleanOrFlowsGetExecutionOutputsValueEnum1Or40StringOrNumberOrBooleanOrFlowsGetExecutionOutputsValueEnum241ArrayOrFlowsGetExecutionOutputsValueEnum3OrActionFlowsGetExecutionOutputsActionEnum1DatumReference58Path63StringOrStringArrayReferenceIdStringTypeFlowsGetExecutionOutputsTypeEnum3EntityIdStringOrNullExperienceIdStringSchemaIdStringTypeFlowsGetExecutionOutputsTypeEnum2OrActionFlowsGetExecutionOutputsActionEnum2To58TypeFlowsGetExecutionOutputsTypeEnum5UrlStringOrPathStringTypeFlowsGetExecutionOutputsTypeEnum6OrDatumInputs63RecordStringStringOrNumberOrBooleanOrFlowsGetExecutionOutputsDatumInputsEnumOrRecordStringStringOrNumberOrBooleanOrFlowsGetExecutionOutputsDatumInputsEnum1Or40StringOrNumberOrBooleanOrFlowsGetExecutionOutputsDatumInputsEnum241ArrayOrFlowsGetExecutionOutputsDatumInputsEnum3ExperienceIdStringExperiencePathStringSpaceIdStringTypeFlowsGetExecutionOutputsTypeEnum7OrEntityId63StringOrNullSchemaIdStringSpaceIdStringTypeFlowsGetExecutionOutputsTypeEnum8TypeFlowsGetExecutionOutputsTypeEnum441Or40FlowsGetExecutionOutputsOutputsEnumOrAnyOrStringOrNumberOrBooleanOrAllowedBlocks63FlowsGetExecutionOutputsAllowedBlocksEnumArrayAllowedMarks63FlowsGetExecutionOutputsAllowedMarksEnumArrayDescription63StringOrNullHoveringToolbar63BooleanNameStringOrder63NumberPlaceholder63StringRequired63BooleanOrNullShowInTable63BooleanOrNullTypeFlowsGetExecutionOutputsTypeEnum9OrAnyArrayOrRecordStringAnyOrRecordStringAny41 = { | ||
[key: string]: any; | ||
@@ -410,0 +415,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
import { ChatbotCommand } from '../../generated/DxpAiService'; | ||
import { ChatbotCommand, Thread, Message } from '../../generated/DxpAiService'; | ||
type ProcessChatMessageCommandInput = { | ||
@@ -8,9 +8,4 @@ query: string; | ||
type ProcessChatMessageCommandOutput = { | ||
thread: { | ||
id: string; | ||
}; | ||
message: { | ||
query: string; | ||
response: string; | ||
}; | ||
thread: Pick<Thread, 'id'>; | ||
message: Pick<Message, 'query' | 'response' | 'references'>; | ||
}; | ||
@@ -17,0 +12,0 @@ export type ChatBotCommandInputs<T extends ChatbotCommand> = T extends 'processChatMessage' ? ProcessChatMessageCommandInput : never; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ2hhdEJvdENvbW1hbmRFeGVjdXRvci50eXBlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy91dGlscy9Db21tYW5kRXhlY3V0b3IvQ2hhdEJvdENvbW1hbmRFeGVjdXRvci50eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ2hhdGJvdENvbW1hbmQgfSBmcm9tICcuLi8uLi9nZW5lcmF0ZWQvRHhwQWlTZXJ2aWNlJztcblxudHlwZSBQcm9jZXNzQ2hhdE1lc3NhZ2VDb21tYW5kSW5wdXQgPSB7XG4gIHF1ZXJ5OiBzdHJpbmc7XG4gIGlzUHJldmlldz86IGJvb2xlYW47XG4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tcbiAgcXVlcnk6IHN0cmluZztcbiAgaXNQcmV2aWV3PzogYm9vbGVhbjtcbiAgdGhyZWFkSWQ/OiBzdHJpbmc7XG59O1xuXG50eXBlIFByb2Nlc3NDaGF0TWVzc2FnZUNvbW1hbmRPdXRwdXQgPSB7XG4gIHRocmVhZDogUGljazxUaHJlYWQsICdpZCc+O1xuICBtZXNzYWdlOiBQaWNrPE1lc3NhZ2UsICdxdWVyeScgfCAncmVzcG9uc2UnIHwgJ3JlZmVyZW5jZXMnPjtcbn07XG5cbmV4cG9ydCB0eXBlIENoYXRCb3RDb21tYW5kSW5wdXRzPFQgZXh0ZW5kcyBDaGF0Ym90Q29tbWFuZD4gPSBUIGV4dGVuZHMgJ3Byb2Nlc3NDaGF0TWVzc2FnZSdcbiAgPyBQcm9jZXNzQ2hhdE1lc3NhZ2VDb21tYW5kSW5wdXRcbiAgOiBuZXZlcjtcblxuZXhwb3J0IHR5cGUgQ2hhdEJvdENvbW1hbmRPdXRwdXRzPFQgZXh0ZW5kcyBDaGF0Ym90Q29tbWFuZD4gPSBUIGV4dGVuZHMgJ3Byb2Nlc3NDaGF0TWVzc2FnZSdcbiAgPyBQcm9jZXNzQ2hhdE1lc3NhZ2VDb21tYW5kT3V0cHV0XG4gIDogbmV2ZXI7XG4iXX0= |
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Exposes the DXP AI service as a package for consumers", | ||
@@ -21,3 +21,3 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@squiz/ai-service": "1.34.1", | ||
"@squiz/ai-service": "1.35.0", | ||
"jest": "^29.7.0", | ||
@@ -24,0 +24,0 @@ "swagger-typescript-api": "^13.0.22", |
@@ -1,2 +0,2 @@ | ||
import { ChatbotCommand } from '../../generated/DxpAiService'; | ||
import { ChatbotCommand, Thread, Message } from '../../generated/DxpAiService'; | ||
@@ -10,9 +10,4 @@ type ProcessChatMessageCommandInput = { | ||
type ProcessChatMessageCommandOutput = { | ||
thread: { | ||
id: string; | ||
}; | ||
message: { | ||
query: string; | ||
response: string; | ||
}; | ||
thread: Pick<Thread, 'id'>; | ||
message: Pick<Message, 'query' | 'response' | 'references'>; | ||
}; | ||
@@ -19,0 +14,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
294460
0.42%2508
-0.2%