usecortex-ai 0.3.6__tar.gz → 0.5.0__tar.gz

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 (152) hide show
  1. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/LICENSE +21 -21
  2. {usecortex_ai-0.3.6/src/usecortex_ai.egg-info → usecortex_ai-0.5.0}/PKG-INFO +2 -2
  3. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/README.md +135 -135
  4. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/pyproject.toml +40 -40
  5. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/setup.cfg +0 -0
  6. usecortex_ai-0.5.0/src/usecortex_ai/__init__.py +156 -0
  7. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/client.py +25 -23
  8. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/core/__init__.py +0 -0
  9. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/core/api_error.py +0 -0
  10. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/core/client_wrapper.py +0 -0
  11. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/core/datetime_utils.py +0 -0
  12. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/core/file.py +0 -0
  13. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/core/force_multipart.py +0 -0
  14. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/core/http_client.py +0 -0
  15. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/core/http_response.py +0 -0
  16. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/core/jsonable_encoder.py +0 -0
  17. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/core/pydantic_utilities.py +0 -0
  18. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/core/query_encoder.py +0 -0
  19. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/core/remove_none_from_dict.py +0 -0
  20. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/core/request_options.py +0 -0
  21. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/core/serialization.py +0 -0
  22. {usecortex_ai-0.3.6/src/usecortex_ai/document → usecortex_ai-0.5.0/src/usecortex_ai/dashboard}/__init__.py +0 -0
  23. usecortex_ai-0.5.0/src/usecortex_ai/dashboard/client.py +448 -0
  24. {usecortex_ai-0.3.6/src/usecortex_ai/sources → usecortex_ai-0.5.0/src/usecortex_ai/dashboard}/raw_client.py +464 -247
  25. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/embeddings/__init__.py +0 -0
  26. usecortex_ai-0.5.0/src/usecortex_ai/embeddings/client.py +537 -0
  27. {usecortex_ai-0.3.6/src/usecortex_ai/user_memory → usecortex_ai-0.5.0/src/usecortex_ai/embeddings}/raw_client.py +338 -328
  28. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/environment.py +0 -0
  29. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/errors/__init__.py +2 -0
  30. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/errors/bad_request_error.py +1 -2
  31. usecortex_ai-0.5.0/src/usecortex_ai/errors/forbidden_error.py +10 -0
  32. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/errors/internal_server_error.py +1 -2
  33. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/errors/not_found_error.py +1 -2
  34. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/errors/service_unavailable_error.py +1 -2
  35. usecortex_ai-0.3.6/src/usecortex_ai/errors/forbidden_error.py → usecortex_ai-0.5.0/src/usecortex_ai/errors/too_many_requests_error.py +2 -2
  36. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/errors/unauthorized_error.py +1 -2
  37. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/errors/unprocessable_entity_error.py +0 -0
  38. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/fetch/__init__.py +0 -0
  39. {usecortex_ai-0.3.6/src/usecortex_ai/sources → usecortex_ai-0.5.0/src/usecortex_ai/fetch}/client.py +207 -67
  40. {usecortex_ai-0.3.6/src/usecortex_ai/embeddings → usecortex_ai-0.5.0/src/usecortex_ai/fetch}/raw_client.py +292 -249
  41. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/raw_client.py +8 -2
  42. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/search/__init__.py +0 -0
  43. usecortex_ai-0.5.0/src/usecortex_ai/search/client.py +627 -0
  44. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/search/raw_client.py +463 -344
  45. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/search/types/__init__.py +0 -0
  46. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/search/types/alpha.py +1 -1
  47. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/sources/__init__.py +0 -0
  48. {usecortex_ai-0.3.6/src/usecortex_ai/document → usecortex_ai-0.5.0/src/usecortex_ai/sources}/client.py +30 -32
  49. {usecortex_ai-0.3.6/src/usecortex_ai/document → usecortex_ai-0.5.0/src/usecortex_ai/sources}/raw_client.py +53 -56
  50. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/tenant/__init__.py +0 -0
  51. usecortex_ai-0.5.0/src/usecortex_ai/tenant/client.py +305 -0
  52. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/tenant/raw_client.py +227 -350
  53. usecortex_ai-0.5.0/src/usecortex_ai/types/__init__.py +119 -0
  54. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/types/actual_error_response.py +0 -0
  55. usecortex_ai-0.5.0/src/usecortex_ai/types/add_memory_response.py +39 -0
  56. usecortex_ai-0.5.0/src/usecortex_ai/types/api_key_info.py +47 -0
  57. usecortex_ai-0.5.0/src/usecortex_ai/types/app_sources_upload_data.py +39 -0
  58. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/types/attachment_model.py +0 -0
  59. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/types/bm_25_operator_type.py +0 -0
  60. usecortex_ai-0.3.6/src/usecortex_ai/types/file_upload_result.py → usecortex_ai-0.5.0/src/usecortex_ai/types/collection_stats.py +5 -5
  61. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/types/content_model.py +0 -0
  62. usecortex_ai-0.5.0/src/usecortex_ai/types/custom_property_definition.py +75 -0
  63. usecortex_ai-0.5.0/src/usecortex_ai/types/dashboard_apis_response.py +33 -0
  64. usecortex_ai-0.5.0/src/usecortex_ai/types/dashboard_sources_response.py +33 -0
  65. usecortex_ai-0.5.0/src/usecortex_ai/types/dashboard_tenants_response.py +33 -0
  66. usecortex_ai-0.3.6/src/usecortex_ai/types/list_sources_response.py → usecortex_ai-0.5.0/src/usecortex_ai/types/delete_result.py +10 -7
  67. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/types/delete_user_memory_response.py +1 -1
  68. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/types/entity.py +4 -4
  69. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/types/error_response.py +0 -0
  70. usecortex_ai-0.5.0/src/usecortex_ai/types/fetch_mode.py +5 -0
  71. usecortex_ai-0.3.6/src/usecortex_ai/types/relations.py → usecortex_ai-0.5.0/src/usecortex_ai/types/forceful_relations_payload.py +4 -4
  72. usecortex_ai-0.3.6/src/usecortex_ai/types/batch_upload_data.py → usecortex_ai-0.5.0/src/usecortex_ai/types/graph_context.py +6 -10
  73. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/types/http_validation_error.py +0 -0
  74. usecortex_ai-0.3.6/src/usecortex_ai/types/related_chunk.py → usecortex_ai-0.5.0/src/usecortex_ai/types/infra.py +4 -5
  75. usecortex_ai-0.3.6/src/usecortex_ai/types/fetch_content_data.py → usecortex_ai-0.5.0/src/usecortex_ai/types/insert_result.py +12 -8
  76. usecortex_ai-0.5.0/src/usecortex_ai/types/memory_item.py +88 -0
  77. usecortex_ai-0.5.0/src/usecortex_ai/types/memory_result_item.py +47 -0
  78. usecortex_ai-0.5.0/src/usecortex_ai/types/milvus_data_type.py +21 -0
  79. usecortex_ai-0.3.6/src/usecortex_ai/types/delete_sources.py → usecortex_ai-0.5.0/src/usecortex_ai/types/path_triplet.py +6 -3
  80. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/types/processing_status.py +3 -2
  81. usecortex_ai-0.5.0/src/usecortex_ai/types/processing_status_indexing_status.py +7 -0
  82. usecortex_ai-0.5.0/src/usecortex_ai/types/qn_a_search_response.py +49 -0
  83. usecortex_ai-0.3.6/src/usecortex_ai/types/retrieve_response.py → usecortex_ai-0.5.0/src/usecortex_ai/types/raw_embedding_document.py +11 -8
  84. usecortex_ai-0.5.0/src/usecortex_ai/types/raw_embedding_search_result.py +47 -0
  85. usecortex_ai-0.3.6/src/usecortex_ai/types/user_memory.py → usecortex_ai-0.5.0/src/usecortex_ai/types/raw_embedding_vector.py +6 -6
  86. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/types/relation_evidence.py +24 -5
  87. usecortex_ai-0.5.0/src/usecortex_ai/types/retrieval_result.py +30 -0
  88. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/types/retrieve_mode.py +0 -0
  89. usecortex_ai-0.5.0/src/usecortex_ai/types/scored_path_response.py +26 -0
  90. usecortex_ai-0.5.0/src/usecortex_ai/types/search_mode.py +5 -0
  91. usecortex_ai-0.3.6/src/usecortex_ai/types/app_sources_upload_data.py → usecortex_ai-0.5.0/src/usecortex_ai/types/source_delete_response.py +8 -8
  92. usecortex_ai-0.3.6/src/usecortex_ai/types/path_triplet.py → usecortex_ai-0.5.0/src/usecortex_ai/types/source_delete_result_item.py +8 -10
  93. usecortex_ai-0.5.0/src/usecortex_ai/types/source_fetch_response.py +70 -0
  94. usecortex_ai-0.3.6/src/usecortex_ai/types/graph_relations_response.py → usecortex_ai-0.5.0/src/usecortex_ai/types/source_graph_relations_response.py +3 -3
  95. usecortex_ai-0.3.6/src/usecortex_ai/types/single_upload_data.py → usecortex_ai-0.5.0/src/usecortex_ai/types/source_list_response.py +7 -10
  96. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/types/source_model.py +11 -1
  97. usecortex_ai-0.5.0/src/usecortex_ai/types/source_status.py +5 -0
  98. usecortex_ai-0.5.0/src/usecortex_ai/types/source_upload_response.py +35 -0
  99. usecortex_ai-0.5.0/src/usecortex_ai/types/source_upload_result_item.py +38 -0
  100. usecortex_ai-0.5.0/src/usecortex_ai/types/supported_llm_providers.py +5 -0
  101. usecortex_ai-0.3.6/src/usecortex_ai/types/embeddings_create_collection_data.py → usecortex_ai-0.5.0/src/usecortex_ai/types/tenant_create_response.py +9 -7
  102. usecortex_ai-0.5.0/src/usecortex_ai/types/tenant_info.py +32 -0
  103. usecortex_ai-0.3.6/src/usecortex_ai/types/scored_triplet_response.py → usecortex_ai-0.5.0/src/usecortex_ai/types/tenant_metadata_schema_info.py +8 -15
  104. usecortex_ai-0.3.6/src/usecortex_ai/types/tenant_create_data.py → usecortex_ai-0.5.0/src/usecortex_ai/types/tenant_stats_response.py +9 -8
  105. usecortex_ai-0.3.6/src/usecortex_ai/types/triple_with_evidence.py → usecortex_ai-0.5.0/src/usecortex_ai/types/triplet_with_evidence.py +5 -1
  106. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/types/user_assistant_pair.py +4 -0
  107. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/types/validation_error.py +0 -0
  108. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai/types/validation_error_loc_item.py +0 -0
  109. usecortex_ai-0.3.6/src/usecortex_ai/types/search_chunk.py → usecortex_ai-0.5.0/src/usecortex_ai/types/vector_store_chunk.py +5 -11
  110. usecortex_ai-0.5.0/src/usecortex_ai/upload/__init__.py +7 -0
  111. usecortex_ai-0.5.0/src/usecortex_ai/upload/client.py +606 -0
  112. usecortex_ai-0.5.0/src/usecortex_ai/upload/raw_client.py +1489 -0
  113. usecortex_ai-0.5.0/src/usecortex_ai/upload/types/__init__.py +7 -0
  114. usecortex_ai-0.5.0/src/usecortex_ai/upload/types/body_upload_app_ingestion_upload_app_post_app_sources.py +7 -0
  115. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0/src/usecortex_ai.egg-info}/PKG-INFO +2 -2
  116. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai.egg-info/SOURCES.txt +44 -42
  117. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai.egg-info/dependency_links.txt +0 -0
  118. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai.egg-info/requires.txt +0 -0
  119. {usecortex_ai-0.3.6 → usecortex_ai-0.5.0}/src/usecortex_ai.egg-info/top_level.txt +0 -0
  120. usecortex_ai-0.3.6/src/usecortex_ai/__init__.py +0 -144
  121. usecortex_ai-0.3.6/src/usecortex_ai/embeddings/client.py +0 -410
  122. usecortex_ai-0.3.6/src/usecortex_ai/fetch/client.py +0 -143
  123. usecortex_ai-0.3.6/src/usecortex_ai/fetch/raw_client.py +0 -310
  124. usecortex_ai-0.3.6/src/usecortex_ai/search/client.py +0 -571
  125. usecortex_ai-0.3.6/src/usecortex_ai/tenant/client.py +0 -268
  126. usecortex_ai-0.3.6/src/usecortex_ai/types/__init__.py +0 -109
  127. usecortex_ai-0.3.6/src/usecortex_ai/types/add_user_memory_response.py +0 -41
  128. usecortex_ai-0.3.6/src/usecortex_ai/types/body_scrape_webpage_upload_scrape_webpage_post.py +0 -17
  129. usecortex_ai-0.3.6/src/usecortex_ai/types/body_update_scrape_job_upload_update_webpage_patch.py +0 -17
  130. usecortex_ai-0.3.6/src/usecortex_ai/types/chunk_graph_relations_response.py +0 -33
  131. usecortex_ai-0.3.6/src/usecortex_ai/types/delete_memory_request.py +0 -32
  132. usecortex_ai-0.3.6/src/usecortex_ai/types/delete_sub_tenant_data.py +0 -42
  133. usecortex_ai-0.3.6/src/usecortex_ai/types/embeddings_delete_data.py +0 -37
  134. usecortex_ai-0.3.6/src/usecortex_ai/types/embeddings_get_data.py +0 -37
  135. usecortex_ai-0.3.6/src/usecortex_ai/types/embeddings_search_data.py +0 -37
  136. usecortex_ai-0.3.6/src/usecortex_ai/types/extended_context.py +0 -17
  137. usecortex_ai-0.3.6/src/usecortex_ai/types/list_user_memories_response.py +0 -32
  138. usecortex_ai-0.3.6/src/usecortex_ai/types/markdown_upload_request.py +0 -41
  139. usecortex_ai-0.3.6/src/usecortex_ai/types/retrieve_user_memory_response.py +0 -38
  140. usecortex_ai-0.3.6/src/usecortex_ai/types/scored_path_response.py +0 -40
  141. usecortex_ai-0.3.6/src/usecortex_ai/types/source.py +0 -52
  142. usecortex_ai-0.3.6/src/usecortex_ai/types/sub_tenant_ids_data.py +0 -47
  143. usecortex_ai-0.3.6/src/usecortex_ai/types/tenant_stats.py +0 -42
  144. usecortex_ai-0.3.6/src/usecortex_ai/types/webpage_scrape_request.py +0 -27
  145. usecortex_ai-0.3.6/src/usecortex_ai/upload/__init__.py +0 -4
  146. usecortex_ai-0.3.6/src/usecortex_ai/upload/client.py +0 -2310
  147. usecortex_ai-0.3.6/src/usecortex_ai/upload/raw_client.py +0 -5526
  148. usecortex_ai-0.3.6/src/usecortex_ai/user/__init__.py +0 -4
  149. usecortex_ai-0.3.6/src/usecortex_ai/user/client.py +0 -145
  150. usecortex_ai-0.3.6/src/usecortex_ai/user/raw_client.py +0 -316
  151. usecortex_ai-0.3.6/src/usecortex_ai/user_memory/__init__.py +0 -4
  152. usecortex_ai-0.3.6/src/usecortex_ai/user_memory/client.py +0 -515
