using_prompt_template
context manager to add a prompt template into the current OpenTelemetry Context. FI auto-instrumentors will read this Context and pass the prompt template fields as span attributes, adhering to the traceAI semantic conventions.
Parameter | Type | Description | Example |
---|---|---|---|
template | str | The string for the prompt template | ”Please describe the weather forecast for on “ |
version | str | Identifier for the template version | ”v1.0” |
variables | Dict[str] | Dictionary containing variables to fill the template | {"city": "San Francisco", "date": "March 27"} |