Sets the prompt template in the given OpenTelemetry context. If OI tracer is used in spans created during this active context, the prompt template will be added to the span as an attribute.
The context to set the prompt template on.
The prompt template to set on the context.
The context
context.with( setPromptTemplate(context.active(), { template: "hello {name}", variables: { name: "world" }, version: "V1.0" }), () => { // Spans created here will have prompt template attributes }); Copy
context.with( setPromptTemplate(context.active(), { template: "hello {name}", variables: { name: "world" }, version: "V1.0" }), () => { // Spans created here will have prompt template attributes });
Sets the prompt template in the given OpenTelemetry context. If OI tracer is used in spans created during this active context, the prompt template will be added to the span as an attribute.