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.
Files changed (61) hide show
  1. usecortex_ai/__init__.py +18 -3
  2. usecortex_ai/client.py +3 -0
  3. usecortex_ai/document/__init__.py +4 -0
  4. usecortex_ai/document/client.py +139 -0
  5. usecortex_ai/document/raw_client.py +312 -0
  6. usecortex_ai/embeddings/client.py +48 -78
  7. usecortex_ai/embeddings/raw_client.py +44 -74
  8. usecortex_ai/fetch/client.py +2 -2
  9. usecortex_ai/search/client.py +88 -84
  10. usecortex_ai/search/raw_client.py +82 -78
  11. usecortex_ai/sources/client.py +26 -157
  12. usecortex_ai/sources/raw_client.py +22 -501
  13. usecortex_ai/tenant/client.py +154 -6
  14. usecortex_ai/tenant/raw_client.py +502 -4
  15. usecortex_ai/types/__init__.py +16 -2
  16. usecortex_ai/types/add_user_memory_response.py +36 -0
  17. usecortex_ai/types/app_sources_upload_data.py +10 -2
  18. usecortex_ai/types/attachment_model.py +34 -7
  19. usecortex_ai/types/batch_upload_data.py +10 -2
  20. usecortex_ai/types/body_scrape_webpage_upload_scrape_webpage_post.py +0 -2
  21. usecortex_ai/types/body_update_scrape_job_upload_update_webpage_patch.py +0 -2
  22. usecortex_ai/types/content_model.py +33 -6
  23. usecortex_ai/types/delete_memory_request.py +14 -3
  24. usecortex_ai/types/delete_sources.py +20 -0
  25. usecortex_ai/types/delete_sub_tenant_data.py +42 -0
  26. usecortex_ai/types/delete_user_memory_response.py +31 -0
  27. usecortex_ai/types/embeddings_create_collection_data.py +19 -4
  28. usecortex_ai/types/embeddings_delete_data.py +19 -4
  29. usecortex_ai/types/embeddings_get_data.py +19 -4
  30. usecortex_ai/types/embeddings_search_data.py +19 -4
  31. usecortex_ai/types/error_response.py +0 -1
  32. usecortex_ai/types/fetch_content_data.py +19 -5
  33. usecortex_ai/types/file_upload_result.py +9 -2
  34. usecortex_ai/types/generate_user_memory_response.py +32 -0
  35. usecortex_ai/types/list_sources_response.py +14 -3
  36. usecortex_ai/types/list_user_memories_response.py +32 -0
  37. usecortex_ai/types/markdown_upload_request.py +23 -5
  38. usecortex_ai/types/processing_status.py +14 -3
  39. usecortex_ai/types/relations.py +9 -2
  40. usecortex_ai/types/retrieve_user_memory_response.py +32 -0
  41. usecortex_ai/types/search_chunk.py +54 -17
  42. usecortex_ai/types/single_upload_data.py +10 -2
  43. usecortex_ai/types/source.py +34 -15
  44. usecortex_ai/types/source_model.py +63 -14
  45. usecortex_ai/types/sub_tenant_ids_data.py +29 -5
  46. usecortex_ai/types/tenant_create_data.py +19 -4
  47. usecortex_ai/types/tenant_stats.py +24 -5
  48. usecortex_ai/types/user_memory.py +31 -0
  49. usecortex_ai/upload/client.py +486 -111
  50. usecortex_ai/upload/raw_client.py +458 -103
  51. usecortex_ai/user/client.py +30 -10
  52. usecortex_ai/user/raw_client.py +22 -6
  53. usecortex_ai/user_memory/client.py +200 -56
  54. usecortex_ai/user_memory/raw_client.py +921 -94
  55. {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.3.0.dist-info}/METADATA +1 -1
  56. usecortex_ai-0.3.0.dist-info/RECORD +101 -0
  57. usecortex_ai/types/source_content.py +0 -26
  58. usecortex_ai-0.2.1.dist-info/RECORD +0 -91
  59. {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.3.0.dist-info}/WHEEL +0 -0
  60. {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.3.0.dist-info}/licenses/LICENSE +0 -0
  61. {usecortex_ai-0.2.1.dist-info → usecortex_ai-0.3.0.dist-info}/top_level.txt +0 -0
@@ -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 new tenant for the authenticated user.
38
+ Create a tenant for your account.
38
39
 
39
- Returns:
40
- TenantCreateResponse: Success response with tenant creation details
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, tenant_metadata_schema=tenant_metadata_schema, request_options=request_options
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 new tenant for the authenticated user.
103
+ Create a tenant for your account.
93
104
 
94
- Returns:
95
- TenantCreateResponse: Success response with tenant creation details
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, tenant_metadata_schema=tenant_metadata_schema, request_options=request_options
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
@@ -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 new tenant for the authenticated user.
38
+ Create a tenant for your account.
38
39
 
39
- Returns:
40
- TenantCreateResponse: Success response with tenant creation details
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 new tenant for the authenticated user.
185
+ Create a tenant for your account.
177
186
 
178
- Returns:
179
- TenantCreateResponse: Success response with tenant creation details
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,