pub async fn generate_code_solution(
generator: &CodeSolutionGenerator,
statement: &str,
input_format: &str,
constraints: &str,
) -> Result<(String, LanguageName), PromptError>Expand description
Generates a code solution from the given statement, input format, and constraints.
§Arguments
generator- A reference to the CodeSolutionGenerator instancestatement- A string describing the problem statement in natural languageinput_format- A string describing the input format in natural languageconstraints- A string specifying the constraints on input values
§Returns
Result<String, PromptError>- A Result containing either the generated code solution or a Google API error