File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
src/main/java/com/alibaba/dashscope/aigc/generation Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -109,12 +109,14 @@ public static void streamCallWithSearchOptions()
109109 .prompt ("联网搜索明天杭州天气如何?" )
110110 .enableSearch (true )
111111 .resultFormat ("message" )
112+ .incrementalOutput (true )
112113 .searchOptions (SearchOptions .builder ()
113114 .enableSource (true )
114115 .enableCitation (true )
115116 .citationFormat ("[ref_<number>]" )
116117 .searchStrategy ("pro_max" )
117118 .forcedSearch (true )
119+ .prependSearchResult (true )
118120 .build ())
119121 .build ();
120122 Flowable <GenerationResult > result = gen .streamCall (param );
Original file line number Diff line number Diff line change @@ -33,4 +33,13 @@ public class SearchOptions {
3333 /** 搜索互联网信息的数量。standard:在请求时搜索5条互联网信息; pro:在请求时搜索10条互联网信息。 默认值为standard */
3434 @ SerializedName ("search_strategy" )
3535 private String searchStrategy ;
36+
37+ /**
38+ * Whether the first data packet in streaming output contains only
39+ * search source information. Only effective when enable_source is
40+ * true and in streaming mode. Default is false.
41+ */
42+ @ SerializedName ("prepend_search_result" )
43+ @ Builder .Default
44+ private Boolean prependSearchResult = null ;
3645}
You can’t perform that action at this time.
0 commit comments