usecortex-ai 0.2.1__py3-none-any.whl → 0.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- usecortex_ai/__init__.py +18 -3
- usecortex_ai/client.py +3 -0
- usecortex_ai/document/__init__.py +4 -0
- usecortex_ai/document/client.py +139 -0
- usecortex_ai/document/raw_client.py +312 -0
- usecortex_ai/embeddings/client.py +48 -78
- usecortex_ai/embeddings/raw_client.py +44 -74
- usecortex_ai/fetch/client.py +2 -2
- usecortex_ai/search/client.py +88 -84
- usecortex_ai/search/raw_client.py +82 -78
- usecortex_ai/sources/client.py +26 -157
- usecortex_ai/sources/raw_client.py +22 -501
- usecortex_ai/tenant/client.py +154 -6
- usecortex_ai/tenant/raw_client.py +502 -4
- usecortex_ai/types/__init__.py +16 -2
- usecortex_ai/types/add_user_memory_response.py +36 -0
- usecortex_ai/types/app_sources_upload_data.py +10 -2
- usecortex_ai/types/attachment_model.py +34 -7
- usecortex_ai/types/batch_upload_data.py +10 -2
- usecortex_ai/types/body_scrape_webpage_upload_scrape_webpage_post.py +0 -2
- usecortex_ai/types/body_update_scrape_job_upload_update_webpage_patch.py +0 -2
- usecortex_ai/types/content_model.py +33 -6
- usecortex_ai/types/delete_memory_request.py +14 -3
- usecortex_ai/types/delete_sources.py +20 -0
- usecortex_ai/types/delete_sub_tenant_data.py +42 -0
- usecortex_ai/types/delete_user_memory_response.py +31 -0
- usecortex_ai/types/embeddings_create_collection_data.py +19 -4
- usecortex_ai/types/embeddings_delete_data.py +19 -4
- usecortex_ai/types/embeddings_get_data.py +19 -4
- usecortex_ai/types/embeddings_search_data.py +19 -4
- usecortex_ai/types/error_response.py +0 -1
- usecortex_ai/types/fetch_content_data.py +19 -5
- usecortex_ai/types/file_upload_result.py +9 -2
- usecortex_ai/types/generate_user_memory_response.py +32 -0
- usecortex_ai/types/list_sources_response.py +14 -3
- usecortex_ai/types/list_user_memories_response.py +32 -0
- usecortex_ai/types/markdown_upload_request.py +23 -5
- usecortex_ai/types/processing_status.py +14 -3
- usecortex_ai/types/relations.py +9 -2
- usecortex_ai/types/retrieve_user_memory_response.py +32 -0
- usecortex_ai/types/search_chunk.py +54 -17
- usecortex_ai/types/single_upload_data.py +10 -2
- usecortex_ai/types/source.py +34 -15
- usecortex_ai/types/source_model.py +63 -14
- usecortex_ai/types/sub_tenant_ids_data.py +29 -5
- usecortex_ai/types/tenant_create_data.py +19 -4
- usecortex_ai/types/tenant_stats.py +24 -5
- usecortex_ai/types/user_memory.py +31 -0
- usecortex_ai/upload/client.py +486 -111
- usecortex_ai/upload/raw_client.py +458 -103
- usecortex_ai/user/client.py +30 -10
- usecortex_ai/user/raw_client.py +22 -6
- usecortex_ai/user_memory/client.py +200 -56
- usecortex_ai/user_memory/raw_client.py +921 -94
- {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.3.0.dist-info}/METADATA +1 -1
- usecortex_ai-0.3.0.dist-info/RECORD +101 -0
- usecortex_ai/types/source_content.py +0 -26
- usecortex_ai-0.2.1.dist-info/RECORD +0 -91
- {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.3.0.dist-info}/WHEEL +0 -0
- {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.3.0.dist-info}/licenses/LICENSE +0 -0
- {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.3.0.dist-info}/top_level.txt +0 -0
usecortex_ai/user/client.py
CHANGED
|
@@ -30,18 +30,25 @@ class UserClient:
|
|
|
30
30
|
self,
|
|
31
31
|
*,
|
|
32
32
|
tenant_id: typing.Optional[str] = None,
|
|
33
|
+
note: typing.Optional[str] = None,
|
|
33
34
|
tenant_metadata_schema: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT,
|
|
34
35
|
request_options: typing.Optional[RequestOptions] = None,
|
|
35
36
|
) -> TenantCreateData:
|
|
36
37
|
"""
|
|
37
|
-
Create a
|
|
38
|
+
Create a tenant for your account.
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
Use this endpoint to initialize a tenant space you can use for ingestion, embeddings, and search. Optionally include a metadata schema to enforce consistent attributes across documents.
|
|
41
|
+
|
|
42
|
+
Expected outcome
|
|
43
|
+
- A tenant is created and returned with its identifier.
|
|
44
|
+
- If the tenant already exists, you receive a success message with the existing identifier.
|
|
41
45
|
|
|
42
46
|
Parameters
|
|
43
47
|
----------
|
|
44
48
|
tenant_id : typing.Optional[str]
|
|
49
|
+
Unique identifier for the tenant/organization
|
|
50
|
+
|
|
51
|
+
note : typing.Optional[str]
|
|
45
52
|
|
|
46
53
|
tenant_metadata_schema : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]]
|
|
47
54
|
|
|
@@ -58,10 +65,13 @@ class UserClient:
|
|
|
58
65
|
from usecortex-ai import CortexAI
|
|
59
66
|
|
|
60
67
|
client = CortexAI(token="YOUR_TOKEN", )
|
|
61
|
-
client.user.create_tenant()
|
|
68
|
+
client.user.create_tenant(note='<str>', )
|
|
62
69
|
"""
|
|
63
70
|
_response = self._raw_client.create_tenant(
|
|
64
|
-
tenant_id=tenant_id,
|
|
71
|
+
tenant_id=tenant_id,
|
|
72
|
+
note=note,
|
|
73
|
+
tenant_metadata_schema=tenant_metadata_schema,
|
|
74
|
+
request_options=request_options,
|
|
65
75
|
)
|
|
66
76
|
return _response.data
|
|
67
77
|
|
|
@@ -85,18 +95,25 @@ class AsyncUserClient:
|
|
|
85
95
|
self,
|
|
86
96
|
*,
|
|
87
97
|
tenant_id: typing.Optional[str] = None,
|
|
98
|
+
note: typing.Optional[str] = None,
|
|
88
99
|
tenant_metadata_schema: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT,
|
|
89
100
|
request_options: typing.Optional[RequestOptions] = None,
|
|
90
101
|
) -> TenantCreateData:
|
|
91
102
|
"""
|
|
92
|
-
Create a
|
|
103
|
+
Create a tenant for your account.
|
|
93
104
|
|
|
94
|
-
|
|
95
|
-
|
|
105
|
+
Use this endpoint to initialize a tenant space you can use for ingestion, embeddings, and search. Optionally include a metadata schema to enforce consistent attributes across documents.
|
|
106
|
+
|
|
107
|
+
Expected outcome
|
|
108
|
+
- A tenant is created and returned with its identifier.
|
|
109
|
+
- If the tenant already exists, you receive a success message with the existing identifier.
|
|
96
110
|
|
|
97
111
|
Parameters
|
|
98
112
|
----------
|
|
99
113
|
tenant_id : typing.Optional[str]
|
|
114
|
+
Unique identifier for the tenant/organization
|
|
115
|
+
|
|
116
|
+
note : typing.Optional[str]
|
|
100
117
|
|
|
101
118
|
tenant_metadata_schema : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]]
|
|
102
119
|
|
|
@@ -116,10 +133,13 @@ class AsyncUserClient:
|
|
|
116
133
|
|
|
117
134
|
client = AsyncCortexAI(token="YOUR_TOKEN", )
|
|
118
135
|
async def main() -> None:
|
|
119
|
-
await client.user.create_tenant()
|
|
136
|
+
await client.user.create_tenant(note='<str>', )
|
|
120
137
|
asyncio.run(main())
|
|
121
138
|
"""
|
|
122
139
|
_response = await self._raw_client.create_tenant(
|
|
123
|
-
tenant_id=tenant_id,
|
|
140
|
+
tenant_id=tenant_id,
|
|
141
|
+
note=note,
|
|
142
|
+
tenant_metadata_schema=tenant_metadata_schema,
|
|
143
|
+
request_options=request_options,
|
|
124
144
|
)
|
|
125
145
|
return _response.data
|
usecortex_ai/user/raw_client.py
CHANGED
|
@@ -30,18 +30,25 @@ class RawUserClient:
|
|
|
30
30
|
self,
|
|
31
31
|
*,
|
|
32
32
|
tenant_id: typing.Optional[str] = None,
|
|
33
|
+
note: typing.Optional[str] = None,
|
|
33
34
|
tenant_metadata_schema: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT,
|
|
34
35
|
request_options: typing.Optional[RequestOptions] = None,
|
|
35
36
|
) -> HttpResponse[TenantCreateData]:
|
|
36
37
|
"""
|
|
37
|
-
Create a
|
|
38
|
+
Create a tenant for your account.
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
Use this endpoint to initialize a tenant space you can use for ingestion, embeddings, and search. Optionally include a metadata schema to enforce consistent attributes across documents.
|
|
41
|
+
|
|
42
|
+
Expected outcome
|
|
43
|
+
- A tenant is created and returned with its identifier.
|
|
44
|
+
- If the tenant already exists, you receive a success message with the existing identifier.
|
|
41
45
|
|
|
42
46
|
Parameters
|
|
43
47
|
----------
|
|
44
48
|
tenant_id : typing.Optional[str]
|
|
49
|
+
Unique identifier for the tenant/organization
|
|
50
|
+
|
|
51
|
+
note : typing.Optional[str]
|
|
45
52
|
|
|
46
53
|
tenant_metadata_schema : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]]
|
|
47
54
|
|
|
@@ -58,6 +65,7 @@ class RawUserClient:
|
|
|
58
65
|
method="POST",
|
|
59
66
|
params={
|
|
60
67
|
"tenant_id": tenant_id,
|
|
68
|
+
"note": note,
|
|
61
69
|
},
|
|
62
70
|
json={
|
|
63
71
|
"tenant_metadata_schema": tenant_metadata_schema,
|
|
@@ -169,18 +177,25 @@ class AsyncRawUserClient:
|
|
|
169
177
|
self,
|
|
170
178
|
*,
|
|
171
179
|
tenant_id: typing.Optional[str] = None,
|
|
180
|
+
note: typing.Optional[str] = None,
|
|
172
181
|
tenant_metadata_schema: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT,
|
|
173
182
|
request_options: typing.Optional[RequestOptions] = None,
|
|
174
183
|
) -> AsyncHttpResponse[TenantCreateData]:
|
|
175
184
|
"""
|
|
176
|
-
Create a
|
|
185
|
+
Create a tenant for your account.
|
|
177
186
|
|
|
178
|
-
|
|
179
|
-
|
|
187
|
+
Use this endpoint to initialize a tenant space you can use for ingestion, embeddings, and search. Optionally include a metadata schema to enforce consistent attributes across documents.
|
|
188
|
+
|
|
189
|
+
Expected outcome
|
|
190
|
+
- A tenant is created and returned with its identifier.
|
|
191
|
+
- If the tenant already exists, you receive a success message with the existing identifier.
|
|
180
192
|
|
|
181
193
|
Parameters
|
|
182
194
|
----------
|
|
183
195
|
tenant_id : typing.Optional[str]
|
|
196
|
+
Unique identifier for the tenant/organization
|
|
197
|
+
|
|
198
|
+
note : typing.Optional[str]
|
|
184
199
|
|
|
185
200
|
tenant_metadata_schema : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]]
|
|
186
201
|
|
|
@@ -197,6 +212,7 @@ class AsyncRawUserClient:
|
|
|
197
212
|
method="POST",
|
|
198
213
|
params={
|
|
199
214
|
"tenant_id": tenant_id,
|
|
215
|
+
"note": note,
|
|
200
216
|
},
|
|
201
217
|
json={
|
|
202
218
|
"tenant_metadata_schema": tenant_metadata_schema,
|