40
40
ChatMessageV2 ,
41
41
ChatResponse ,
42
42
SystemChatMessageV2 ,
43
- TextAssistantMessageContentItem ,
43
+ TextAssistantMessageV2ContentItem ,
44
44
ToolCallV2 ,
45
45
ToolCallV2Function ,
46
46
ToolChatMessageV2 ,
@@ -111,7 +111,6 @@ def __init__(
111
111
* ,
112
112
provider : Literal ['cohere' ] | Provider [AsyncClientV2 ] = 'cohere' ,
113
113
profile : ModelProfileSpec | None = None ,
114
- settings : ModelSettings | None = None ,
115
114
):
116
115
"""Initialize an Cohere model.
117
116
@@ -122,15 +121,13 @@ def __init__(
122
121
'cohere' or an instance of `Provider[AsyncClientV2]`. If not provided, a new provider will be
123
122
created using the other parameters.
124
123
profile: The model profile to use. Defaults to a profile picked by the provider based on the model name.
125
- settings: Model-specific settings that will be used as defaults for this model.
126
124
"""
127
125
self ._model_name = model_name
128
126
129
127
if isinstance (provider , str ):
130
128
provider = infer_provider (provider )
131
129
self .client = provider .client
132
-
133
- super ().__init__ (settings = settings , profile = profile or provider .model_profile )
130
+ self ._profile = profile or provider .model_profile
134
131
135
132
@property
136
133
def base_url (self ) -> str :
@@ -227,7 +224,7 @@ def _map_messages(self, messages: list[ModelMessage]) -> list[ChatMessageV2]:
227
224
assert_never (item )
228
225
message_param = AssistantChatMessageV2 (role = 'assistant' )
229
226
if texts :
230
- message_param .content = [TextAssistantMessageContentItem (text = '\n \n ' .join (texts ))]
227
+ message_param .content = [TextAssistantMessageV2ContentItem (text = '\n \n ' .join (texts ))]
231
228
if tool_calls :
232
229
message_param .tool_calls = tool_calls
233
230
cohere_messages .append (message_param )
0 commit comments