@@ -1,22 +1,22 @@
1
- Copyright (c) 2024 Cortex AI
2
-
3
- All Rights Reserved.
4
-
5
- PROPRIETARY AND CONFIDENTIAL
6
-
7
- This software is the proprietary and confidential property of Cortex AI ("the Company").
8
- Permission is hereby granted to users to install and use this software as part of the Cortex AI service, subject to the terms and conditions of the service agreement entered into with the Company.
9
-
10
- You may not, without the express written permission of the Company:
11
-
12
- 1. Copy, modify, or create derivative works of the software.
13
- 2. Distribute, sell, rent, lease, sublicense, or otherwise transfer the software to any third party.
14
- 3. Reverse engineer, decompile, or disassemble the software, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ Copyright (c) 2024 Cortex AI
2
+
3
+ All Rights Reserved.
4
+
5
+ PROPRIETARY AND CONFIDENTIAL
6
+
7
+ This software is the proprietary and confidential property of Cortex AI ("the Company").
8
+ Permission is hereby granted to users to install and use this software as part of the Cortex AI service, subject to the terms and conditions of the service agreement entered into with the Company.
9
+
10
+ You may not, without the express written permission of the Company:
11
+
12
+ 1. Copy, modify, or create derivative works of the software.
13
+ 2. Distribute, sell, rent, lease, sublicense, or otherwise transfer the software to any third party.
14
+ 3. Reverse engineer, decompile, or disassemble the software, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  SOFTWARE.
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: usecortex-ai
3
- Version: 0.3.6
3
+ Version: 0.5.0
4
4
  Summary: The official Python SDK for the Cortex AI platform.
