Skip to content

Conversation

@clutchski
Copy link
Contributor

@clutchski clutchski commented Jan 9, 2026

Addresses #70

@clutchski clutchski requested a review from cpinn January 9, 2026 20:10

# Load the prompt using Prompt.load
puts "\nLoading prompt..."
prompt = Braintrust::Prompt.load(project: project_name, slug: prompt_slug)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if now when we load prompts we may need to check what templating language the prompt was using and fail to load the prompt if the templating language isn't available in a specific sdk.

private

# Render Mustache template with variables
def render_template(text, variables, strict:)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we want to support the no template so people don't have to escape double braces in their prompts if they have any?

Technically you can work around it in mustache by doing something like changing the delimiters by doing {{=<% %>=}} but might be nice to have no template option as well.

end
end

Mustache.render(text, variables)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recently found out we have custom escape logic for mustache.

It exists here in python and here in typescript.

We should move that custom escaping over to make the experience consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants