Skip to content

Commit 4a891fd

Browse files
committed
feat: add more training phrases
1 parent 98f0940 commit 4a891fd

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

  • firestore-dialogflow-fulfillment/functions/src

firestore-dialogflow-fulfillment/functions/src/index.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,16 +387,39 @@ exports.createDialogflowAgent = functions.https.onCall(async (_, ctx) => {
387387
},
388388
],
389389
},
390+
{
391+
type: "EXAMPLE",
392+
parts: [
393+
{
394+
text: "I have a meeting ",
395+
},
396+
{
397+
text: "tomorrow",
398+
entityType: "@sys.date",
399+
},
400+
{
401+
text: " at ",
402+
},
403+
{
404+
text: "9 PM",
405+
entityType: "@sys.time",
406+
},
407+
],
408+
},
390409
],
391410
},
392411
});
393412

413+
return "Successfully created Dialogflow agent.";
414+
394415
// await runtime.setProcessingState(
395416
// "PROCESSING_COMPLETE",
396417
// `Successfully creeated a new agent named ${config.agentName}.`
397418
// );
398419
} catch (error) {
399420
functions.logger.error(error);
421+
422+
throw new HttpsError("internal", `Couldn't create agent`, error);
400423
// await runtime.setProcessingState(
401424
// "PROCESSING_FAILED",
402425
// `Agent ${config.agentName} wasn't created.`

0 commit comments

Comments
 (0)