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
* like 0.8 will make the output more random, while lower values like 0.2 will make it
312
307
* more focused and deterministic. We generally recommend altering this or top_p but
313
308
* not both.
309
+
* @param enableEnhancement Enables or disables feature enhancements such as search. This parameter does not affect the security review capability.
310
+
* For hunyuan-lite, this parameter is ineffective.
311
+
* If not specified, the switch is turned on by default.
312
+
* Turning off this switch can reduce response latency, especially for the first character in stream mode, but may slightly degrade the response quality in some scenarios.
313
+
* Example: true
314
314
* @param topP An alternative to sampling with temperature, called nucleus sampling,
315
315
* where the model considers the results of the tokens with top_p probability mass. So
316
316
* 0.1 means only the tokens comprising the top 10% probability mass are considered.
@@ -319,12 +319,46 @@ public record Usage(
319
319
* @param stream If set, partial message deltas will be sent.Tokens will be sent as
320
320
* data-only server-sent events as they become available, with the stream terminated
321
321
* by a data: [DONE] message.
322
+
* @param streamModeration Controls whether the output is reviewed in real-time during streaming.
323
+
* This field is effective only when Stream is set to true.
324
+
* If true, the output is reviewed in real-time, and segments that fail the review will have their FinishReason set to sensitive.
325
+
* If false, the entire output is reviewed before being returned.
326
+
* If real-time text display is required in your application, you should handle the case where FinishReason is sensitive by撤回已显示的内容 and providing a custom message.
327
+
* Example: false
322
328
* @param tools A list of tools the model may call. Currently, only functions are
323
329
* supported as a tool.
324
-
* @param toolChoice Controls which (if any) function is called by the model.
325
-
* @param customTool A custom tool to be used by the model.
326
-
* @param searchInfo Whether to include search information in the response.
327
-
* @param citation Whether to include citation information in the response.
330
+
* @param toolChoice Controls which (if any) function is called by the model. Possible values are none, auto, and custom.
331
+
* If not specified, the default is auto.
332
+
* Example: auto
333
+
* @param customTool Forces the model to call a specific tool. This parameter is required when ToolChoice is set to custom.
334
+
* @param searchInfo If true, the interface will return SearchInfo when a search hit occurs. Example: false
335
+
* @param citation Enables or disables citation markers in the response.
336
+
* This parameter works in conjunction with EnableEnhancement and SearchInfo.
337
+
* If true, search results in the response will be marked with a citation marker corresponding to links in the SearchInfo list.
338
+
* If not specified, the default is false.
339
+
* Example: false
340
+
* @param enableSpeedSearch Enables or disables the fast version of search.
341
+
* If true and a search hit occurs, the fast version of search will be used, which can reduce the latency of the first character in the stream.
342
+
* Example: false
343
+
* @param enableMultimedia Enables or disables multimedia capabilities.
344
+
* This parameter is effective only for whitelisted users and when EnableEnhancement is true and EnableSpeedSearch is false.
345
+
* For hunyuan-lite, this parameter is ineffective.
346
+
* If not specified, the default is false.
347
+
* When enabled and a multimedia hit occurs, the corresponding multimedia address will be output.
348
+
* Example: false
349
+
* @param enableDeepSearch Enables or disables deep research on the question.
350
+
* If true and a deep research hit occurs, information about the deep research will be returned.
351
+
* Example: false
352
+
* @param seed Ensures the model's output is reproducible.
353
+
* The value should be a non-zero positive integer, with a maximum value of 10000.
354
+
* It is not recommended to use this parameter unless necessary, as improper values can affect the output quality.
355
+
* Example: 1
356
+
* @param forceSearchEnhancement Forces the use of AI search.
357
+
* If true, AI search will be used, and if the AI search result is empty, the large model will provide a fallback response.
358
+
* Example: false
359
+
* @param enableRecommendedQuestions Enables or disables the recommendation of additional questions.
360
+
* If true, the response will include a RecommendedQuestions field with up to 3 recommended questions in the last package.
361
+
* Example: false
328
362
*/
329
363
@JsonInclude(Include.NON_NULL)
330
364
publicrecordChatCompletionRequest(
@@ -346,7 +380,7 @@ public record ChatCompletionRequest(
Copy file name to clipboardExpand all lines: models/spring-ai-hunyuan/src/main/java/org/springframework/ai/hunyuan/api/HunYuanStreamFunctionCallingHelper.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@
28
28
* Helper class to support Streaming function calling. It can merge the streamed
29
29
* ChatCompletionChunk in case of function calling message.
Copy file name to clipboardExpand all lines: models/spring-ai-hunyuan/src/test/java/org/springframework/ai/hunyuan/HunYuanChatCompletionRequestTest.java
0 commit comments