From 1c06dee660974c4418ba880ba63b74d4e2e758c6 Mon Sep 17 00:00:00 2001 From: Michael Panchenko Date: Thu, 22 May 2025 23:02:16 +0200 Subject: [PATCH] Docstring --- src/interprompt/promt_template.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/interprompt/promt_template.py b/src/interprompt/promt_template.py index 86344289..f90c97d8 100644 --- a/src/interprompt/promt_template.py +++ b/src/interprompt/promt_template.py @@ -198,25 +198,19 @@ class PromptCollection: All data will be read from the yamls directly contained in the given directory on initialization. It is thus assumed that you manage one directory per prompt collection. - The yamls are assumed to be either of the form (for single-language support): - - ```yaml - : - : [, , ...] - ``` - - or (necessary for multi-language support): + The yamls are assumed to be either of the form ```yaml lang: # optional, defaults to "default" prompts: : - : [, , ...] + : [, , ...] ``` - When specifying prompt templates for multiple languages, make sure that the parameters are the same for all languages + When specifying prompt templates for multiple languages, make sure that the Jinja template parameters + (inferred from the things inside the `{{ }}` in the template strings) are the same for all languages (you will get an exception otherwise). The prompt names must be unique (for the same language) within the collection.