Closed scrollHeart closed 1 year ago
Hi @scrollHeart sorry for the late response
I have made a major refactor of the code, fixing many issues and moving from flask to fastapi, if you are still interested please consider running git fetch to update your code to the latest version and try following the steps in the README to run the app.
Also consider using the web app www.dara.chat, it has some features and optimizations that are not open source yet. Thanks for trying it!
/reply:500 INTERNAL SERVER ERROR python3.10.8
IndexError: single positional indexer is out-of-bounds 127.0.0.1 - - [23/Apr/2023 21:27:44] "GET /static/css/styles.css HTTP/1.1" 304 - 127.0.0.1 - - [23/Apr/2023 21:27:53] "POST /reply HTTP/1.1" 500 - Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/flask/app.py", line 2551, in call return self.wsgi_app(environ, start_response) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/flask/app.py", line 2531, in wsgi_app response = self.handle_exception(e) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/flask_cors/extension.py", line 165, in wrapped_function return cors_after_request(app.make_response(f(*args, *kwargs))) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/flask/app.py", line 2528, in wsgi_app response = self.full_dispatch_request() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/flask/app.py", line 1825, in full_dispatch_request rv = self.handle_user_exception(e) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/flask_cors/extension.py", line 165, in wrapped_function return cors_after_request(app.make_response(f(args, kwargs))) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/flask/app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(view_args) File "/Users/v_sunyanyun/Desktop/researchgpt/main-local.py", line 181, in reply prompt = chatbot.create_prompt(df, query) File "/Users/v_sunyanyun/Desktop/researchgpt/main-local.py", line 112, in create_prompt result = self.search_embeddings(df, user_input, n=3) File "/Users/v_sunyanyun/Desktop/researchgpt/main-local.py", line 107, in search_embeddings sources.append({'Page '+str(results.iloc[i]['page']): results.iloc[i]['text'][:150]+'...'}) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pandas/core/indexing.py", line 1103, in getitem return self._getitem_axis(maybe_callable, axis=axis) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pandas/core/indexing.py", line 1656, in _getitem_axis self._validate_integer(key, axis) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pandas/core/indexing.py", line 1589, in _validate_integer raise IndexError("single positional indexer is out-of-bounds") IndexError: single positional indexer is out-of-bounds