Spaces:
Runtime error
Runtime error
fix: remove hf token from tool calling
Browse files
src/lib/server/tools/utils.ts
CHANGED
|
@@ -26,7 +26,9 @@ export async function* callSpace<TInput extends unknown[], TOutput extends unkno
|
|
| 26 |
}
|
| 27 |
}
|
| 28 |
const client = await CustomClient.connect(name, {
|
| 29 |
-
hf_token:
|
|
|
|
|
|
|
| 30 |
events: ["status", "data"],
|
| 31 |
});
|
| 32 |
|
|
|
|
| 26 |
}
|
| 27 |
}
|
| 28 |
const client = await CustomClient.connect(name, {
|
| 29 |
+
hf_token: ipToken // dont pass the hf token if we have an ip token
|
| 30 |
+
? undefined
|
| 31 |
+
: ((env.HF_TOKEN ?? env.HF_ACCESS_TOKEN) as unknown as `hf_${string}`),
|
| 32 |
events: ["status", "data"],
|
| 33 |
});
|
| 34 |
|