@@ -32,18 +32,13 @@ npm install colivara-ts
32
32
``` python
33
33
from colivara_py import ColiVara
34
34
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" )
41
36
42
37
# Upload a document to the default_collection
43
38
document = client.upsert_document(
44
39
name = " sample_document" ,
45
40
# 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" ,
47
42
# optional - add metadata
48
43
metadata = {" author" : " John Doe" },
49
44
# optional - specify a collection
@@ -66,7 +61,7 @@ const document = await client.upsertDocument({
66
61
// optional - specify a collection
67
62
collection_name: ' user_1_collection' ,
68
63
// 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' ,
70
65
// optional - wait for the document to index. Webhooks are also supported.
71
66
wait: true ,
72
67
// optional - add metadata
0 commit comments