@@ -31,7 +31,7 @@ option java_outer_classname = "PromptTemplateProto";
3131message PromptTemplate {
3232 // Text prepended to session's context on the first prefill invocation. This
3333 // is useful for system prompts.
34- string session_prefix = 1 ;
34+ string session_prefix = 1 [ deprecated = true ] ;
3535
3636 // Text prepended to the input prompt on the first chunck of the prefill call.
3737 // This is useful for adding start of user's turn markers.
@@ -41,3 +41,29 @@ message PromptTemplate {
4141 // for adding start of model of model's turn markers.
4242 string prompt_suffix = 3 ;
4343}
44+
45+ // A collection of prompt templates for different roles.
46+ // Here is an example of the template based on Gemma's specifications here:
47+ // https://ai.google.dev/gemma/docs/formatting
48+ //
49+ // message prompt_templates {
50+ // .user_template = {
51+ // .prompt_prefix = "<start_of_turn>user\n";
52+ // .prompt_suffix = "<end_of_turn>\n";
53+ // }
54+ // .model_template = {
55+ // .prompt_prefix = "<start_of_turn>model\n ";
56+ // .prompt_suffix = "<end_of_turn>\n";
57+ // }
58+ // }
59+ //
60+ message PromptTemplates {
61+ // The template for user role.
62+ optional PromptTemplate user_template = 1 ;
63+
64+ // The template for model role.
65+ optional PromptTemplate model_template = 2 ;
66+
67+ // The template for system role.
68+ optional PromptTemplate system_template = 3 ;
69+ }
0 commit comments