Skip to content

Update existing service module GUI to handle modifying service intents #801

@jaX10bt

Description

@jaX10bt

AS A service administrator
I WANT to add field values to the intent declaration
SO THAT the intent declaration has all necessary fields to classify service intents

Instead of linking services created in the Service Module to Rasa intents in the Training Module, this new functionality allows services to be created and activated only using the Service Module.

Each service needs an accompanying intent declaration with the following fields:

  1. id — machine friendly service name where all characters are lower case and words are separated by underscore (e.g. "company_contacts_service"). (not visible in backoffice)
  2. name — human friendly name (e.g. "Company contacts service").
  3. description — a brief summary of the functionality of the service (e.g. "This service returns the contact details of the requested company.").
  4. examples — an array of examples which help the model to classify the service intent (e.g. ["can i get the contact details of the company", "what are the company contacts", "please give me the telephone number of the company"]).
  5. entities — an array of entities to be extracted from the user query (e.g. "company_name"). this array can be empty if the API doesn't require any inputs.
  6. text_for_embedding — a field which includes the description and all the examples separated by newlines (\n). (not visible in backoffice)

Acceptance Criteria:


  • When the service is saved, the following things happen in the background:
    • the id field is filled with snake cased name string.
    • the text_for_embedding field is filled with description followed by "\n" and all examples from examples separated by "\n".
    • the service settings/ intent declaration is saved alongside the service DSL yml files.

Example JSON:

  {
    "id": "company_contacts_service",
    "name": "Company contacts service",
    "description": "This service returns the contact details of the requested company.",
    "examples": [
      "can i get the contact details of the company",
      "what are the company contacts",
      "please give me the telephone number of the company"
    ],
    "entities": [
      "company_name"
    ],
    "text_for_embedding": "This service returns the contact details of the requested company.\ncan i get the contact details of the company\nwhat are the company contacts\nplease give me the telephone number of the company"
  }

Metadata

Metadata

Assignees

Labels

Projects

Status

Released

Relationships

None yet

Development

No branches or pull requests

Issue actions