You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* The maximum number of tokens the model will generate as part of the response.
130
+
* The maximum number of output tokens the model will generate in the response. If not set, `max_tokens` defaults to the model's maximum output token limit. You can find the maximum output token limits for each model in the [model documentation](https://docs.cohere.com/docs/models).
131
131
*
132
-
* **Note**: Setting a low value may result in incomplete generations.
132
+
* **Note**: Setting a low value may result in incomplete generations. In such cases, the `finish_reason` field in the response will be set to `"MAX_TOKENS"`.
133
+
*
134
+
* **Note**: If `max_tokens` is set higher than the model's maximum output token limit, the generation will be capped at that model-specific maximum limit.
133
135
*/
134
136
maxTokens?: number;
135
137
/** A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence. */
* If tool_choice isn't specified, then the model is free to choose whether to use the specified tools or not.
178
180
*
179
181
* **Note**: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer.
180
-
*
181
-
* **Note**: The same functionality can be achieved in `/v1/chat` using the `force_single_step` parameter. If `force_single_step=true`, this is equivalent to specifying `REQUIRED`. While if `force_single_step=true` and `tool_results` are passed, this is equivalent to specifying `NONE`.
182
182
*/
183
183
toolChoice?: Cohere.V2ChatRequestToolChoice;
184
184
thinking?: Cohere.Thinking;
185
+
/**
186
+
* When enabled, the user's prompt will be sent to the model without
* The maximum number of tokens the model will generate as part of the response.
117
+
* The maximum number of output tokens the model will generate in the response. If not set, `max_tokens` defaults to the model's maximum output token limit. You can find the maximum output token limits for each model in the [model documentation](https://docs.cohere.com/docs/models).
118
118
*
119
-
* **Note**: Setting a low value may result in incomplete generations.
119
+
* **Note**: Setting a low value may result in incomplete generations. In such cases, the `finish_reason` field in the response will be set to `"MAX_TOKENS"`.
120
+
*
121
+
* **Note**: If `max_tokens` is set higher than the model's maximum output token limit, the generation will be capped at that model-specific maximum limit.
120
122
*/
121
123
maxTokens?: number;
122
124
/** A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence. */
* If tool_choice isn't specified, then the model is free to choose whether to use the specified tools or not.
165
167
*
166
168
* **Note**: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer.
167
-
*
168
-
* **Note**: The same functionality can be achieved in `/v1/chat` using the `force_single_step` parameter. If `force_single_step=true`, this is equivalent to specifying `REQUIRED`. While if `force_single_step=true` and `tool_results` are passed, this is equivalent to specifying `NONE`.
Copy file name to clipboardExpand all lines: src/api/resources/v2/types/V2ChatRequestToolChoice.ts
-2Lines changed: 0 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,6 @@
8
8
* If tool_choice isn't specified, then the model is free to choose whether to use the specified tools or not.
9
9
*
10
10
* **Note**: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer.
11
-
*
12
-
* **Note**: The same functionality can be achieved in `/v1/chat` using the `force_single_step` parameter. If `force_single_step=true`, this is equivalent to specifying `REQUIRED`. While if `force_single_step=true` and `tool_results` are passed, this is equivalent to specifying `NONE`.
Copy file name to clipboardExpand all lines: src/api/resources/v2/types/V2ChatStreamRequestToolChoice.ts
-2Lines changed: 0 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,6 @@
8
8
* If tool_choice isn't specified, then the model is free to choose whether to use the specified tools or not.
9
9
*
10
10
* **Note**: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer.
11
-
*
12
-
* **Note**: The same functionality can be achieved in `/v1/chat` using the `force_single_step` parameter. If `force_single_step=true`, this is equivalent to specifying `REQUIRED`. While if `force_single_step=true` and `tool_results` are passed, this is equivalent to specifying `NONE`.
0 commit comments