From 090a36c6d1415534b7f6ff4ab287b9922e219763 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Tue, 23 Apr 2024 20:40:07 +0300 Subject: [PATCH] examples: add example template to disable completions 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. --- examples/templates/completions/disable.j2 | 1 + 1 file changed, 1 insertion(+) create mode 100644 examples/templates/completions/disable.j2 diff --git a/examples/templates/completions/disable.j2 b/examples/templates/completions/disable.j2 new file mode 100644 index 0000000..b05349d --- /dev/null +++ b/examples/templates/completions/disable.j2 @@ -0,0 +1 @@ +{ raise_exception('Legacy completions are disabled for this model') }