💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# E.9 ReplaceTokens The `ReplaceTokens` filter will replace certain tokens. Tokens are strings enclosed in special characters. If you want to replace `##BCHOME##` by the path to the directory set in the environment variable `BCHOME`, you could do the following: ``` <property environment="env" /> <filterchain> <replacetokens begintoken="##" endtoken="##"> <token key="BCHOME" value="${env.BCHOME}" /> </replacetokens> </filterchain> ``` Table E.9:聽 Attributes for the `<replacetokens>` tag NameTypeDescriptionDefaultRequired`begintoken``String`The string that marks the beginning of a token.@No`endtoken``String`The string that marks the end of a token.@No E.9.1 Nested tags The `ReplaceTokens` filter must contain one or more `token` tags. These must have a `key` and a `value` attribute.