@@ -14,6 +14,8 @@ pub struct UserInputMessage {
1414 pub origin : :: std:: option:: Option < crate :: types:: Origin > ,
1515 /// Images associated with the Chat Message.
1616 pub images : :: std:: option:: Option < :: std:: vec:: Vec < crate :: types:: ImageBlock > > ,
17+ /// Unique identifier for the model used in this conversation
18+ pub model_id : :: std:: option:: Option < :: std:: string:: String > ,
1719}
1820impl UserInputMessage {
1921 /// The content of the chat message.
@@ -44,6 +46,11 @@ impl UserInputMessage {
4446 pub fn images ( & self ) -> & [ crate :: types:: ImageBlock ] {
4547 self . images . as_deref ( ) . unwrap_or_default ( )
4648 }
49+
50+ /// Unique identifier for the model used in this conversation
51+ pub fn model_id ( & self ) -> :: std:: option:: Option < & str > {
52+ self . model_id . as_deref ( )
53+ }
4754}
4855impl :: std:: fmt:: Debug for UserInputMessage {
4956 fn fmt ( & self , f : & mut :: std:: fmt:: Formatter < ' _ > ) -> :: std:: fmt:: Result {
@@ -53,6 +60,7 @@ impl ::std::fmt::Debug for UserInputMessage {
5360 formatter. field ( "user_intent" , & self . user_intent ) ;
5461 formatter. field ( "origin" , & self . origin ) ;
5562 formatter. field ( "images" , & self . images ) ;
63+ formatter. field ( "model_id" , & self . model_id ) ;
5664 formatter. finish ( )
5765 }
5866}
@@ -73,6 +81,7 @@ pub struct UserInputMessageBuilder {
7381 pub ( crate ) user_intent : :: std:: option:: Option < crate :: types:: UserIntent > ,
7482 pub ( crate ) origin : :: std:: option:: Option < crate :: types:: Origin > ,
7583 pub ( crate ) images : :: std:: option:: Option < :: std:: vec:: Vec < crate :: types:: ImageBlock > > ,
84+ pub ( crate ) model_id : :: std:: option:: Option < :: std:: string:: String > ,
7685}
7786impl UserInputMessageBuilder {
7887 /// The content of the chat message.
@@ -170,6 +179,23 @@ impl UserInputMessageBuilder {
170179 & self . images
171180 }
172181
182+ /// Unique identifier for the model used in this conversation
183+ pub fn model_id ( mut self , input : impl :: std:: convert:: Into < :: std:: string:: String > ) -> Self {
184+ self . model_id = :: std:: option:: Option :: Some ( input. into ( ) ) ;
185+ self
186+ }
187+
188+ /// Unique identifier for the model used in this conversation
189+ pub fn set_model_id ( mut self , input : :: std:: option:: Option < :: std:: string:: String > ) -> Self {
190+ self . model_id = input;
191+ self
192+ }
193+
194+ /// Unique identifier for the model used in this conversation
195+ pub fn get_model_id ( & self ) -> & :: std:: option:: Option < :: std:: string:: String > {
196+ & self . model_id
197+ }
198+
173199 /// Consumes the builder and constructs a [`UserInputMessage`](crate::types::UserInputMessage).
174200 /// This method will fail if any of the following fields are not set:
175201 /// - [`content`](crate::types::builders::UserInputMessageBuilder::content)
@@ -187,6 +213,7 @@ impl UserInputMessageBuilder {
187213 user_intent : self . user_intent ,
188214 origin : self . origin ,
189215 images : self . images ,
216+ model_id : self . model_id ,
190217 } )
191218 }
192219}
@@ -198,6 +225,7 @@ impl ::std::fmt::Debug for UserInputMessageBuilder {
198225 formatter. field ( "user_intent" , & self . user_intent ) ;
199226 formatter. field ( "origin" , & self . origin ) ;
200227 formatter. field ( "images" , & self . images ) ;
228+ formatter. field ( "model_id" , & self . model_id ) ;
201229 formatter. finish ( )
202230 }
203231}
0 commit comments