Skip to content
New issue

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

创建训练订单出错 #1928

Closed
dreamfly32 opened this issue Jul 3, 2024 · 4 comments
Closed

创建训练订单出错 #1928

dreamfly32 opened this issue Jul 3, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@dreamfly32
Copy link

版本:v4.8.5
部分代码:

api_key='fastgpt-hSp'
headers = {
    "Authorization": f'Bearer {api_key}',
    'Content-Type':'application/json'
}

def create_order():
    url=f'{base_url}/support/wallet/usage/createTrainingUsage'
    body={'name':'test.docx'}
    r=requests.post(url,json=body,headers=headers)
    print(r.text)

报错:{"code":501000,"statusText":"unAuthDataset","message":"core.dataset.error.unAuthDataset","data":null}

api_key是对的,其他接口能用,换应用的api_key也是这个提示

@dreamfly32 dreamfly32 added the bug Something isn't working label Jul 3, 2024
@c121914yu
Copy link
Collaborator

image

我试了试,没发现问题

@dreamfly32
Copy link
Author

image 我试了试,没发现问题

看你截图才知道要加datasetID参数,文档上没写,https://doc.fastgpt.in/docs/development/openapi/dataset/#%E8%8E%B7%E5%8F%96%E9%9B%86%E5%90%88%E5%88%97%E8%A1%A8

@c121914yu
Copy link
Collaborator

c121914yu commented Jul 4, 2024

更新下 #1947

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants