@@ -13,7 +13,7 @@ use crate::types::responses::{
1313 TextResponseFormatConfiguration , Tool , ToolChoiceCustom , ToolChoiceFunction , ToolChoiceMCP ,
1414 ToolChoiceOptions , ToolChoiceParam , ToolChoiceTypes , WebSearchTool , WebSearchToolCall ,
1515} ;
16- use crate :: types:: MCPTool ;
16+ use crate :: types:: { chat :: ResponseFormatJsonSchema , MCPTool } ;
1717
1818impl < S : Into < String > > From < S > for EasyInputMessage {
1919 fn from ( value : S ) -> Self {
@@ -33,6 +33,12 @@ impl From<EasyInputMessage> for InputItem {
3333
3434// InputItem ergonomics
3535
36+ impl From < InputMessage > for InputItem {
37+ fn from ( msg : InputMessage ) -> Self {
38+ InputItem :: Item ( Item :: Message ( MessageItem :: Input ( msg) ) )
39+ }
40+ }
41+
3642impl From < Item > for InputItem {
3743 fn from ( item : Item ) -> Self {
3844 InputItem :: Item ( item)
@@ -227,6 +233,15 @@ impl From<TextResponseFormatConfiguration> for ResponseTextParam {
227233 }
228234}
229235
236+ impl From < ResponseFormatJsonSchema > for ResponseTextParam {
237+ fn from ( schema : ResponseFormatJsonSchema ) -> Self {
238+ ResponseTextParam {
239+ format : TextResponseFormatConfiguration :: JsonSchema ( schema) ,
240+ verbosity : None ,
241+ }
242+ }
243+ }
244+
230245// ResponseStreamOptions ergonomics
231246
232247impl From < bool > for ResponseStreamOptions {
0 commit comments