skit_pipelines.pipelines.fetch_n_tag_turns_and_calls package¶
Module contents¶
- fetch_n_tag_turns_and_calls(org_id: str, lang: str, client_id: str = '', data_label: str = '', start_date: str = '', end_date: str = '', labelstudio_project_id: str = '', call_project_id: str = '', ignore_callers: str = '', template_id: str = '', use_case: str = '', flow_name: str = '', min_duration: str = '', asr_provider: str = '', states: str = '', intents: str = '', reported: bool = False, call_quantity: int = 200, call_type: str = '', start_date_offset: int = 0, end_date_offset: int = 0, start_time_offset: int = 0, end_time_offset: int = 0, calls_file_s3_path: str = '', notify: str = '', channel: str = '', slack_thread: str = '', use_fsm_url: bool = False, remove_empty_audios: bool = True, use_assisted_annotation: bool = False, flow_ids: str = '')[source]¶
A pipeline to randomly sample calls and upload for annotating turns for intents & entities and annotating calls for slots & call level metrics.
Example payload to invoke via slack integrations:
@charon run fetch_n_tag_turns_and_calls
{ "client_id": 41, "org_id": 34, "lang": "en", "start_date": "2022-11-10", "end_date": "2022-11-11", "labelstudio_project_id": 195, "call_project_id": 194, "data_label": "Client" }
To use labelstudio:
@charon run fetch_n_tag_turns_and_calls
{ "org_id": 34, "client_id": 41, "start_date": "2022-09-16", "end_date": "2022-09-19", "lang": "en", "reported": false, "call_quantity": 1000, "flow_name" : "indigo_domain_tuning_english" "labelstudio_project_id": "135", "call_project_id": 194 }
- Parameters
client_id (str, optional) – The comma separated client ids as per fsm db.
org_id (str) – The organization id as per api-gateway.
labelstudio_project_id (str) – The labelstudio project id for turn level tagging (intent & entities) (this is a number) since this is optional, defaults to “”.
call_project_id (str) – The labelstudio project id for call level tagging (slots & call metrics) (this is a number) since this is optional, defaults to “”.
data_label (str, optional. Defaults to "Live") – A label to identify the source of a datapoint
start_date (str) – The start date range to filter calls in YYYY-MM-DD format.
lang (str) – The language code of the calls to filter. eg: en, hi, ta, te, etc.
end_date (str) – The end date range to filter calls in YYYY-MM-DD format.
ignore_callers (str, optional) – Comma separated list of callers to ignore, defaults to “”
reported (bool) – Pick only reported calls, defaults to False
template_id (str, optional) – The flow template id to filter calls, defaults to “”
use_case (str, optional) – Voice bot project’s use-case, defaults to “”
flow_name (str, optional) – Identifier for a whole/part of a voicebot conversation flow, defaults to “”
min_duration (str, optional) – Call duration filter, defaults to “”
asr_provider (str, optional) – The ASR vendor (google/VASR), defaults to “”
states (str, optional) – Filter calls in a comma separated list of states, defaults to “”
intents (str, optional) – Filter turns in sampled calls from a comma separated list of intents, defaults to “”
start_date_offset (int, optional) – Offset the start date by an integer value, defaults to 0
end_date_offset (int, optional) – Offset the end date by an integer value, defaults to 0
start_time_offset (int, optional) – Offset the start time by an integer value, defaults to 0
end_time_offset (int, optional) – Offset the end time by an integer value, defaults to 0
calls_file_s3_path (str, optional) – The s3_path to upload the turns from instead of querying from FSM_db, defaults to “”
call_quantity (int, optional) – Number of calls to sample, defaults to 200
call_type (str, optional) – INBOUND, OUTBOUND, or CALL_TEST call filters. We can currently choose only one of these, or defaults to “INBOUND” and “OUTBOUND” both
notify (str, optional) – Whether to send a slack notification, defaults to “”
channel (str, optional) – The slack channel to send the notification, defaults to “”
slack_thread (float, optional) – The slack thread to send the notification, defaults to “”
use_fsm_url (bool, optional) – Whether to use turn audio url from fsm or s3 path., defaults to False
remove_empty_audios (bool, optional) – Whether to turns of empty audio., defaults to False
use_assisted_annotation (bool, optional) – Whether to use GPT for intent prediction, only applicable to US collections, defaults to False
flow_ids (str, optional) – Id for a whole/part of a voicebot conversation flow, defaults to “”