@@ -66,21 +66,21 @@ export async function makeRequestOptions(
6666 ? "hf-token"
6767 : "provider-key"
6868 : includeCredentials === "include"
69- ? "credentials-include"
70- : "none" ;
69+ ? "credentials-include"
70+ : "none" ;
7171
7272 const url = endpointUrl
7373 ? chatCompletion
7474 ? endpointUrl + `/v1/chat/completions`
7575 : endpointUrl
7676 : makeUrl ( {
77- authMethod,
78- chatCompletion : chatCompletion ?? false ,
79- forceTask,
80- model,
81- provider : provider ?? "hf-inference" ,
82- taskHint,
83- } ) ;
77+ authMethod,
78+ chatCompletion : chatCompletion ?? false ,
79+ forceTask,
80+ model,
81+ provider : provider ?? "hf-inference" ,
82+ taskHint,
83+ } ) ;
8484
8585 const headers : Record < string , string > = { } ;
8686 if ( accessToken ) {
@@ -134,9 +134,9 @@ export async function makeRequestOptions(
134134 body : binary
135135 ? args . data
136136 : JSON . stringify ( {
137- ...otherArgs ,
138- ...( chatCompletion || provider === "together" ? { model } : undefined ) ,
139- } ) ,
137+ ...otherArgs ,
138+ ...( chatCompletion || provider === "together" ? { model } : undefined ) ,
139+ } ) ,
140140 ...( credentials ? { credentials } : undefined ) ,
141141 signal : options ?. signal ,
142142 } ;
@@ -156,7 +156,8 @@ function mapModel(params: {
156156 if ( ! params . taskHint ) {
157157 throw new Error ( "taskHint must be specified when using a third-party provider" ) ;
158158 }
159- const task : WidgetType = params . taskHint === "text-generation" && params . chatCompletion ? "conversational" : params . taskHint ;
159+ const task : WidgetType =
160+ params . taskHint === "text-generation" && params . chatCompletion ? "conversational" : params . taskHint ;
160161 const model = ( ( ) => {
161162 switch ( params . provider ) {
162163 case "fal-ai" :
0 commit comments