File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
scripts/inference-providers/scripts Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,9 @@ const TASKS: PipelineType[] = [
2929const TASKS_EXTENDED = [ ...TASKS , "chat-completion" ] ;
3030const SPECS_REVISION = "main" ;
3131
32- const HEADERS = { Authorization : `Bearer ${ process . env . HF_TOKEN } ` } ;
32+ const HEADERS : Record < string , string > = process . env . HF_TOKEN
33+ ? { Authorization : `Bearer ${ process . env . HF_TOKEN } ` }
34+ : { } ;
3335
3436const PROVIDERS_HUB_ORGS : Record < string , string > = {
3537 cerebras : "cerebras" ,
@@ -510,12 +512,10 @@ async function fetchWarmModels(
510512 inferenceProviderMapping : Record < string , string > [ ] ;
511513 tags : string [ ] ;
512514 } [ ] ;
513- if ( modelsData . length === 0 || modelsData [ 0 ] === undefined ) {
515+ if ( modelsData . length === 0 ) {
514516 console . warn (
515517 ` ⚠️ No warm model found for ${ task } from ${ provider } `
516518 ) ;
517- console . log ( modelsData ) ;
518- console . log ( "cancel early" ) ;
519519 return ;
520520 }
521521
You can’t perform that action at this time.
0 commit comments