wuomzfx / pdfgpt Goto Github PK
View Code? Open in Web Editor NEW基于 openai api 的超长 PDF 解析服务
基于 openai api 的超长 PDF 解析服务
控制台代理方法:export http_proxy=http://127.0.0.1:1092;export https_proxy=http://127.0.0.1:1092;
添加代理就会直接返回400,不加又不能访问,请问有什么好的方案吗?
data: '<html>\r\n' +
'<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>\r\n' +
'<body>\r\n' +
'<center><h1>400 Bad Request</h1></center>\r\n' +
'<center>The plain HTTP request was sent to HTTPS port</center>\r\n' +
'<hr><center>nginx</center>\r\n' +
'</body>\r\n' +
'</html>\r\n'
/usr/local/bin/npm run ask
[email protected] ask
node ./scripts/ask
AI 正在努力回答您的问题『语言能力完全丧失或严重咀嚼吞咽功能障碍:』,请稍作等待...
./pdfGPT-main/utils/ask.js:13
const kList = knowledgeEmbeddings.map((knowledge, index) => {
^
TypeError: knowledgeEmbeddings.map is not a function
at getKnowledge (./pdfGPT-main/utils/ask.js:13:37)
at ask (./pdfGPT-main/utils/ask.js:39:21)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async askQuestion (./pdfGPT-main/index.js:21:18)
at async ./pdfGPT-main/scripts/ask.js:9:5
Node.js v18.15.0
Process finished with exit code 1
Warning: Bad value, for key "Trapped", in Info: false.
node:fs:601
handleErrorFromBinding(ctx);
^
Error: ENOENT: no such file or directory, open './pdfGPT-main/cache/files/e_2018_summary.json'
在运行这个代码的时候出现了如下的错误,想问您这个如何解决
ReferenceError: structuredClone is not defined
at LoopbackPort.postMessage (/Users/yanhui/code/pdfGPT-main/node_modules/pdfjs-dist/build/pdf.js:1709:13)
at MessageHandler.sendWithPromise (/Users/yanhui/code/pdfGPT-main/node_modules/pdfjs-dist/build/pdf.js:7779:19)
at _fetchDocument (/Users/yanhui/code/pdfGPT-main/node_modules/pdfjs-dist/build/pdf.js:1067:48)
at /Users/yanhui/code/pdfGPT-main/node_modules/pdfjs-dist/build/pdf.js:1026:29
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.