5
- Author-email: Nishkarsh Shrivastava <nishkarsh@usecortex.ai>
5
+ Author-email: Soham Ratnaparkhi <soham@usecortex.ai>
6
6
  License: Copyright (c) 2024 Cortex AI
7
7
 
8
8
  All Rights Reserved.
@@ -1,135 +1,135 @@
1
- # Cortex AI Python SDK - [usecortex.ai](https://www.usecortex.ai/)
2
-
3
- The official Python SDK for the Cortex AI platform. Build powerful, context-aware AI applications in your Python applications.
4
-
5
- **Cortex** is your plug-and-play memory infrastructure. It powers intelligent, context-aware retrieval for any AI app or agent. Whether you’re building a customer support bot, research copilot, or internal knowledge assistant.
6
-
7
- [Learn more about the SDK from our docs](https://docs.usecortex.ai/)
8
-
9
- ## Core features
10
-
11
- * **Dynamic retrieval and querying** that always retrieve the most relevant context
12
- * **Built-in long-term memory** that evolves with every user interaction
13
- * **Personalization hooks** for user preferences, intent, and history
14
- * **Developer-first SDK** with the most flexible APIs and fine-grained controls
15
-
16
- ## Getting started
17
-
18
- ### Installation
19
-
20
- ```bash
21
- pip install usecortex-ai
22
- ```
23
-
24
- ### Client setup
25
-
26
- We provide both synchronous and asynchronous clients. Use **`AsyncCortexAI`** when working with async/await patterns, and **`CortexAI`** for traditional synchronous workflows. Client initialization does not trigger any network requests, so you can safely create as many client instances as needed. Both clients expose the exact same set of methods.
27
-
28
- ```python
29
- import os
30
- from usecortex_ai import CortexAI, AsyncCortexAI
31
-
32
- api_key = os.environ["CORTEX_API_KEY"] # Set your Cortex API key in the environment variable CORTEX_API_KEY. Optional, but recommended.
33
-
34
- # Sync client
35
- client = CortexAI(token=api_key)
36
-
37
- # Async client (for async/await usage)
38
- async_client = AsyncCortexAI(token=api_key)
39
- ```
40
-
41
- ### Create a Tenant
42
-
43
- You can consider a `tenant` as a single database that can have internal isolated collections called `sub-tenants`. [Know more about the concept of tenant here](https://docs.usecortex.ai/essentials/multi-tenant)
44
-
45
- ```python
46
- def create_tenant():
47
- return client.user.create_tenant(tenant_id="my-company")
48
- ```
49
-
50
- ### Index Your Data
51
-
52
- When you index your data, you make it ready for retrieval from Cortex using natural language.
53
-
54
- ```python
55
- # Upload text content
56
- def upload_text():
57
- return client.upload.upload_text(
58
- tenant_id="my-company-py-sync",
59
- sub_tenant_id="engineering",
60
- content="Our API rate limits are 1000 requests per minute for premium accounts.",
61
- file_id="api-docs-rate-limits",
62
- tenant_metadata={"sub_tenant_id": "engineering"}
63
- )
64
-
65
- # Upload document file
66
- def upload_file():
67
- with open("company-handbook.pdf", 'rb') as file_obj:
68
- file_data = ("company-handbook.pdf", file_obj)
69
- return client.upload.upload_document(
70
- tenant_id="my-company",
71
- file=file_data,
72
- file_id="company-handbook.pdf"
73
- )
74
- ```
75
-
76
- **For a more detailed explanation** of document upload, including supported file formats, processing pipeline, metadata handling, and advanced configuration options, refer to the [Upload Document endpoint documentation](https://docs.usecortex.ai/api-reference/endpoint/upload-document).
77
-
78
- ### Search and retrieval
79
-
80
- ```python
81
- # Semantic search with retrieval
82
- results = client.search.retrieve(
83
- query="What are the API rate limits?",
84
- tenant_id="my-company",
85
- sub_tenant_id="engineering",
86
- max_chunks=10
87
- )
88
-
89
- # List all sources
90
- all_sources = client.sources.get_all(
91
- tenant_id="my-company",
92
- sub_tenant_id="engineering",
93
- )
94
-
95
- # Get specific sources by ID
96
- specific_sources = client.sources.get_by_ids(
97
- tenant_id="my-company",
98
- sub_tenant_id="engineering",
99
- source_ids=["api-docs-rate-limits", "company-handbook"]
100
- )
101
- ```
102
-
103
- **For a more detailed explanation** of search and retrieval, including query parameters, scoring mechanisms, result structure, and advanced search features, refer to the [Search endpoint documentation](https://docs.usecortex.ai/api-reference/endpoint/search).
104
-
105
- ## SDK Method Structure & Type Safety
106
-
107
- Our SDKs follow a predictable pattern that mirrors the API structure while providing full type safety.
108
-
109
- > **Method Mapping** : `client.<group>.<function_name>` mirrors `api.usecortex.ai/<group>/<function_name>`
110
- >
111
- > For example: `client.upload.upload_text()` corresponds to `POST /upload/upload_text`
112
-
113
- The SDKs provide exact type parity with the API specification:
114
-
115
- - **Request Parameters** : Every field documented in the API reference (required, optional, types, validation rules) is reflected in the SDK method signatures
116
- - **Response Objects** : Return types match the exact JSON schema documented for each endpoint
117
- - **Error Types** : Exception structures mirror the error response formats from the API
118
- - **Nested Objects** : Complex nested parameters and responses maintain their full structure and typing
119
-
120
- > This means you can rely on your IDE’s autocomplete and type checking. If a parameter is optional in the API docs, it’s optional in the SDK. If a response contains a specific field, your IDE will know about it. Our SDKs are built in such a way that your IDE will automatically provide **autocompletion, type-checking, inline documentation with examples, and compile time validation** for each and every method.
121
- >
122
- > Just hit **Cmd+Space/Ctrl+Space!**
123
-
124
- ## Links
125
-
126
- - **Homepage:** [usecortex.ai](https://www.usecortex.ai/)
127
- - **Documentation:** [docs.usecortex.ai](https://docs.usecortex.ai/)
128
-
129
- ## Our docs
130
-
131
- Please refer to our [API reference](https://docs.usecortex.ai/api-reference/introduction) for detailed explanations of every API endpoint, parameter options, and advanced use cases.
132
-
133
- ## Support
134
-
135
- If you have any questions or need help, please reach out to our support team at [founders@usecortex.ai](mailto:founders@usecortex.ai).
1
+ # Cortex AI Python SDK - [usecortex.ai](https://www.usecortex.ai/)
2
+
3
+ The official Python SDK for the Cortex AI platform. Build powerful, context-aware AI applications in your Python applications.
4
+
5
+ **Cortex** is your plug-and-play memory infrastructure. It powers intelligent, context-aware retrieval for any AI app or agent. Whether you’re building a customer support bot, research copilot, or internal knowledge assistant.
6
+
7
+ [Learn more about the SDK from our docs](https://docs.usecortex.ai/)
8
+
9
+ ## Core features
10
+
11
+ * **Dynamic retrieval and querying** that always retrieve the most relevant context
12
+ * **Built-in long-term memory** that evolves with every user interaction
13
+ * **Personalization hooks** for user preferences, intent, and history
14
+ * **Developer-first SDK** with the most flexible APIs and fine-grained controls
15
+
16
+ ## Getting started
17
+
18
+ ### Installation
19
+
20
+ ```bash
21
+ pip install usecortex-ai
22
+ ```
23
+
24
+ ### Client setup
25
+
26
+ We provide both synchronous and asynchronous clients. Use **`AsyncCortexAI`** when working with async/await patterns, and **`CortexAI`** for traditional synchronous workflows. Client initialization does not trigger any network requests, so you can safely create as many client instances as needed. Both clients expose the exact same set of methods.
27
+
28
+ ```python
29
+ import os
30
+ from usecortex_ai import CortexAI, AsyncCortexAI
31
+
32
+ api_key = os.environ["CORTEX_API_KEY"] # Set your Cortex API key in the environment variable CORTEX_API_KEY. Optional, but recommended.
33
+
34
+ # Sync client
35
+ client = CortexAI(token=api_key)
36
+
37
+ # Async client (for async/await usage)
38
+ async_client = AsyncCortexAI(token=api_key)
39
+ ```
40
+
41
+ ### Create a Tenant
42
+
43
+ You can consider a `tenant` as a single database that can have internal isolated collections called `sub-tenants`. [Know more about the concept of tenant here](https://docs.usecortex.ai/essentials/multi-tenant)
44
+
45
+ ```python
46
+ def create_tenant():
47
+ return client.user.create_tenant(tenant_id="my-company")
48
+ ```
49
+
50
+ ### Index Your Data
51
+
52
+ When you index your data, you make it ready for retrieval from Cortex using natural language.
53
+
54
+ ```python
55
+ # Upload text content
56
+ def upload_text():
57
+ return client.upload.upload_text(
58
+ tenant_id="my-company-py-sync",
59
+ sub_tenant_id="engineering",
60
+ content="Our API rate limits are 1000 requests per minute for premium accounts.",
61
+ file_id="api-docs-rate-limits",
62
+ tenant_metadata={"sub_tenant_id": "engineering"}
63
+ )
64
+
65
+ # Upload document file
66
+ def upload_file():
67
+ with open("company-handbook.pdf", 'rb') as file_obj:
68
+ file_data = ("company-handbook.pdf", file_obj)
69
+ return client.upload.upload_document(
70
+ tenant_id="my-company",
71
+ file=file_data,
72
+ file_id="company-handbook.pdf"
73
+ )
74
+ ```
75
+
76
+ **For a more detailed explanation** of document upload, including supported file formats, processing pipeline, metadata handling, and advanced configuration options, refer to the [Upload Document endpoint documentation](https://docs.usecortex.ai/api-reference/endpoint/upload-document).
77
+
78
+ ### Search and retrieval
79
+
80
+ ```python
81
+ # Semantic search with retrieval
82
+ results = client.search.retrieve(
83
+ query="What are the API rate limits?",
84
+ tenant_id="my-company",
85
+ sub_tenant_id="engineering",
86
+ max_chunks=10
87
+ )
88
+
89
+ # List all sources
90
+ all_sources = client.sources.get_all(
91
+ tenant_id="my-company",
92
+ sub_tenant_id="engineering",
93
+ )
94
+
95
+ # Get specific sources by ID
96
+ specific_sources = client.sources.get_by_ids(
97
+ tenant_id="my-company",
98
+ sub_tenant_id="engineering",
99
+ source_ids=["api-docs-rate-limits", "company-handbook"]
100
+ )
101
+ ```
102
+
103
+ **For a more detailed explanation** of search and retrieval, including query parameters, scoring mechanisms, result structure, and advanced search features, refer to the [Search endpoint documentation](https://docs.usecortex.ai/api-reference/endpoint/search).
104
+
105
+ ## SDK Method Structure & Type Safety
106
+
107
+ Our SDKs follow a predictable pattern that mirrors the API structure while providing full type safety.
108
+
109
+ > **Method Mapping** : `client.<group>.<function_name>` mirrors `api.usecortex.ai/<group>/<function_name>`
110
+ >
111
+ > For example: `client.upload.upload_text()` corresponds to `POST /upload/upload_text`
112
+
113
+ The SDKs provide exact type parity with the API specification:
114
+
115
+ - **Request Parameters** : Every field documented in the API reference (required, optional, types, validation rules) is reflected in the SDK method signatures
116
+ - **Response Objects** : Return types match the exact JSON schema documented for each endpoint
117
+ - **Error Types** : Exception structures mirror the error response formats from the API
118
+ - **Nested Objects** : Complex nested parameters and responses maintain their full structure and typing
119
+
120
+ > This means you can rely on your IDE’s autocomplete and type checking. If a parameter is optional in the API docs, it’s optional in the SDK. If a response contains a specific field, your IDE will know about it. Our SDKs are built in such a way that your IDE will automatically provide **autocompletion, type-checking, inline documentation with examples, and compile time validation** for each and every method.
121
+ >
122
+ > Just hit **Cmd+Space/Ctrl+Space!**
123
+
124
+ ## Links
125
+
126
+ - **Homepage:** [usecortex.ai](https://www.usecortex.ai/)
127
+ - **Documentation:** [docs.usecortex.ai](https://docs.usecortex.ai/)
128
+
129
+ ## Our docs
130
+
131
+ Please refer to our [API reference](https://docs.usecortex.ai/api-reference/introduction) for detailed explanations of every API endpoint, parameter options, and advanced use cases.
132
+
133
+ ## Support
134
+
135
+ If you have any questions or need help, please reach out to our support team at [founders@usecortex.ai](mailto:founders@usecortex.ai).
@@ -1,40 +1,40 @@
1
- [build-system]
2
- requires = ["setuptools>=61.0"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
6
- name = "usecortex-ai"
7
-
8
- version = "0.3.6"
9
-
10
- authors = [
11
- { name = "Nishkarsh Shrivastava", email = "nishkarsh@usecortex.ai" },
12
- ]
13
- description = "The official Python SDK for the Cortex AI platform."
14
- readme = "README.md"
15
- requires-python = ">=3.10"
16
- license = { file = "LICENSE" }
17
- keywords = ["cortex", "ai", "sdk", "api", "generative ai", "rag"]
18
-
19
- # Add classifiers to help users find your package on PyPI
20
- classifiers = [
21
- # See https://pypi.org/classifiers/
22
- "Development Status :: 5 - Production/Stable",
23
- "Programming Language :: Python :: 3",
24
- "Programming Language :: Python :: 3.10",
25
- "Programming Language :: Python :: 3.11",
26
- "Programming Language :: Python :: 3.12",
27
- "Intended Audience :: Developers",
28
- "Topic :: Software Development :: Libraries :: Python Modules",
29
- "Typing :: Typed",
30
- ]
31
-
32
- dependencies = [
33
- "httpx>=0.24",
34
- "pydantic>=1.10,<3",
35
- ]
36
-
37
- [project.urls]
38
- Homepage = "https://www.usecortex.ai/"
39
- Documentation = "https://docs.usecortex.ai/"
40
-
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "usecortex-ai"
7
+
8
+ version = "0.5.0"
9
+
10
+ authors = [
11
+ { name = "Soham Ratnaparkhi", email = "soham@usecortex.ai" },
12
+ ]
13
+ description = "The official Python SDK for the Cortex AI platform."
14
+ readme = "README.md"
15
+ requires-python = ">=3.10"
16
+ license = { file = "LICENSE" }
17
+ keywords = ["cortex", "ai", "sdk", "api", "generative ai", "rag"]
18
+
19
+ # Add classifiers to help users find your package on PyPI
20
+ classifiers = [
21
+ # See https://pypi.org/classifiers/
22
+ "Development Status :: 5 - Production/Stable",
23
+ "Programming Language :: Python :: 3",
24
+ "Programming Language :: Python :: 3.10",
25
+ "Programming Language :: Python :: 3.11",
26
+ "Programming Language :: Python :: 3.12",
27
+ "Intended Audience :: Developers",
28
+ "Topic :: Software Development :: Libraries :: Python Modules",
29
+ "Typing :: Typed",
30
+ ]
31
+
32
+ dependencies = [
33
+ "httpx>=0.24",
34
+ "pydantic>=1.10,<3",
35
+ ]
36
+
37
+ [project.urls]
38
+ Homepage = "https://www.usecortex.ai/"
39
+ Documentation = "https://docs.usecortex.ai/"
40
+
File without changes
@@ -0,0 +1,156 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
5
+ from .types import (
6
+ ActualErrorResponse,
7
+ AddMemoryResponse,
8
+ ApiKeyInfo,
9
+ AppSourcesUploadData,
10
+ AttachmentModel,
11
+ Bm25OperatorType,
12
+ CollectionStats,
13
+ ContentModel,
14
+ CustomPropertyDefinition,
15
+ DashboardApisResponse,
16
+ DashboardSourcesResponse,
17
+ DashboardTenantsResponse,
18
+ DeleteResult,
19
+ DeleteUserMemoryResponse,
20
+ Entity,
21
+ ErrorResponse,
22
+ FetchMode,
23
+ ForcefulRelationsPayload,
24
+ GraphContext,
25
+ HttpValidationError,
26
+ Infra,
27
+ InsertResult,
28
+ MemoryItem,
29
+ MemoryResultItem,
30
+ MilvusDataType,
31
+ PathTriplet,
32
+ ProcessingStatus,
33
+ ProcessingStatusIndexingStatus,
34
+ QnASearchResponse,
35
+ RawEmbeddingDocument,
36
+ RawEmbeddingSearchResult,
37
+ RawEmbeddingVector,
38
+ RelationEvidence,
39
+ RetrievalResult,
40
+ RetrieveMode,
41
+ ScoredPathResponse,
42
+ SearchMode,
43
+ SourceDeleteResponse,
44
+ SourceDeleteResultItem,
45
+ SourceFetchResponse,
46
+ SourceGraphRelationsResponse,
47
+ SourceListResponse,
48
+ SourceModel,
49
+ SourceStatus,
50
+ SourceUploadResponse,
51
+ SourceUploadResultItem,
52
+ SupportedLlmProviders,
53
+ TenantCreateResponse,
54
+ TenantInfo,
55
+ TenantMetadataSchemaInfo,
56
+ TenantStatsResponse,
57
+ TripletWithEvidence,
58
+ UserAssistantPair,
59
+ ValidationError,
60
+ ValidationErrorLocItem,
61
+ VectorStoreChunk,
62
+ )
63
+ from .errors import (
64
+ BadRequestError,
65
+ ForbiddenError,
66
+ InternalServerError,
67
+ NotFoundError,
68
+ ServiceUnavailableError,
69
+ TooManyRequestsError,
70
+ UnauthorizedError,
71
+ UnprocessableEntityError,
72
+ )
73
+ from . import dashboard, embeddings, fetch, search, sources, tenant, upload
74
+ from .client import AsyncCortexAI, CortexAI
75
+ from .environment import CortexAIEnvironment
76
+ from .search import Alpha
77
+ from .upload import BodyUploadAppIngestionUploadAppPostAppSources
78
+
79
+ __all__ = [
80
+ "ActualErrorResponse",
81
+ "AddMemoryResponse",
82
+ "Alpha",
83
+ "ApiKeyInfo",
84
+ "AppSourcesUploadData",
85
+ "AsyncCortexAI",
86
+ "AttachmentModel",
87
+ "BadRequestError",
88
+ "Bm25OperatorType",
89
+ "BodyUploadAppIngestionUploadAppPostAppSources",
90
+ "CollectionStats",
91
+ "ContentModel",
92
+ "CortexAI",
93
+ "CortexAIEnvironment",
94
+ "CustomPropertyDefinition",
95
+ "DashboardApisResponse",
96
+ "DashboardSourcesResponse",
97
+ "DashboardTenantsResponse",
98
+ "DeleteResult",
99
+ "DeleteUserMemoryResponse",
100
+ "Entity",
101
+ "ErrorResponse",
102
+ "FetchMode",
103
+ "ForbiddenError",
104
+ "ForcefulRelationsPayload",
105
+ "GraphContext",
106
+ "HttpValidationError",
107
+ "Infra",
108
+ "InsertResult",
109
+ "InternalServerError",
110
+ "MemoryItem",
111
+ "MemoryResultItem",
112
+ "MilvusDataType",
113
+ "NotFoundError",
114
+ "PathTriplet",
115
+ "ProcessingStatus",
116
+ "ProcessingStatusIndexingStatus",
117
+ "QnASearchResponse",
118
+ "RawEmbeddingDocument",
119
+ "RawEmbeddingSearchResult",
120
+ "RawEmbeddingVector",
121
+ "RelationEvidence",
122
+ "RetrievalResult",
123
+ "RetrieveMode",
124
+ "ScoredPathResponse",
125
+ "SearchMode",
126
+ "ServiceUnavailableError",
127
+ "SourceDeleteResponse",
128
+ "SourceDeleteResultItem",
129
+ "SourceFetchResponse",
130
+ "SourceGraphRelationsResponse",
131
+ "SourceListResponse",
132
+ "SourceModel",
133
+ "SourceStatus",
134
+ "SourceUploadResponse",
135
+ "SourceUploadResultItem",
136
+ "SupportedLlmProviders",
137
+ "TenantCreateResponse",
138
+ "TenantInfo",
139
+ "TenantMetadataSchemaInfo",
140
+ "TenantStatsResponse",
141
+ "TooManyRequestsError",
142
+ "TripletWithEvidence",
143
+ "UnauthorizedError",
144
+ "UnprocessableEntityError",
145
+ "UserAssistantPair",
146
+ "ValidationError",
147
+ "ValidationErrorLocItem",
148
+ "VectorStoreChunk",
149
+ "dashboard",
150
+ "embeddings",
151
+ "fetch",
152
+ "search",
153
+ "sources",
154
+ "tenant",
155
+ "upload",
156
+ ]