opto.optimizers.textgrad.TextGrad#
- class TextGrad[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[, verbose])Call the LLM with a prompt and return the response.
Return the default Propagator object of the optimizer.
propose
(*args, **kwargs)Propose the new data of the parameters based on the feedback.
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.
- __init__(parameters: List[ParameterNode], llm: AutoGenLLM | None = None, *args, propagator: Propagator | None = None, objective: None | str = None, max_tokens=4096, log=False, **kwargs)[source]#
- __new__(**kwargs)#