We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
有些时候流式需要使用 Bearer token进行校验,但XRequest中提供的自定义fetch,使用起来XRequestCallbacks监测不到,如果要实现带入token如下段代码
const AIRequest = XRequest({ fetch: ()=>fetch('BASE_URL + PATH', { method:'POST', body: JSON.stringify({text:'hello'}), headers: { 'Authorization': `Bearer ${getCookie('access_token')}`, "Content-Type": "application/json" }, }), });
希望改进为
const AIRequest = XRequest({ baseURL: BASE_URL + PATH, model: MODEL, baseURL:'https://???????', headers: { 'Authorization': `Bearer ${getCookie('access_token')}`, "Content-Type": "application/json" }, });
The text was updated successfully, but these errors were encountered:
使用起来XRequestCallbacks监测不到
这个问题应该不存在,可能我理解有误。请再详细补充说明下。
Sorry, something went wrong.
XRequest中提供的自定义fetch
fetch 感觉可以解决你的问题「配置请求头」。
fetch
No branches or pull requests
需求动机
提议的 API 是什么样的?
希望改进为
The text was updated successfully, but these errors were encountered: