Open wangyf2001 opened 1 year ago
这个错误一般是网络异常导致,可以切换下网络再试试。
这个错误一般是网络异常导致,可以切换下网络再试试。
感谢您的回复,切换了网络之后还是一样的错误
request error: AxiosError [AggregateError]
at AxiosError.from (file:///Users/ocewang/Downloads/ChatDOC-API-Demo-main/node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/core/AxiosError.js:89:14)
at RedirectableRequest.handleRequestError (file:///Users/ocewang/Downloads/ChatDOC-API-Demo-main/node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/adapters/http.js:591:25)
at RedirectableRequest.emit (node:events:527:35)
at eventHandlers.
请问你设置代理或者防火墙了吗?把这些关掉再试试
请问你设置代理或者防火墙了吗?把这些关掉再试试
代理防火墙均已关闭,还是相同错误
你的命令行窗口应该有具体的报错信息,方便发一下,看一下请求的API_KEY以及API path信息
你的命令行窗口应该有具体的报错信息,方便发一下,看一下请求的API_KEY以及API path信息
imported.
request error: AxiosError [AggregateError]
at AxiosError.from (file:///Users/ocewang/Downloads/ChatDOC-API-Demo-main/node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/core/AxiosError.js:89:14)
at RedirectableRequest.handleRequestError (file:///Users/ocewang/Downloads/ChatDOC-API-Demo-main/node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/adapters/http.js:591:25)
at RedirectableRequest.emit (node:events:527:35)
at eventHandlers.
[Symbol(kBufferedValue)]: null
},
_events: [Object: null prototype] {
response: [Function: handleResponse],
error: [Function: handleRequestError],
socket: [Array]
},
_eventsCount: 3,
_maxListeners: undefined,
_options: {
maxRedirects: 21,
maxBodyLength: Infinity,
protocol: 'http:',
path: '/undefined/api/v2/documents/upload',
method: 'POST',
headers: [Object: null prototype],
agents: [Object],
auth: undefined,
family: undefined,
lookup: undefined,
beforeRedirect: [Function: dispatchBeforeRedirect],
beforeRedirects: [Object],
hostname: 'localhost',
port: '',
agent: undefined,
nativeProtocols: [Object],
pathname: '/undefined/api/v2/documents/upload'
},
_ended: false,
_ending: false,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 131231,
_requestBodyBuffers: [ [Object], [Object], [Object] ],
_onNativeResponse: [Function (anonymous)],
_currentRequest: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: false,
chunkedEncoding: false,
shouldKeepAlive: true,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: '2248729',
_hasBody: true,
_trailer: '',
finished: false,
_headerSent: true,
_closed: false,
_header: 'POST /undefined/api/v2/documents/upload HTTP/1.1\r\n' +
'Accept: application/json, text/plain, */*\r\n' +
'Content-Type: multipart/form-data; boundary=--------------------------094104359771674959281698\r\n' +
'Authorization: Bearer \r\n' +
'User-Agent: axios/1.4.0\r\n' +
'Content-Length: 2248729\r\n' +
'Accept-Encoding: gzip, compress, deflate, br\r\n' +
'Host: localhost\r\n' +
'Connection: keep-alive\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: '/undefined/api/v2/documents/upload',
_ended: false,
res: null,
aborted: false,
timeoutCb: [Function: emitRequestTimeout],
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'localhost',
protocol: 'http:',
_redirectable: [Circular *1],
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: true,
[Symbol(corked)]: 0,
[Symbol(kChunkedBuffer)]: [],
[Symbol(kChunkedLength)]: 0,
[Symbol(kSocket)]: [Socket],
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(errored)]: null,
[Symbol(kHighWaterMark)]: 16384,
[Symbol(kRejectNonStandardBodyWrites)]: false,
[Symbol(kUniqueHeaders)]: null
},
_currentUrl: 'http://localhost/undefined/api/v2/documents/upload',
_timeout: null,
[Symbol(kCapture)]: false
}, cause: AggregateError at internalConnectMultiple (node:net:1114:18) at afterConnectMultiple (node:net:1667:5) { code: 'ECONNREFUSED', [errors]: [ [Error], [Error] ] } } 这是全部的报错信息
是API_KEY没有设置对,
是API_KEY没有设置对,
设置之后上传仍有问题
是API_KEY没有设置对,
或者能否提供一个使用python,借助APIkey返回结果的方式
api.chatdoc.com这个地址需要代理才能访问,没有代理的话,建议将env.mjs文件中API_HOST的地址换成.site
的
.....
} else {
API_HOST = 'https://api.chatdoc.com';
}
}
改成
.....
} else {
API_HOST = 'https://api.chatdoc.site';
}
}
api.chatdoc.com这个地址需要代理才能访问,没有代理的话,建议将env.mjs文件中API_HOST的地址换成
.site
的..... } else { API_HOST = 'https://api.chatdoc.com'; } }
改成
..... } else { API_HOST = 'https://api.chatdoc.site'; } }
请问有简洁的使用python请求接口的代码吗?
api.chatdoc.com这个地址需要代理才能访问,没有代理的话,建议将env.mjs文件中API_HOST的地址换成
.site
的..... } else { API_HOST = 'https://api.chatdoc.com'; } }
改成
..... } else { API_HOST = 'https://api.chatdoc.site'; } }
请问有简洁的使用python请求接口的代码吗?
目前没有,这是API的文档链接https://api-reference.paodingjiewen.com/
api.chatdoc.com 예시프정착이 필요하다고, 안녕하세요, 임시가없는env.mjs 파일의API_HOST 주소를
.site
다음으로로바꾸는 것이 좋습니다...... } else { API_HOST = 'https://api.chatdoc.com'; } }
로변경
..... } else { API_HOST = 'https://api.chatdoc.site'; } }
Python 터페이스를 사용하기 위해 간결한 코드가 있습니까?
I'm facing the same issue. Has it been resolved by any chance?
request error: AxiosError [AggregateError] at AxiosError.from (file:///Users/ocewang/Downloads/ChatDOC-API-Demo-main/node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/core/AxiosError.js:89:14) at RedirectableRequest.handleRequestError (file:///Users/ocewang/Downloads/ChatDOC-API-Demo-main/node_modules/.pnpm/axios@1.4.0/node_modules/axios/lib/adapters/http.js:591:25) at RedirectableRequest.emit (node:events:527:35) at eventHandlers. (/Users/ocewang/Downloads/ChatDOC-API-Demo-main/node_modules/.pnpm/follow-redirects@1.15.2/node_modules/follow-redirects/index.js:14:24)
at ClientRequest.emit (node:events:515:28)
at Socket.socketErrorListener (node:_http_client:495:9)
at Socket.emit (node:events:515:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'ECONNREFUSED',
errors: [
Error: connect ECONNREFUSED ::1:80
at createConnectionError (node:net:1634:14)
at afterConnectMultiple (node:net:1664:40) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 80
},
Error: connect ECONNREFUSED 127.0.0.1:80
at createConnectionError (node:net:1634:14)
at afterConnectMultiple (node:net:1664:40) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 80
}