yokonsan / midjourney-api

midjourney in discord api.
809 stars 180 forks source link

调用文生图没收到回调信息 #96

Closed lindeqian1994 closed 10 months ago

lindeqian1994 commented 10 months ago

问题简述

INFO: 113.215.99.44:53941 - "POST /v1/api/trigger/imagine HTTP/1.1" 200 OK 2023-11-23 16:41:40 | DEBUG | 19926-140367270946624 | "/www/wwwroot/mjapi/midjourney-api/util/fetch.py:47":fetch - Fetch: https://discord.com/api/v9/interactions, {'data': '{"type": 2, "application_id": "XXX", "guild_id": "XXX", "channel_id": "XXX", "session_id": "XXX", "data": {"version": "1166847114203123795", "id": "XXX", "name": "imagine", "type": 1, "options": [{"type": 3, "name": "prompt", "value": "<#XXX#>a cute cat"}], "attachments": []}}'}

复现方式

接口文档测试 promot { "prompt": "a cute cat" }

环境信息

额外信息

No response

一点点的自我检查

lindeqian1994 commented 10 months ago

fetch.py 打印出来的结果 2023-11-23 17:20:30 | DEBUG | 24493-140549848323904 | "/www/wwwroot/mjapi/midjourney-api/util/fetch.py:50":fetch - 10086:<ClientResponse(https://discord.com/api/v9/interactions) [400 Bad Request]> <CIMultiDictProxy('Date': 'Thu, 23 Nov 2023 09:20:30 GMT', 'Content-Type': 'application/json', 'Content-Length': '54', 'Connection': 'keep-alive', 'Set-Cookie': 'dcfduid=8bc8f6a489e111ee9eb8cecf5dc1a11f; Expires=Tue, 21-Nov-2028 09:20:30 GMT; Max-Age=157680000; Secure; HttpOnly; Path=/', 'strict-transport-security': 'max-age=31536000; includeSubDomains; preload', 'Via': '1.1 google', 'Alt-Svc': 'h3=":443"; ma=86400', 'CF-Cache-Status': 'DYNAMIC', 'Report-To': '{"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=oLPwmuy7rBm1IvHAUYSbkk86nUtYPeKwXnm3Zu0PD5CdtjPHohj9u1J0%2FvR91TRWdZMKGyHjJg7ifptyxHI%2BkdFqXFC%2FaVcV9L1gbD1p0kcFRiARFl5xYI56uS9z"}],"group":"cf-nel","max_age":604800}', 'NEL': '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}', 'X-Content-Type-Options': 'nosniff', 'Content-Security-Policy': "frame-ancestors 'none'; default-src 'none'", 'Set-Cookie': 'sdcfduid=8bc8f6a489e111ee9eb8cecf5dc1a11f4a520993ee33efd5532b1502a84e79b50b19f22176d318f21062131bdef3f152; Expires=Tue, 21-Nov-2028 09:20:30 GMT; Max-Age=157680000; Secure; HttpOnly; Path=/', 'Set-Cookie': '__cfruid=166cdb1a433ca951ca5bbc18c8440211057b5e52-1700731230; path=/; domain=.discord.com; HttpOnly; Secure; SameSite=None', 'Set-Cookie': '_cfuvid=jhUEzWj8IMyZnLuTvDGFW2mZ6e1p3aO5sm2qLP6hIJg-1700731230193-0-604800000; path=/; domain=.discord.com; HttpOnly; Secure; SameSite=None', 'Server': 'cloudflare', 'CF-RAY': '82a8562acd240970-HKG')>

lindeqian1994 commented 10 months ago

@yokonsan

aiup2u commented 8 months ago

我和你一样的错误。。。fetch - <ClientResponse(https://discord.com/api/v9/interactions) [400 Bad Request]> 咋解决的? @lindeqian1994 @yokonsan

stingoChen commented 7 months ago

@aiup2u 请问你解决了嘛