Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion lib/llm/src/preprocessor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,15 @@ impl OpenAIPreprocessor {
let formatted_prompt = {
let _nvtx = dynamo_nvtx_range!("preprocess.template");
self.apply_template(request)
.with_context(|| "Failed to apply prompt template")?
.map_err(|e| {
let msg = format!("Failed to apply prompt template: {e}");
DynamoError::builder()
.error_type(ErrorType::InvalidArgument)
.message(msg)
.cause(e)
.build()
.into()
})?
Comment thread
Copilot marked this conversation as resolved.
};
TEMPLATE_SECONDS.observe(template_start.elapsed().as_secs_f64());

Expand Down
Loading