additional_context?: string,
/* Full text of the user's question. */
  full_query?: string,
}) => any;
# Compress the service definition to avoid leaking too much input structure to the sample data
template = """In 20 words or less, what does this service accomplish?
{spec}
Function: It's designed to """
prompt = PromptTemplate.from_template(template)
generation_chain = LLMChain(llm=llm, prompt=prompt)
purpose = generation_chain.run(spec=operation.to_typescript())
template = """Write a list of {num_to_generate} unique messages users might send to a service designed to{purpose} They must each be completely unique.
1."""
def parse_list(text: str) -> List[str]:
    # Match lines starting with a number then period
    # Strip leading and trailing whitespace
    matches = re.findall(r'^\d+\. ', text)
    return [re.sub(r'^\d+\. ', '', q).strip().strip('"') for q in text.split('\n')]
num_to_generate = 10 # How many examples to use for this test set.
prompt = PromptTemplate.from_template(template)
generation_chain = LLMChain(llm=llm, prompt=prompt)
text = generation_chain.run(purpose=purpose,
                            num_to_generate=num_to_generate)
# Strip preceding numeric bullets
queries = parse_list(text)
queries
["Can you explain how to say 'hello' in Spanish?",
 "I need help understanding the French word for 'goodbye'.",
 "Can you tell me how to say 'thank you' in German?",
 "I'm trying to learn the Italian word for 'please'.",
 "Can you help me with the pronunciation of 'yes' in Portuguese?",
 "I'm looking for the Dutch word for 'no'.",
rtdocs_stable/api.python.langchain.com/en/stable/use_cases/evaluation/openapi_eval.html