Skip to content

Commit 48a212c

Browse files
committed
update readme
1 parent a003517 commit 48a212c

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

readme.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,13 @@ npm install colivara-ts
3232
```python
3333
from colivara_py import ColiVara
3434

35-
client = ColiVara(
36-
# this is the default and can be omitted
37-
api_key=os.environ.get("COLIVARA_API_KEY"),
38-
# this is the default and can be omitted
39-
base_url="https://api.colivara.com"
40-
)
35+
client = ColiVara(api_key="your_api_key")
4136

4237
# Upload a document to the default_collection
4338
document = client.upsert_document(
4439
name="sample_document",
4540
# You can use a file path, base64 encoded file, or a URL
46-
url="https://example.com/sample.pdf",
41+
document_url="https://example.com/sample.pdf",
4742
# optional - add metadata
4843
metadata={"author": "John Doe"},
4944
# optional - specify a collection
@@ -66,7 +61,7 @@ const document = await client.upsertDocument({
6661
// optional - specify a collection
6762
collection_name: 'user_1_collection',
6863
// You can use a file path, base64 encoded file, or a URL
69-
url: 'https://example.com/sample.pdf',
64+
document_url: 'https://example.com/sample.pdf',
7065
// optional - wait for the document to index. Webhooks are also supported.
7166
wait: true,
7267
// optional - add metadata

0 commit comments

Comments
 (0)