usecortex-ai 0.5.0__py3-none-any.whl → 0.5.1__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 (35) hide show
  1. usecortex_ai/__init__.py +8 -4
  2. usecortex_ai/client.py +0 -4
  3. usecortex_ai/dashboard/client.py +2 -30
  4. usecortex_ai/dashboard/raw_client.py +0 -28
  5. usecortex_ai/embeddings/client.py +8 -58
  6. usecortex_ai/embeddings/raw_client.py +8 -58
  7. usecortex_ai/fetch/__init__.py +3 -0
  8. usecortex_ai/fetch/client.py +42 -165
  9. usecortex_ai/fetch/raw_client.py +38 -341
  10. usecortex_ai/fetch/types/__init__.py +7 -0
  11. usecortex_ai/fetch/types/fetch_list_knowledge_response.py +8 -0
  12. usecortex_ai/raw_client.py +0 -4
  13. usecortex_ai/search/client.py +36 -124
  14. usecortex_ai/search/raw_client.py +36 -124
  15. usecortex_ai/sources/client.py +2 -16
  16. usecortex_ai/sources/raw_client.py +2 -16
  17. usecortex_ai/tenant/client.py +4 -108
  18. usecortex_ai/tenant/raw_client.py +2 -106
  19. usecortex_ai/types/__init__.py +6 -2
  20. usecortex_ai/types/list_content_kind.py +5 -0
  21. usecortex_ai/types/list_user_memories_response.py +32 -0
  22. usecortex_ai/types/retrieval_result.py +1 -1
  23. usecortex_ai/types/retrieve_mode.py +1 -1
  24. usecortex_ai/types/user_memory.py +31 -0
  25. usecortex_ai/upload/__init__.py +0 -3
  26. usecortex_ai/upload/client.py +34 -204
  27. usecortex_ai/upload/raw_client.py +30 -382
  28. {usecortex_ai-0.5.0.dist-info → usecortex_ai-0.5.1.dist-info}/METADATA +1 -1
  29. {usecortex_ai-0.5.0.dist-info → usecortex_ai-0.5.1.dist-info}/RECORD +32 -30
  30. {usecortex_ai-0.5.0.dist-info → usecortex_ai-0.5.1.dist-info}/licenses/LICENSE +21 -21
  31. {usecortex_ai-0.5.0.dist-info → usecortex_ai-0.5.1.dist-info}/top_level.txt +0 -0
  32. usecortex_ai/types/app_sources_upload_data.py +0 -39
  33. usecortex_ai/upload/types/__init__.py +0 -7
  34. usecortex_ai/upload/types/body_upload_app_ingestion_upload_app_post_app_sources.py +0 -7
  35. {usecortex_ai-0.5.0.dist-info → usecortex_ai-0.5.1.dist-info}/WHEEL +0 -0
@@ -38,47 +38,6 @@ class RawTenantClient:
38
38
  request_options: typing.Optional[RequestOptions] = None,
39
39
  ) -> HttpResponse[TenantCreateResponse]:
40
40
  """
41
- Create a tenant for your account.
42
-
43
- Use this endpoint to initialize a tenant space you can use for ingestion, embeddings, and search.
44
-
45
- **Tenant Metadata Schema**
46
-
47
- You can optionally provide a `tenant_metadata_schema` to define custom fields that will be
48
- indexed in the vector store. Each field can be configured with:
49
-
50
- - `enable_match`: Enable text filtering on this field
51
- - `enable_dense_embedding`: Create dense embeddings for semantic similarity search
52
- - `enable_sparse_embedding`: Create sparse embeddings (BM25) for keyword search
53
-
54
- **Example Request:**
55
- ```json
56
- {
57
- "tenant_id": "my-tenant",
58
- "tenant_metadata_schema": [
59
- {
60
- "name": "category",
61
- "data_type": "VARCHAR",
62
- "max_length": 256,
63
- "enable_match": true
64
- },
65
- {
66
- "name": "product_description",
67
- "data_type": "VARCHAR",
68
- "max_length": 4096,
69
- "enable_dense_embedding": true,
70
- "enable_sparse_embedding": true
71
- }
72
- ]
73
- }
74
- ```
75
-
76
- Expected outcome:
77
- - A tenant is created and returned with its identifier.
78
- - If tenant_metadata_schema is provided, the vector store collection will include
79
- the specified custom fields with their configured search capabilities.
80
- - If the tenant already exists, you receive a success message with the existing identifier.
81
-
82
41
  Parameters
83
42
  ----------
84
43
  tenant_id : str
@@ -216,17 +175,6 @@ class RawTenantClient:
216
175
  self, *, tenant_id: str, request_options: typing.Optional[RequestOptions] = None
217
176
  ) -> HttpResponse[TenantStatsResponse]:
218
177
  """
