execute#
- langchain_prompty.utils.execute(prompt: str | Prompty, configuration: Dict[str, Any] = {}, parameters: Dict[str, Any] = {}, inputs: Dict[str, Any] = {}, raw: bool = False, connection: str = 'default') Any [source]#
Execute a prompty.
- Parameters:
prompt (str | Prompty) β The prompt to execute. Can be a path to a prompty file or a Prompty object.
configuration (Dict[str, Any]) β The configuration to use. Defaults to {}.
parameters (Dict[str, Any]) β The parameters to use. Defaults to {}.
inputs (Dict[str, Any]) β The inputs to the prompty. Defaults to {}.
raw (bool) β Whether to return the raw output. Defaults to False.
connection (str) β The connection to use. Defaults to βdefaultβ.
- Returns:
The result of executing the prompty.
- Return type:
Any