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]: Can't update token usage for ***/EMBEDDING #239

Closed
Yang-HangWA opened this issue Apr 7, 2024 · 3 comments
Closed

[Question]: Can't update token usage for ***/EMBEDDING #239

Yang-HangWA opened this issue Apr 7, 2024 · 3 comments
Labels
question Further information is requested

Comments

@Yang-HangWA
Copy link

Describe your problem

  • The info in ERROR.log as follows:
Fail put 29f4f2dcf21b11ee97630242c0a80006/AcademicGPT.pdf: S3 operation failed; code: NoSuchBucket, message: The specified bucket does not exist, resource: /29f4f2dcf21b11ee97630242c0a80006, request_id: 17C2EC907DD3BC46, host_id: dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8, bucket_name: 29f4f2dcf21b11ee97630242c0a80006
Can't update token usage for d11309c4f0c111eea3da0242ac150005/EMBEDDING
Object of type ndarray is not JSON serializable
Traceback (most recent call last):
  File "/ragflow/api/apps/conversation_app.py", line 172, in completion
    ans = chat(dia, msg, **req)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/ragflow/api/apps/conversation_app.py", line 215, in chat
    kbinfos = retrievaler.retrieval(" ".join(questions), embd_mdl, dialog.tenant_id, dialog.kb_ids, 1, dialog.top_n,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ragflow/rag/nlp/search.py", line 314, in retrieval
    sres = self.search(req, index_name(tenant_id), embd_mdl)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ragflow/rag/nlp/search.py", line 115, in search
    es_logger.info("【Q】: {}".format(json.dumps(s)))
                                    ^^^^^^^^^^^^^
  File "/root/miniconda3/envs/py11/lib/python3.11/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
          ^^^^^^^^^^^
  File "/root/miniconda3/envs/py11/lib/python3.11/json/encoder.py", line 200, in encode
    chunks = self.iterencode(o, _one_shot=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/py11/lib/python3.11/json/encoder.py", line 258, in iterencode
    return _iterencode(o, 0)
           ^^^^^^^^^^^^^^^^^
  File "/ragflow/api/utils/__init__.py", line 128, in default
    return json.JSONEncoder.default(self, obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/py11/lib/python3.11/json/encoder.py", line 180, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type ndarray is not JSON serializable
Can't update token usage for d11309c4f0c111eea3da0242ac150005/EMBEDDING
Object of type ndarray is not JSON serializable

How can I solved this?

@Yang-HangWA Yang-HangWA added the question Further information is requested label Apr 7, 2024
@KevinHuSh
Copy link
Collaborator

Pull the docker image again
docker pull infiniflow/ragflow:v1.0

@Yang-HangWA
Copy link
Author

Pull the docker image again docker pull infiniflow/ragflow:v1.0

I build the image by myself, something wrong?

@KevinHuSh
Copy link
Collaborator

Pull the docker image again docker pull infiniflow/ragflow:v1.0

I build the image by myself, something wrong?

git pull and build again

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

No branches or pull requests

2 participants