gpt4 book ai didi

angular - 批处理图形 API 中的 InvalidRequest

转载 作者:行者123 更新时间:2023-12-03 07:02:53 25 4
gpt4 key购买 nike

我在一次 HTTP 调用中合并请求时遇到错误。我已经按照Here的官方文档进行了操作

我收到这个错误

enter image description here

工作流程

  1. 加载已登录 MS 用户的所有 MS 聊天记录
  2. 循环组合 20 个请求并调用批处理 API
  3. 我有时会遇到上述错误

请提供一些建议

谢谢

最佳答案

您可以遵循的解决方法之一:基于给定的MS DOC我们已经尝试使用microsoft graph api并测试成功。

我们已尝试使用以下请求正文给出的 MS DOC 示例;

{
"requests": [
{
"id": "1",
"method": "GET",
"url": "/me/drive/root:/{file}:/content"
},
{
"id": "2",
"method": "GET",
"url": "/me/planner/tasks"
},
{
"id": "3",
"method": "GET",
"url": "/groups/{id}/events"
},
{
"id": "4",
"url": "/me",
"method": "PATCH",
"body": {
"city": "Redmond"
},

"headers": {
"Content-Type": "application/json"
}
}
]
}

在请求 header 中,我们添加了键值并运行查询,如下所示:

enter image description here

注意:- 在进行 API 调用时,请确保请求正文中的格式正确。

有关更多信息,请参阅以下链接:-

关于angular - 批处理图形 API 中的 InvalidRequest,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72025212/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com