skit_pipelines.pipelines.generate_sample_conversations package

Module contents

generate_sample_conversations(*, situations: Optional[str], s3_links_to_prompts: str = '', filename: str = '', llm_trainer_repo_name: str = 'LLMtrainer', llm_trainer_repo_branch: str = 'main', model: str = 'gpt-4', n_iter: int = 1, n_choice: int = 2, temperature: float = 0.99, notify: str = '', channel: str = '', slack_thread: str = '')[source]

A pipeline to sample conversations given a situation

Example payload to invoke via slack integrations:

A minimal example:

@charon run generate_sample_conversations

{
    "situations": "The user wants to talk to a human agent, so the agent transfers the call",
    "llm_trainer_repo_name": "LLMtrainer",
    "llm_trainer_repo_branch": "main"
    }

A full available parameters example:

@charon run generate_sample_conversations

{
    "situations": "The user disputes the debt, so the agent transfers the call to the agent :: The user cannot pay any amount as they have a difficult situation, so the agent hangs up the call. "
    "llm_trainer_repo_name": "LLMtrainer",
    "llm_trainer_repo_branch": "main",
}
Parameters
  • situations (optional) – The situations for generating the conversations

  • prompt – Prompt to the model for data generation

type prompt: str

Parameters
  • filename (str) – Acts as a prfix to the default naming used

  • llm_trainer_repo_name (str) – The conversation generation repo name in Github.

  • llm_trainer_repo_branch (str, optional) – The branch name in the conversation generation repo to use , defaults to main.

  • model (str) – Optional model to be used for generating data

  • n_iter – No of times we make iterate on sub_scenarios list to generate conversations

type n_iter: int

Parameters

n_choice – No of convs generated in a single time from a scenario.

type n_choice: int

Parameters

temperature – Temperature

type temperature: float

Parameters
  • 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 (str, optional) – The slack thread to send the notification, defaults to “”