opto.optimizers.opro.OPRO#
- class OPRO[source]#
Attributes
Return a Propagator object that can be used to propagate feedback in backward.
Aggregate the graphs of all the parameters.
Methods
backward
(node, *args, **kwargs)Propagate the feedback backward.
call_llm
(system_prompt, user_prompt[, ...])Call the LLM with a prompt and return the response.
construct_prompt
(summary[, mask])Construct the system and user prompt.
construct_update_dict
(suggestion)Convert the suggestion in text into the right data type.
Return the default Propagator object of the optimizer.
extract_llm_suggestion
(response)Extract the suggestion from the response.
problem_instance
(summary[, mask])propose
(*args, **kwargs)Propose the new data of the parameters based on the feedback.
replace_symbols
(text, symbols)repr_node_constraint
(node_dict)repr_node_value
(node_dict)step
(*args, **kwargs)Update the parameters based on the feedback.
update
(update_dict)Update the trainable parameters given a dictionary of new data.
Reset the feedback.
- __new__(**kwargs)#