Comments (8)
前端网址端口应该是5000吧? 你是什么平台,linux?,看看包的版本之类的?
from chatie.
感谢回复,我是windows11,后端启动的时候,有个警告,但我觉得不是这个原因吧
: UserWarning: The current Python is not a recommended version, 3.10+ is recommended
import("warnings").warn(
- Serving Flask app "run" (lazy loading)
- Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
前端启动的界面:
hou后端的运行界面:
from chatie.
你现在前后端可以打通吗。能看看具体报错位置在哪行代码和原因吗。
from chatie.
老师!前端执行没问题,http://localhost:5000/,但clear那个按钮失效。后端一直就not found http://127.0.0.1:3000/ (Press CTRL+C to quit)。当我在前端输入一端文字的时候,就报出我上面截图的错误,完后在后端就有如下错误提示:
"{"sentence":"你好","type":"","access":"","task":"NER","lang":"chinese"}"
<class 'str'>
后端传入数据: {'sentence': '你好', 'type': '', 'access': '', 'task': 'NER', 'lang': 'chinese'}
127.0.0.1 - - [30/Apr/2024 11:13:34] "POST /api/v1/updateStaff HTTP/1.1" 500 -
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\Lib\site-packages\flask\app.py", line 2464, in call
return self.wsgi_app(environ, start_response)
File "C:\ProgramData\Anaconda3\Lib\site-packages\flask\app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "C:\ProgramData\Anaconda3\Lib\site-packages\flask\app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\ProgramData\Anaconda3\Lib\site-packages\flask_compat.py", line 39, in reraise
raise value
File "C:\ProgramData\Anaconda3\Lib\site-packages\flask\app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "C:\ProgramData\Anaconda3\Lib\site-packages\flask\app.py", line 1953, in full_dispatch_request
return self.finalize_request(rv)
File "C:\ProgramData\Anaconda3\Lib\site-packages\flask\app.py", line 1968, in finalize_request
response = self.make_response(rv)
File "C:\ProgramData\Anaconda3\Lib\site-packages\flask\app.py", line 2097, in make_response
raise TypeError(
TypeError: The view function did not return a valid response. The function either returned None or ended without a return statement.
在run.py代码中,我修改了静态模版和动态模版的路径,也没好使:app = Flask(name, template_folder='../front-end/public', static_folder='../front-end/src'),路径设置的有问题啊?
from chatie.
你的意思是前后端可以打通跑出结果,但是clear没用是吗?
这个问题我复现不出来,我之前试的windows上运行也是没问题的。
你看看修改一下port proxy之类的呢。还有你的port有没有开。
from chatie.
大佬,跑通了,呵呵!代码问题!
1.可能是我 npm install
之后,直接调试,导致不知名的错误,应该重启电脑,现开启前端,再开启后端。
2.易错的点是KEY,我是买的第三方的key, proxy代理,应该在您 openai.api_base 里面设置,而不是 openai.proxy里面设置。
3.关于clear 按钮,功能没问题,我理解错了,当我跑通了才知道他的作用,他是清理下面的显示,而不是清理输入框的信息。谢谢大佬回复,让我排除了问题!
from chatie.
from chatie.
大佬,跑通了,呵呵!代码问题! 1.可能是我
npm install
之后,直接调试,导致不知名的错误,应该重启电脑,现开启前端,再开启后端。 2.易错的点是KEY,我是买的第三方的key, proxy代理,应该在您 openai.api_base 里面设置,而不是 openai.proxy里面设置。 3.关于clear 按钮,功能没问题,我理解错了,当我跑通了才知道他的作用,他是清理下面的显示,而不是清理输入框的信息。谢谢大佬回复,让我排除了问题!
大佬,您的proxy怎么成功的?openai.api_base = "这里要填什么呀?" #或者利用反向代理openai.com(代理获取:https://github.com/justjavac/openai-proxy
(注释掉上面那句代码)
反向代理那个教程我只在deno 弄了一个域名,openai api的key我申请了,但是布吉岛怎么用,是填到df_access = []里面吗?(为啥列表要分成两块?)
您整体的流程是咋样的?我到现在还是跑不起来作者的这个项目
from chatie.
Related Issues (20)
- Note and solve: Rate Limit openai gpt-3.5-turbo HOT 2
- Incorrect API key HOT 1
- default openai account has expired HOT 1
- 为什么ChatIE在两个Du数据集上效果那么好呢? HOT 4
- unable to land demo http://124.221.16.143:5000/ HOT 3
- event detection performance on the ACE2005 dataset HOT 2
- 关于默认API key
- 关于API Key
- 如何接入ChatGLM呢 HOT 7
- DUIE2.0数据集问题
- proxy错误 HOT 1
- 请问里面的Accesss token和OpenAI的apikey是什么关系啊
- NER Evaluation
- 您好,图例中的命令在哪里运行呢,npm install在哪里呢 HOT 1
- 关于Vanilla Prompt HOT 3
- 关于prompt template HOT 5
- API问题 HOT 1
- access token问题 HOT 3
- 请问出现这个问题HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions 是什么原因 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.