Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit42fdf38

Browse files
authored
fix: do not pass Authorization header when authMethod is none (huggingface#1566)
1 parentd8b6a3d commit42fdf38

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎packages/inference/src/providers/providerHelper.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ export abstract class TaskProviderHelper {
115115
* Prepare the headers for the request
116116
*/
117117
prepareHeaders(params:HeaderParams,isBinary:boolean):Record<string,string>{
118-
constheaders:Record<string,string>={Authorization:`Bearer${params.accessToken}`};
118+
constheaders:Record<string,string>={};
119+
if(params.authMethod!=="none"){
120+
headers["Authorization"]=`Bearer${params.accessToken}`;
121+
}
119122
if(!isBinary){
120123
headers["Content-Type"]="application/json";
121124
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp