[docs]asyncdefmake_concise_gen_gt(row:Dict,client:AsyncClient,model_name:str="gpt-4o-2024-08-06",lang:str="en",):""" Generate concise generation_gt using OpenAI Structured Output for preventing errors. It generates a concise answer, so it is generally a word or just a phrase. :param row: The input row of the qa dataframe. :param client: The OpenAI async client. :param model_name: The model name that supports structured output. It has to be "gpt-4o-2024-08-06" or "gpt-4o-mini-2024-07-18". :param lang: The language code of the prompt. Default is "en". :return: The output row of the qa dataframe with added "generation_gt" in it. """returnawaitmake_gen_gt_openai(row,client,GEN_GT_SYSTEM_PROMPT["concise"][lang],model_name)
[docs]asyncdefmake_basic_gen_gt(row:Dict,client:AsyncClient,model_name:str="gpt-4o-2024-08-06",lang:str="en",):""" Generate basic generation_gt using OpenAI Structured Output for preventing errors. It generates a "basic" answer, and its prompt is simple. :param row: The input row of the qa dataframe. :param client: The OpenAI async client. :param model_name: The model name that supports structured output. It has to be "gpt-4o-2024-08-06" or "gpt-4o-mini-2024-07-18". :param lang: The language code of the prompt. Default is "en". :return: The output row of the qa dataframe with added "generation_gt" in it. """returnawaitmake_gen_gt_openai(row,client,GEN_GT_SYSTEM_PROMPT["basic"][lang],model_name)