@@ -31,7 +31,7 @@ option java_outer_classname = "PromptTemplateProto";
31
31
message PromptTemplate {
32
32
// Text prepended to session's context on the first prefill invocation. This
33
33
// is useful for system prompts.
34
- string session_prefix = 1 ;
34
+ string session_prefix = 1 [ deprecated = true ] ;
35
35
36
36
// Text prepended to the input prompt on the first chunck of the prefill call.
37
37
// This is useful for adding start of user's turn markers.
@@ -41,3 +41,29 @@ message PromptTemplate {
41
41
// for adding start of model of model's turn markers.
42
42
string prompt_suffix = 3 ;
43
43
}
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