Skip to content

Commit

Permalink
feat: Add available liquid tags to prompt content
Browse files Browse the repository at this point in the history
  • Loading branch information
kieranklaassen committed Aug 22, 2024
1 parent c6109d8 commit 5b75a60
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/views/leva/workbench/_prompt_content.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@
data-action="input->prompt-autosave#debouncedSave"
><%= @selected_prompt.user_prompt %></textarea>
</div>
<!-- Available Liquid Tags -->
<% if @dataset_record && @dataset_record.recordable.respond_to?(:to_llm_context) %>
<div class="bg-gray-900 p-5 rounded-lg shadow-lg">
<h2 class="text-sm font-semibold mb-3 text-indigo-400">AVAILABLE LIQUID TAGS</h2>
<div class="bg-gray-800 p-3 rounded-lg text-sm">
<% @dataset_record.recordable.to_llm_context.keys.each do |key| %>
<code class="text-green-400 mr-2">{{ <%= key %> }}</code>
<% end %>
</div>
</div>
<% end %>
<div class="text-sm text-center" data-prompt-autosave-target="status"></div>
</div>
<script>
Expand Down

0 comments on commit 5b75a60

Please sign in to comment.