skit_pipelines.pipelines.fetch_tagged_calls_dataset package

Module contents

fetch_tagged_calls_dataset(org_id: str, job_id: str = '', labelstudio_project_id: str = '', start_date: str = '', end_date: str = '', timezone: str = 'Asia/Kolkata', task_type: str = 'conversation', notify: str = '', channel: str = '', slack_thread: str = '')[source]

A pipeline to fetch tagged dataset.

Example payload to invoke via slack integrations:

@charon run fetch_tagged_calls_dataset

{
    "org_id": 1,
    "job_id": "4011",
    "start_date": "2020-01-01",
    "end_date": "2020-01-01"
}

To use labelstudio:

@charon run fetch_tagged_calls_dataset

{
    "org_id": 1,
    "labelstudio_project_id": "40",
    "start_date": "2020-01-01",
    "end_date": "2020-01-01"
}
Parameters
  • org_id (str) – reference path to save the metrics.

  • job_ids – The job ids as per tog. Optional if labestudio project id is provided.

  • labelstudio_project_id (str) – The labelstudio project id (this is a number) since this is optional, defaults to “”.

  • start_date (str) – The start date range (YYYY-MM-DD) to filter tagged data.

  • end_date (str) – The end date range (YYYY-MM-DD) to filter tagged data

  • timezone (str, optional) – The timezone to apply for multi-region datasets, defaults to “Asia/Kolkata”

  • task_type (str, optional) – https://github.com/skit-ai/skit-labels#task-types, defaults to “conversation”

  • notify (str, optional) – A comma separated list of slack ids: “@apples, @orange.fruit” etc, defaults to “”

  • channel (str, optional) – The slack channel to send the notification, defaults to “”

  • slack_thread (str, optional) – The slack thread to send the notification, defaults to “”