File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/Cnblogs.Extensions.AI.DashScope Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -48,11 +48,12 @@ public async Task<ChatCompletion> CompleteAsync(
4848 ChatOptions ? options = null ,
4949 CancellationToken cancellationToken = default )
5050 {
51+ var modelId = options ? . ModelId ?? _modelId ;
5152 var useVlRaw = options ? . AdditionalProperties ? . GetValueOrDefault ( "useVl" ) ? . ToString ( ) ;
5253 var useVl = string . IsNullOrEmpty ( useVlRaw )
53- ? chatMessages . Any ( c => c . Contents . Any ( m => m is ImageContent ) )
54+ ? modelId . Contains ( "qwen-vl" , StringComparison . OrdinalIgnoreCase )
55+ || chatMessages . Any ( c => c . Contents . Any ( m => m is ImageContent ) )
5456 : string . Equals ( useVlRaw , "true" , StringComparison . OrdinalIgnoreCase ) ;
55- var modelId = options ? . ModelId ?? _modelId ;
5657 if ( useVl )
5758 {
5859 var response = await _dashScopeClient . GetMultimodalGenerationAsync (
You can’t perform that action at this time.
0 commit comments