skit_pipelines.components.identify_compliance_breaches_llm package¶
Submodules¶
skit_pipelines.components.identify_compliance_breaches_llm.utils module¶
- class Call(id: 'int', uuid: 'str', audio_url: 'str', call_url: 'str', flow_uuid: 'str', client_uuid: 'str', reftime: 'str', turns: 'List[Turn]')[source]¶
Bases:
object
- audio_url: str¶
- call_url: str¶
- client_uuid: str¶
- flow_uuid: str¶
- id: int¶
- reftime: str¶
- uuid: str¶
- class Turn(id: 'int', uuid: 'str', reftime: 'str', is_bot: 'bool', utterance: 'str')[source]¶
Bases:
object
- id: int¶
- is_bot: bool¶
- reftime: str¶
- utterance: str¶
- uuid: str¶
- format_call(input_call: skit_pipelines.components.identify_compliance_breaches_llm.utils.Call) str [source]¶
Convert the turns of a call representing the entire conversation into a single string that would be used as input to the LLM model
- parse_calls(input_df) list[skit_pipelines.components.identify_compliance_breaches_llm.utils.Call] [source]¶
Convert the turn-level dataframe obtained from fetch_calls into a list of calls
Module contents¶
- identify_compliance_breaches_llm(s3_file_path: str) str [source]¶
Groups turns into calls and pushes them to an LLM (uses openai chatComplete functionality) to identify compliance breaches. The result value for each call is written in an output csv file
param s3_file_path: Csv file containing turns for calls obtained from fsm Db type s3_file_path: str
output: path of csv file containing complaince breach results for each call in the input
- identify_compliance_breaches_llm_op(s3_file_path: str)¶
Identify compliance breaches llm Groups turns into calls and pushes them to an LLM (uses openai chatComplete functionality) to identify