Skip to content

Commit

Permalink
examples: add example template to disable completions
Browse files Browse the repository at this point in the history
The ai-router config currently doesn't distinguish between chat and
legacy completion models; if a chat_completion model is configured, it
can be used for both chat and legacy completions. If for some reason you
want to disallow legacy completions for a model, this example template
can be used to do so.
  • Loading branch information
stintel committed May 31, 2024
1 parent d70d7d6 commit f53e572
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/templates/completions/disable.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ raise_exception('Legacy completions are disabled for this model') }

0 comments on commit f53e572

Please sign in to comment.