219
- Retrieve usage stats for your tenant.
220
-
221
- Use this endpoint to check whether a tenant exists and view core metrics like total
222
- indexed objects and vector dimension. This helps you validate
223
- setup and monitor ingestion.
224
-
225
- Expected outcome
226
-
227
- You receive the current object count and vector dimension for the tenant.
228
- If the tenant does not exist, you get a not-found error.
229
-
230
178
  Parameters
231
179
  ----------
232
180
  tenant_id : str
@@ -241,7 +189,7 @@ class RawTenantClient:
241
189
  Successful Response
242
190
  """
243
191
  _response = self._client_wrapper.httpx_client.request(
244
- "tenants/stats",
192
+ "tenants/monitor",
245
193
  method="GET",
246
194
  params={
247
195
  "tenant_id": tenant_id,
@@ -355,47 +303,6 @@ class AsyncRawTenantClient:
355
303
  request_options: typing.Optional[RequestOptions] = None,
356
304
  ) -> AsyncHttpResponse[TenantCreateResponse]:
357
305
  """
358
- Create a tenant for your account.
359
-
360
- Use this endpoint to initialize a tenant space you can use for ingestion, embeddings, and search.
361
-
362
- **Tenant Metadata Schema**
363
-
364
- You can optionally provide a `tenant_metadata_schema` to define custom fields that will be
365
- indexed in the vector store. Each field can be configured with:
366
-
367
- - `enable_match`: Enable text filtering on this field
368
- - `enable_dense_embedding`: Create dense embeddings for semantic similarity search
369
- - `enable_sparse_embedding`: Create sparse embeddings (BM25) for keyword search
370
-
371
- **Example Request:**
372
- ```json
373
- {
374
- "tenant_id": "my-tenant",
375
- "tenant_metadata_schema": [
376
- {
377
- "name": "category",
378
- "data_type": "VARCHAR",
379
- "max_length": 256,
380
- "enable_match": true
381
- },
382
- {
383
- "name": "product_description",
384
- "data_type": "VARCHAR",
385
- "max_length": 4096,
386
- "enable_dense_embedding": true,
387
- "enable_sparse_embedding": true
388
- }
389
- ]
390
- }
391
- ```
392
-
393
- Expected outcome:
394
- - A tenant is created and returned with its identifier.
395
- - If tenant_metadata_schema is provided, the vector store collection will include
396
- the specified custom fields with their configured search capabilities.
397
- - If the tenant already exists, you receive a success message with the existing identifier.
398
-
399
306
  Parameters
400
307
  ----------
401
308
  tenant_id : str
@@ -533,17 +440,6 @@ class AsyncRawTenantClient:
533
440
  self, *, tenant_id: str, request_options: typing.Optional[RequestOptions] = None
534
441
  ) -> AsyncHttpResponse[TenantStatsResponse]:
535
442
  """
536
- Retrieve usage stats for your tenant.
537
-
538
- Use this endpoint to check whether a tenant exists and view core metrics like total
539
- indexed objects and vector dimension. This helps you validate
540
- setup and monitor ingestion.
541
-
542
- Expected outcome
543
-
544
- You receive the current object count and vector dimension for the tenant.
545
- If the tenant does not exist, you get a not-found error.
546
-
547
443
  Parameters
548
444
  ----------
549
445
  tenant_id : str
@@ -558,7 +454,7 @@ class AsyncRawTenantClient:
558
454
  Successful Response
559
455
  """
560
456
  _response = await self._client_wrapper.httpx_client.request(
561
- "tenants/stats",
457
+ "tenants/monitor",
562
458
  method="GET",
563
459
  params={
564
460
  "tenant_id": tenant_id,
@@ -5,7 +5,6 @@
5
5
  from .actual_error_response import ActualErrorResponse
6
6
  from .add_memory_response import AddMemoryResponse
7
7
  from .api_key_info import ApiKeyInfo
8
- from .app_sources_upload_data import AppSourcesUploadData
9
8
  from .attachment_model import AttachmentModel
10
9
  from .bm_25_operator_type import Bm25OperatorType
11
10
  from .collection_stats import CollectionStats
@@ -24,6 +23,8 @@ from .graph_context import GraphContext
24
23
  from .http_validation_error import HttpValidationError
25
24
  from .infra import Infra
26
25
  from .insert_result import InsertResult
26
+ from .list_content_kind import ListContentKind
27
+ from .list_user_memories_response import ListUserMemoriesResponse
27
28
  from .memory_item import MemoryItem
28
29
  from .memory_result_item import MemoryResultItem
29
30
  from .milvus_data_type import MilvusDataType
@@ -55,6 +56,7 @@ from .tenant_metadata_schema_info import TenantMetadataSchemaInfo
55
56
  from .tenant_stats_response import TenantStatsResponse
56
57
  from .triplet_with_evidence import TripletWithEvidence
57
58
  from .user_assistant_pair import UserAssistantPair
59
+ from .user_memory import UserMemory
58
60
  from .validation_error import ValidationError
59
61
  from .validation_error_loc_item import ValidationErrorLocItem
60
62
  from .vector_store_chunk import VectorStoreChunk
@@ -63,7 +65,6 @@ __all__ = [
63
65
  "ActualErrorResponse",
64
66
  "AddMemoryResponse",
65
67
  "ApiKeyInfo",
66
- "AppSourcesUploadData",
67
68
  "AttachmentModel",
68
69
  "Bm25OperatorType",
69
70
  "CollectionStats",
@@ -82,6 +83,8 @@ __all__ = [
82
83
  "HttpValidationError",
83
84
  "Infra",
84
85
  "InsertResult",
86
+ "ListContentKind",
87
+ "ListUserMemoriesResponse",
85
88
  "MemoryItem",
86
89
  "MemoryResultItem",
87
90
  "MilvusDataType",
@@ -113,6 +116,7 @@ __all__ = [
113
116
  "TenantStatsResponse",
114
117
  "TripletWithEvidence",
115
118
  "UserAssistantPair",
119
+ "UserMemory",
116
120
  "ValidationError",
117
121
  "ValidationErrorLocItem",
118
122
  "VectorStoreChunk",
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ ListContentKind = typing.Union[typing.Literal["knowledge", "memories"], typing.Any]
@@ -0,0 +1,32 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+ from .user_memory import UserMemory
8
+
9
+
10
+ class ListUserMemoriesResponse(UniversalBaseModel):
11
+ """
12
+ Response model for listing all user memories.
13
+ """
14
+
15
+ success: typing.Optional[bool] = pydantic.Field(default=None)
16
+ """
17
+ Indicates whether the memory listing operation was successful
18
+ """
19
+
20
+ user_memories: typing.Optional[typing.List[UserMemory]] = pydantic.Field(default=None)
21
+ """
22
+ Array of all user memories associated with your tenant
23
+ """
24
+
25
+ if IS_PYDANTIC_V2:
26
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
27
+ else:
28
+
29
+ class Config:
30
+ frozen = True
31
+ smart_union = True
32
+ extra = pydantic.Extra.allow
@@ -15,7 +15,7 @@ class RetrievalResult(UniversalBaseModel):
15
15
 
16
16
  chunks: typing.Optional[typing.List[VectorStoreChunk]] = None
17
17
  graph_context: typing.Optional[GraphContext] = None
18
- extra_context: typing.Optional[typing.Dict[str, VectorStoreChunk]] = pydantic.Field(default=None)
18
+ additional_context: typing.Optional[typing.Dict[str, VectorStoreChunk]] = pydantic.Field(default=None)
19
19
  """
20
20
  Map of chunk_uuid to VectorStoreChunk for extra context from forcefully related sources. Use chunk.extra_context_ids to look up chunks: extra_context[id] for id in chunk.extra_context_ids.
21
21
  """
@@ -2,4 +2,4 @@
2
2
 
3
3
  import typing
4
4
 
5
- RetrieveMode = typing.Union[typing.Literal["fast", "accurate"], typing.Any]
5
+ RetrieveMode = typing.Union[typing.Literal["fast", "thinking"], typing.Any]
@@ -0,0 +1,31 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
+
8
+
9
+ class UserMemory(UniversalBaseModel):
10
+ """
11
+ Represents a user memory stored in the system.
12
+ """
13
+
14
+ memory_id: str = pydantic.Field()
15
+ """
16
+ Unique identifier for the user memory
17
+ """
18
+
19
+ memory_content: str = pydantic.Field()
20
+ """
21
+ The actual memory content text that was stored
22
+ """
23
+
24
+ if IS_PYDANTIC_V2:
25
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
26
+ else:
27
+
28
+ class Config:
29
+ frozen = True
30
+ smart_union = True
31
+ extra = pydantic.Extra.allow
@@ -2,6 +2,3 @@
2
2
 
3
3
  # isort: skip_file
4
4
 
5
- from .types import BodyUploadAppIngestionUploadAppPostAppSources
6
-
7
- __all__ = ["BodyUploadAppIngestionUploadAppPostAppSources"]