Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行question_bot.py报错请问是哪里出问题了,安装了langchain-community依然报错 #326

Open
ATM006 opened this issue Feb 29, 2024 · 5 comments
Assignees

Comments

@ATM006
Copy link

ATM006 commented Feb 29, 2024

E:\jupyter\ERNIE-SDK\py311\Scripts\python.exe E:\jupyter\ERNIE-SDK\erniebot-agent\applications\eb-agent-qa-bot\question_bot.py --init=True --access-token xxxxxxxxxxxxxxxxxxxxxxxxxxxx
0%| | 0/8 [00:00<?, ?it/s]
Traceback (most recent call last):
File "E:\jupyter\ERNIE-SDK\py311\Lib\site-packages\erniebot\auth.py", line 85, in upsert_auth_token
auth_token = token_requestor()
^^^^^^^^^^^^^^^^^
File "E:\jupyter\ERNIE-SDK\py311\Lib\site-packages\erniebot\auth.py", line 172, in _request_auth_token
raise RuntimeError("Invalid API key or secret key")
RuntimeError: Invalid API key or secret key

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "E:\jupyter\ERNIE-SDK\erniebot-agent\applications\eb-agent-qa-bot\question_bot.py", line 99, in
agent = load_agent()
^^^^^^^^^^^^
File "E:\jupyter\ERNIE-SDK\erniebot-agent\applications\eb-agent-qa-bot\question_bot.py", line 67, in load_agent
init_db(faiss_name, faiss_name_module, embeddings)
File "E:\jupyter\ERNIE-SDK\erniebot-agent\applications\eb-agent-qa-bot\init_vector_db.py", line 93, in init_db
content_doc = load_md_files_to_doc(md_file_path, chunk_size, chunk_overlap)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\jupyter\ERNIE-SDK\erniebot-agent\applications\eb-agent-qa-bot\init_vector_db.py", line 75, in load_md_files_to_doc
splits[i].page_content = get_summary(splits[i].page_content)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\jupyter\ERNIE-SDK\erniebot-agent\applications\eb-agent-qa-bot\init_vector_db.py", line 24, in get_summary
summary = erniebot.ChatCompletion.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\jupyter\ERNIE-SDK\py311\Lib\site-packages\erniebot\resources\chat_completion.py", line 261, in create
resp = resource.create_resource(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\jupyter\ERNIE-SDK\py311\Lib\site-packages\erniebot\resources\abc\creatable.py", line 67, in create_resource
resp = self.request(
^^^^^^^^^^^^^
File "E:\jupyter\ERNIE-SDK\py311\Lib\site-packages\erniebot\resources\resource.py", line 144, in request
for attempt in retrying:
File "E:\jupyter\ERNIE-SDK\py311\Lib\site-packages\tenacity_init_.py", line 347, in iter
do = self.iter(retry_state=retry_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\jupyter\ERNIE-SDK\py311\Lib\site-packages\tenacity_init_.py", line 314, in iter
return fut.result()
^^^^^^^^^^^^
File "C:\Users\ThinkPad\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "C:\Users\ThinkPad\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures_base.py", line 401, in __get_result
raise self._exception
File "E:\jupyter\ERNIE-SDK\py311\Lib\site-packages\erniebot\resources\resource.py", line 146, in request
return self._request(
^^^^^^^^^^^^^^
File "E:\jupyter\ERNIE-SDK\py311\Lib\site-packages\erniebot\resources\resource.py", line 340, in _request
resp = self._backend.request(
^^^^^^^^^^^^^^^^^^^^^^
File "E:\jupyter\ERNIE-SDK\py311\Lib\site-packages\erniebot\backends\bce.py", line 71, in request
access_token = self._auth_manager.get_auth_token()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\jupyter\ERNIE-SDK\py311\Lib\site-packages\erniebot\auth.py", line 113, in get_auth_token
self._token = self._init_auth_token()
^^^^^^^^^^^^^^^^^^^^^^^
File "E:\jupyter\ERNIE-SDK\py311\Lib\site-packages\erniebot\auth.py", line 137, in _init_auth_token
token = self._update_cache(init=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\jupyter\ERNIE-SDK\py311\Lib\site-packages\erniebot\auth.py", line 144, in _update_cache
token, upserted = self._cache.upsert_auth_token(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\jupyter\ERNIE-SDK\py311\Lib\site-packages\erniebot\auth.py", line 87, in upsert_auth_token
raise errors.TokenUpdateFailedError from e
erniebot.errors.TokenUpdateFailedError

@w5688414
Copy link
Collaborator

请问您的erniebot-agent和erniebot的版本是多少?

@Southpika
Copy link
Contributor

您好 好像是没有输入正确的access-token~, 可以在个人中心的访问令牌页面获取用户凭证access token。

@JRYan888
Copy link

遇到了一样的问题,请问解决了吗

@JRYan888
Copy link

您好 好像是没有输入正确的access-token~, 可以在个人中心的访问令牌页面获取用户凭证access token。

我就是按照aistudio填写的,但还是会报错

@JRYan888
Copy link

JRYan888 commented Oct 18, 2024

请问您的erniebot-agent和erniebot的版本是多少?

我也遇到了一样的报错,版本号:
erniebot =0.0.0.dev0
erniebot-agent =0.0.0.dev0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants