/chatroles-vdb

vector db for roles.chat

Primary LanguagePythonMIT LicenseMIT

title emoji colorFrom colorTo sdk sdk_version python_version app_file pinned license
Chatroles Vdb
🦀
blue
pink
gradio
3.33.1
3.10.6
app.py
false
mit

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

local test

run the app:

python3 app.py

visit site at: http://127.0.0.1:7860

upsert API call

curl -X POST -H 'Content-type: application/json' --data '{ "data": ["Jill111", { "meta": { "id": "Jill111" }, "content": {"goal": "for test", "skills": [ "for test skills 10 chars least." ] } }] }' http://127.0.0.1:7860/run/predict

search API call

curl -X POST -H 'Content-type: application/json' --data '{ "data": [{"goal": "for test", "skills": [ "for test skills 10 chars least." ] }, 3] }' http://127.0.0.1:7860/run/predict_1

embed text array to vectors

curl -X POST -H 'Content-type: application/json' --data '{ "data": [["Jill","haha"]] }' https://127.0.0.1:7860/run/predict_2

online test

curl -X POST -H 'Content-type: application/json'  -H 'Authorization: Bearer xxxxxxx' --data '{ "data": ["Jill1", { "meta": {"id":"Jill1", "nick":"erer"}, "content": {"goal": "for test", "skills": [ "for test skills 10 chars least." ] } }] }' https://thisis-it-chatroles-vdb.hf.space/run/predict
curl -X POST -H 'Content-type: application/json'  -H 'Authorization: Bearer xxxxxxx' --data '{ "data": [{"goal": "for test", "skills": [ "for test skills 10 chars least." ] }, 3] }' https://thisis-it-chatroles-vdb.hf.space/run/predict_1

gradio interface

https://huggingface.co/spaces/thisis-it/chatroles-vdb