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',
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