autointent.generation.description_generation.generate_intent_descriptions#
- async autointent.generation.description_generation.generate_intent_descriptions(client, intent_utterances, intents, prompt, model_name)#
Generate descriptions for a list of intents using an OpenAI model.
- Parameters:
client (openai.AsyncOpenAI) – The OpenAI client used to generate the descriptions.
intent_utterances (dict[int, list[str]]) – A dictionary mapping intent IDs to their corresponding utterances.
intents (list[autointent.schemas.Intent]) – A list of intents to generate descriptions for.
prompt (autointent.generation.prompt_scheme.PromptDescription) – A string template for the prompt, which must include placeholders for {intent_name} and {user_utterances} to format the content sent to the model.
model_name (str) – The name of the OpenAI model to use for generating descriptions.
- Returns:
The list of intents with updated descriptions.
- Return type: