Closed
Description
The class org.springframework.ai.chat.prompt.PromptTemplate configures the stringtemplate renderer ST with non default delimiters {
and }
. In my opinion there is no need to change the default behavior. Here are the arguments that, for me, speak against deviating from the standard:
- With curly brackets you have to escape JSON examples in the prompt (for example if you provide an expected JSON response)
- The Spring AI documentation does not state this changed behavior (except in the examples) and the stringtemplate documentation uses
<
and>
.
In my opinion, Spring AI should either use the stringtemplate standard, make delimiters configurable or mention the changed delimiters explicitly in the documentation.
If this issue is accepted I am happy to provide a pull request with the desired changes.