autointent.generation.description_generation.create_intent_description#
- async autointent.generation.description_generation.create_intent_description(client, intent_name, utterances, regexp_patterns, prompt, model_name)#
Generate a description for a specific intent using an OpenAI model.
- Parameters:
client (openai.AsyncOpenAI) – The OpenAI client instance used to communicate with the model.
intent_name (str | None) – The name of the intent to describe. If None, an empty string will be used.
utterances (list[str]) – A list of example utterances related to the intent.
regexp_patterns (list[str]) – A list of regular expression patterns associated with the intent.
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 identifier of the OpenAI model to use for generating the description.
- Returns:
The generated description of the intent.
- Return type: