File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
spring-ai-template-jinja/src
main/java/org/springframework/ai/template/jinja
test/java/org/springframework/ai/template/jinja Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 1616
1717package org .springframework .ai .template .jinja ;
1818
19+ import java .util .HashSet ;
20+ import java .util .Map ;
21+ import java .util .Set ;
22+
1923import com .hubspot .jinjava .Jinjava ;
2024import com .hubspot .jinjava .JinjavaConfig ;
2125import com .hubspot .jinjava .tree .parse .ExpressionToken ;
2226import com .hubspot .jinjava .tree .parse .Token ;
2327import com .hubspot .jinjava .tree .parse .TokenScanner ;
2428import org .slf4j .Logger ;
2529import org .slf4j .LoggerFactory ;
30+
2631import org .springframework .ai .template .TemplateRenderer ;
2732import org .springframework .ai .template .ValidationMode ;
2833import org .springframework .util .Assert ;
2934
30- import java .util .HashSet ;
31- import java .util .Map ;
32- import java .util .Set ;
33-
3435/**
3536 * Renders a template using the Jin-java library.
3637 *
@@ -63,7 +64,7 @@ public class JinjaTemplateRenderer implements TemplateRenderer {
6364 * @param validationMode the mode to use for template variable validation; must not be
6465 * null
6566 */
66- public JinjaTemplateRenderer (ValidationMode validationMode ) {
67+ protected JinjaTemplateRenderer (ValidationMode validationMode ) {
6768 Assert .notNull (validationMode , "validationMode cannot be null" );
6869 this .validationMode = validationMode ;
6970 }
Original file line number Diff line number Diff line change 1616
1717package org .springframework .ai .template .jinja ;
1818
19+ import java .util .HashMap ;
20+ import java .util .Map ;
21+
1922import org .junit .jupiter .api .Test ;
23+
2024import org .springframework .ai .template .ValidationMode ;
2125import org .springframework .test .util .ReflectionTestUtils ;
2226
23- import java .util .HashMap ;
24- import java .util .Map ;
25-
2627import static org .assertj .core .api .Assertions .assertThat ;
2728import static org .assertj .core .api .Assertions .assertThatThrownBy ;
2829
You can’t perform that action at this time.
0 commit comments