File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -112,16 +112,14 @@ def __init__(
112112 self ._chat_history_limit = 0
113113
114114 # Get and hydrate user_message_template with self._input
115- user_message_template = self ._config .get (
116- "user_message" ,
117- "{{task}}" ,
118- )
119-
120- if user_message_template == "" :
121- user_message_template = "{{task}}"
115+ user_message_template = self ._config .get ("user_message" )
122116
123117 try :
124- user_message = render_template (user_message_template , self ._input )
118+ user_message = (
119+ render_template (user_message_template , self ._input )
120+ if user_message_template
121+ else json .dumps (self ._input ).decode ("utf-8" )
122+ )
125123
126124 # Hydrate system_message_template with self._input
127125 if self ._system_message and len (self ._system_message ) > 0 and "content" in self ._system_message [0 ]:
You can’t perform that action at this time.
0 commit comments