File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,7 @@ class chat_formatter {
170170 }
171171
172172 partial_formatter * get_partial_formatter () { return partial_formatter_ptr_.get (); }
173+ const std::string & get_full_prompt () const { return formatted_cumulative_; }
173174
174175private:
175176 std::vector<common_chat_msg> & chat_msgs_;
@@ -379,13 +380,9 @@ int main(int argc, char ** argv) {
379380 }
380381
381382 if (!params.system_prompt .empty () || !params.prompt .empty ()) {
382- common_chat_templates_inputs inputs;
383- inputs.use_jinja = g_params->use_jinja ;
384- inputs.messages = chat_msgs;
385- inputs.add_generation_prompt = !params.prompt .empty ();
386-
387- prompt = common_chat_templates_apply (chat_templates.get (), inputs).prompt ;
383+ prompt = chat_add_and_format.get_full_prompt ();
388384 }
385+
389386 } else {
390387 // otherwise use the prompt as is
391388 prompt = params.prompt ;
You can’t perform that action at this time.
0 commit comments