guaguaguaxia / weekly_report

简单描述工作内容,帮你生成完整周报
https://weeklyreport.avemaria.fun
3.15k stars 476 forks source link

部署到vercel后还是报错 #46

Closed dadaewqq closed 1 year ago

dadaewqq commented 1 year ago

大佬,因为某些原因,国内部署的api现在没法正常用,所以想着部署到vercel上,api也填好了,生成周报时,/api/generate报错500,着啥情况?

guaguaguaxia commented 1 year ago

你的key是有效的吗

dadaewqq commented 1 year ago

有效的 之前api是gpt3.0的时候就用这个项目部署过,同一个key,还有余额,现在不是换api了么,重新部署后就不行了

dadaewqq commented 1 year ago

应该不是key的问题,换了个key也不行。是我的部署过程出问题了么? 就是一键部署,填俩环境变量后直接访问是么?怎么感觉是边缘函数那块有点问题 大佬要不你自己部署一遍看你那边情况正常嘛😂

guaguaguaxia commented 1 year ago

好的好的,今晚或者周末看看,方便发一下你的网站吗

dadaewqq commented 1 year ago

感谢。这是我部署的 https://final-test-bice.vercel.app

guaguaguaxia commented 1 year ago

image 你的这个文件不知道为什么没生成,麻烦你看下Vercel的部署日志,看下能不能提供更多信息

sishuiwuxie commented 1 year ago
image
justseemore commented 1 year ago

deploy 用新的deploy链接, 丢失了OPENAI_MODEL 全局变量

guaguaguaxia commented 1 year ago

@hbyxzpf 昨天OpenAI发布了新模型 gpt-3.5-turbo,现在项目默认用这个模型了,如果你想换模型,可以根据我这个commit替换回去。https://github.com/guaguaguaxia/weekly_report/commit/505cb0fafe25e813d7199f17170dfe6b70d18c82

justseemore commented 1 year ago
image

@guaguaguaxia 你的代码目前是写死的.然后没有替换env.openai_model

justseemore commented 1 year ago
image

@guaguaguaxia 你的代码目前是写死的.然后没有替换env.openai_model

guaguaguaxia commented 1 year ago

@hbyxzpf 啊!我马上改,忘了这段要删掉了

dadaewqq commented 1 year ago

image 你的这个文件不知道为什么没生成,麻烦你看下Vercel的部署日志,看下能不能提供更多信息

Running build in Cleveland, USA (East) – cle1 -- 16:28:29.462 | Cloning github.com/dadaewqq/final-test (Branch: main, Commit: d374f99) 16:28:29.468 | Skipping build cache, deployment was triggered without cache. 16:28:30.538 | Cloning completed: 1.076s 16:28:30.639 | Running "vercel build" 16:28:31.075 | Vercel CLI 28.16.12 16:28:31.304 | Running "install" command: `npm install`... 16:28:37.515 |   16:28:37.516 | added 133 packages, and audited 134 packages in 6s 16:28:37.516 |   16:28:37.516 | found 0 vulnerabilities 16:28:37.531 | Detected Next.js version: 13.1.6 16:28:37.533 | Running "next build" 16:28:37.969 | Attention: Next.js now collects completely anonymous telemetry regarding usage. 16:28:37.969 | This information is used to shape Next.js' roadmap and prioritize features. 16:28:37.970 | You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: 16:28:37.970 | https://nextjs.org/telemetry 16:28:37.970 |   16:28:38.099 | info - Linting and checking validity of types... 16:28:41.330 | info - Creating an optimized production build... 16:28:49.602 | info - Compiled successfully 16:28:49.602 | info - Collecting page data... 16:28:54.769 | info - Generating static pages (0/8) 16:28:54.803 | Streamed response: 16:28:54.884 | Streamed response: 16:28:54.897 | info - Generating static pages (2/8) 16:28:54.902 | info - Generating static pages (4/8) 16:28:54.910 | info - Generating static pages (6/8) 16:28:54.914 | info - Generating static pages (8/8) 16:28:54.926 | info - Finalizing page optimization... 16:28:54.929 |   16:28:54.940 | Route (pages) Size First Load JS 16:28:54.940 | ┌ ● / 56.9 kB 146 kB 16:28:54.940 | ├ └ css/dda82d16106a7a17.css 348 B 16:28:54.940 | ├ /_app 0 B 89 kB 16:28:54.940 | ├ ○ /404 181 B 89.2 kB 16:28:54.940 | └ ℇ /api/generate 0 B 89 kB 16:28:54.940 | + First Load JS shared by all 97 kB 16:28:54.940 | ├ chunks/framework-2c79e2a64abdb08b.js 45.2 kB 16:28:54.941 | ├ chunks/main-75b00bf34b20f48f.js 27.5 kB 16:28:54.941 | ├ chunks/pages/_app-8b0dba205b004522.js 15.5 kB 16:28:54.941 | ├ chunks/webpack-ee7e63bc15b31913.js 815 B 16:28:54.941 | └ css/e57e59bb8a07895f.css 8.01 kB 16:28:54.941 |   16:28:54.941 | ℇ (Streaming) server-side renders with streaming (uses React 18 SSR streaming or Server Components) 16:28:54.941 | ○ (Static) automatically rendered as static HTML (uses no initial props) 16:28:54.941 | ● (SSG) automatically generated as static HTML + JSON (uses getStaticProps) 16:28:54.941 |   16:28:56.335 | Traced Next.js server files in: 1.173s 16:28:56.901 | Created all serverless functions in: 563.461ms 16:28:56.941 | Collected static files (public/, static/, .next/static): 4.676ms 16:28:56.983 | Build Completed in /vercel/output [26s] 16:28:59.426 | Generated build outputs: 16:28:59.426 | - Static files: 29 16:28:59.427 | - Prerenders: 0 16:28:59.427 | - Serverless Functions: 0 16:28:59.427 | - Edge Functions: 1 16:28:59.427 | Deployed outputs in 2s 16:28:59.738 | Build completed 16:29:03.621 | Uploading build cache [62.80 MB]... 16:29:05.554 | Build cache uploaded: 1.933s

日志看不出来有啥问题 我发现我本地部署也没生成这个文件

guaguaguaxia commented 1 year ago

@dadaewqq 改好了,你再重新一键部署看看,或者看下我刚刚提交的代码,删掉这段:https://github.com/guaguaguaxia/weekly_report/commit/3c2bb7bfc0129264e5b39d53956d5b0dd548d0f8

dadaewqq commented 1 year ago

@dadaewqq 改好了,你再重新一键部署看看,或者看下我刚刚提交的代码,删掉这段:3c2bb7b

才学会看vercel的运行log,之前确实是报这个错,解决了,感谢