Skip to content

Commit a8ff306

Browse files
author
Shin
committed
fix: guardrails code styling and YAML config
1. Left-align code blocks (was center-aligned) 2. Fix YAML snippet - guardrails: is top-level, not nested under litellm_settings:
1 parent 5354152 commit a8ff306

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

src/Guardrails.svelte

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,11 @@
286286

287287
<div class="usage-section">
288288
<span class="usage-label">Usage in config.yaml:</span>
289-
<pre class="usage-code"><code>litellm_settings:
290-
guardrails:
291-
- guardrail_name: "{item.id}"
292-
litellm_params:
293-
guardrail: custom_code.{item.id}
294-
mode: "{item.input_type === 'response' ? 'post_call' : 'pre_call'}"</code></pre>
289+
<pre class="usage-code"><code>guardrails:
290+
- guardrail_name: "{item.id}"
291+
litellm_params:
292+
guardrail: custom_code.{item.id}
293+
mode: "{item.input_type === 'response' ? 'post_call' : 'pre_call'}"</code></pre>
295294
</div>
296295

297296
<div class="card-footer">
@@ -590,11 +589,15 @@
590589
font-size: 0.8125rem;
591590
line-height: 1.6;
592591
margin: 0;
592+
text-align: left;
593+
white-space: pre;
593594
}
594595
595596
.code-block code,
596597
.usage-code code {
597598
color: var(--code-text);
599+
text-align: left;
600+
display: block;
598601
}
599602
600603
.usage-section {

0 commit comments

Comments
 (0)