Errors when cloning?

#1
by bk-ignite - opened

Hey @ofermend

When I try to clone the space, I'm getting the error below. Please advise?

Query failed with code 400, reason Bad Request, text {"code":3, "message":"proto: (line 1:88): invalid value for uint32 type: \"\\\"118855638\\\"\"", "details":[]}
Query failed with code 400, reason Bad Request, text {"code":3, "message":"proto: (line 1:96): invalid value for uint32 type: \"\\\"118855638\\\"\"", "details":[]}
Vectara org

Hey @bk-ignite
did you update the secrets in your duplicate space to point to the correct account ID, corpus ID and API key?
Ofer

@ofermend Yes, I did. I've tried wrapping the secrets in quotation marks, as well as pasting them in without, is there a specific format?

Vectara org

It does seem from the error message like the account ID is in quotes. Can you please check again just in case?
Is this you account ID: 118855638 ?

Vectara org

Also - I've made some refinement to the code in this new space: https://huggingface.co./spaces/vectara/physics-bot
Can you pls check if duplicating this space (and updating with your corpus/account/API key) behaves any different?

@ofermend I cloned the physics bot and can confirm that when I enter the values for the API Key, Account ID, & Corpus ID I simply enter the values without quotation marks or anything else.

When I try to say anything to the cloned physics-bot I received:

TypeError: 'NoneType' object is not subscriptable
Traceback:
File "/home/user/.local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "/home/user/app/app.py", line 76, in
launch_bot()
File "/home/user/app/app.py", line 70, in launch_bot
response = generate_response(prompt)
File "/home/user/app/app.py", line 13, in generate_response
response = vq.submit_query(question)
File "/home/user/app/query.py", line 83, in submit_query
if chat['status'] != None:

If I enter a clearly invalid API key I receive a different error

Query failed with code 401, reason Unauthorized, text {"code":16, "message":"API Key is invalid.", "details":[]}

Vectara org

Ok thanks. Can you please try this now?

  • Under files click on "query.py" and then click "edit".
  • Line 75 should say "res = response.json()". Add in line 76: "print(body)" and then another line "print(res)".
    (it should then continue as usual with "top_k = 10" that comes after that.)

Then please try to re-run and let me know what the was printed in the log (don't forget to not include API key or other credentials)

Vectara org

Any updates on this?

Sign up or log in to comment