Skip to content

Commit 2cddafc

Browse files
committed
update
1 parent c0039a5 commit 2cddafc

1 file changed

Lines changed: 32 additions & 12 deletions

File tree

README.md

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ pip3 install --upgrade pyepsilla
1414

1515
## Connect to Epsill Vector Database
1616

17-
### 1.1 Run epsilla vectordb on localhost
17+
#### Run epsilla vectordb on localhost
1818
```shell
1919
docker pull epsilla/vectordb
2020
docker run -d -p 8888:8888 epsilla/vectordb
2121
```
2222

23-
### 1.2 Use pyepsilla to connect to and interact with local vector database
23+
#### Use pyepsilla to connect to and interact with local vector database
2424

2525
```python
2626
from pyepsilla import vectordb
@@ -76,39 +76,59 @@ status_code, response = client.query(
7676
)
7777
print(response)
7878

79-
80-
8179
## delete records by primary_keys (and filter)
82-
# status_code, response = client.delete(table_name="MyTable", ids=[3])
8380
status_code, response = client.delete(table_name="MyTable", primary_keys=[3, 4])
84-
# status_code, response = client.delete(table_name="MyTable", filter="Doc <> 'San Francisco'")
81+
status_code, response = client.delete(table_name="MyTable", filter="Doc <> 'San Francisco'")
8582
print(response)
8683

8784

8885
## drop a table
89-
#client.drop_table("MyTable")
86+
client.drop_table("MyTable")
9087

9188
## unload a database from memory
92-
#client.unload_db("MyDB")
89+
client.unload_db("MyDB")
9390
```
9491

9592

9693
## Connect to Epsill Cloud
9794

98-
```python3
95+
#### Register and create vectordb on Epsilla Cloud
96+
https://cloud.epsilla.com
9997

98+
#### Use Epsilla Cloud module to connect with the vectordb
99+
Please check https://github.com/epsilla-cloud/epsilla-python-client/blob/main/examples/hello_epsilla_cloud.py for detail.
100+
```python3
100101
from pyepsilla import cloud
101102

102103
# Connect to Epsilla Cloud
103-
client = cloud.Client(project_id="32ef3a3f-****-****-****-************", api_key="epsilla*****")
104+
client = cloud.Client(project_id="32ef3a3f-****-****-****-************", api_key="eps_**********")
104105

105106
# Connect to Vectordb
106107
db = client.vectordb(db_id="df7431d0-****-****-****-************")
107-
108108
```
109-
Please check https://github.com/epsilla-cloud/epsilla-python-client/blob/main/examples/hello_epsilla_cloud.py for detail.
110109

111110

111+
## Connect to Epsill RAG
112+
113+
The resp will contains answer as well as contexts, like {"answer": "**", "contexts": ['context1','context2']}
114+
115+
```python3
116+
from pyepsilla import cloud
117+
118+
# Connect to Epsilla RAG
119+
client = cloud.RAG(
120+
project_id="ce07c6fc-****-****-b7bd-b7819f22bcff",
121+
api_key="eps_**********",
122+
ragapp_id="153a5a49-****-****-b2b8-496451eda8b5",
123+
conversation_id="6fa22a6a-****-****-b1c3-5c795d0f45ef",
124+
)
125+
126+
# Start a new conversation with RAG
127+
client.start_new_conversation()
128+
resp = client.query("What's RAG?")
129+
130+
print("[INFO] response is", resp)
131+
```
112132

113133

114134
## Contributing

0 commit comments

Comments
 (0)