usecortex-ai 0.3.6__py3-none-any.whl → 0.5.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 (107) hide show
  1. usecortex_ai/__init__.py +82 -70
  2. usecortex_ai/client.py +25 -23
  3. usecortex_ai/dashboard/client.py +448 -0
  4. usecortex_ai/{user_memory → dashboard}/raw_client.py +371 -530
  5. usecortex_ai/embeddings/client.py +229 -102
  6. usecortex_ai/embeddings/raw_client.py +323 -211
  7. usecortex_ai/errors/__init__.py +2 -0
  8. usecortex_ai/errors/bad_request_error.py +1 -2
  9. usecortex_ai/errors/forbidden_error.py +1 -2
  10. usecortex_ai/errors/internal_server_error.py +1 -2
  11. usecortex_ai/errors/not_found_error.py +1 -2
  12. usecortex_ai/errors/service_unavailable_error.py +1 -2
  13. usecortex_ai/errors/too_many_requests_error.py +11 -0
  14. usecortex_ai/errors/unauthorized_error.py +1 -2
  15. usecortex_ai/fetch/client.py +350 -29
  16. usecortex_ai/fetch/raw_client.py +919 -65
  17. usecortex_ai/raw_client.py +8 -2
  18. usecortex_ai/search/client.py +313 -257
  19. usecortex_ai/search/raw_client.py +463 -344
  20. usecortex_ai/search/types/alpha.py +1 -1
  21. usecortex_ai/sources/client.py +29 -216
  22. usecortex_ai/sources/raw_client.py +51 -589
  23. usecortex_ai/tenant/client.py +155 -118
  24. usecortex_ai/tenant/raw_client.py +227 -350
  25. usecortex_ai/types/__init__.py +76 -66
  26. usecortex_ai/types/add_memory_response.py +39 -0
  27. usecortex_ai/types/{scored_triplet_response.py → api_key_info.py} +16 -12
  28. usecortex_ai/types/app_sources_upload_data.py +15 -6
  29. usecortex_ai/types/{file_upload_result.py → collection_stats.py} +5 -5
  30. usecortex_ai/types/custom_property_definition.py +75 -0
  31. usecortex_ai/types/dashboard_apis_response.py +33 -0
  32. usecortex_ai/types/dashboard_sources_response.py +33 -0
  33. usecortex_ai/types/dashboard_tenants_response.py +33 -0
  34. usecortex_ai/types/{list_sources_response.py → delete_result.py} +10 -7
  35. usecortex_ai/types/delete_user_memory_response.py +1 -1
  36. usecortex_ai/types/entity.py +4 -4
  37. usecortex_ai/types/fetch_mode.py +5 -0
  38. usecortex_ai/types/{relations.py → forceful_relations_payload.py} +4 -4
  39. usecortex_ai/types/graph_context.py +26 -0
  40. usecortex_ai/types/{delete_sources.py → infra.py} +4 -3
  41. usecortex_ai/types/{fetch_content_data.py → insert_result.py} +12 -8
  42. usecortex_ai/types/memory_item.py +88 -0
  43. usecortex_ai/types/memory_result_item.py +47 -0
  44. usecortex_ai/types/milvus_data_type.py +21 -0
  45. usecortex_ai/types/path_triplet.py +3 -18
  46. usecortex_ai/types/processing_status.py +3 -2
  47. usecortex_ai/types/processing_status_indexing_status.py +7 -0
  48. usecortex_ai/types/qn_a_search_response.py +49 -0
  49. usecortex_ai/types/{retrieve_response.py → raw_embedding_document.py} +11 -8
  50. usecortex_ai/types/raw_embedding_search_result.py +47 -0
  51. usecortex_ai/types/{user_memory.py → raw_embedding_vector.py} +6 -6
  52. usecortex_ai/types/relation_evidence.py +24 -5
  53. usecortex_ai/types/retrieval_result.py +30 -0
  54. usecortex_ai/types/scored_path_response.py +5 -19
  55. usecortex_ai/types/search_mode.py +5 -0
  56. usecortex_ai/types/{batch_upload_data.py → source_delete_response.py} +8 -8
  57. usecortex_ai/types/{list_user_memories_response.py → source_delete_result_item.py} +11 -7
  58. usecortex_ai/types/source_fetch_response.py +70 -0
  59. usecortex_ai/types/{graph_relations_response.py → source_graph_relations_response.py} +3 -3
  60. usecortex_ai/types/{single_upload_data.py → source_list_response.py} +7 -10
  61. usecortex_ai/types/source_model.py +11 -1
  62. usecortex_ai/types/source_status.py +5 -0
  63. usecortex_ai/types/source_upload_response.py +35 -0
  64. usecortex_ai/types/source_upload_result_item.py +38 -0
  65. usecortex_ai/types/supported_llm_providers.py +5 -0
  66. usecortex_ai/types/{embeddings_create_collection_data.py → tenant_create_response.py} +9 -7
  67. usecortex_ai/types/{webpage_scrape_request.py → tenant_info.py} +10 -5
  68. usecortex_ai/types/tenant_metadata_schema_info.py +36 -0
  69. usecortex_ai/types/{tenant_create_data.py → tenant_stats_response.py} +9 -8
  70. usecortex_ai/types/{triple_with_evidence.py → triplet_with_evidence.py} +5 -1
  71. usecortex_ai/types/user_assistant_pair.py +4 -0
  72. usecortex_ai/types/{search_chunk.py → vector_store_chunk.py} +5 -11
  73. usecortex_ai/upload/__init__.py +3 -0
  74. usecortex_ai/upload/client.py +233 -1937
  75. usecortex_ai/upload/raw_client.py +364 -4401
  76. usecortex_ai/upload/types/__init__.py +7 -0
  77. usecortex_ai/upload/types/body_upload_app_ingestion_upload_app_post_app_sources.py +7 -0
  78. {usecortex_ai-0.3.6.dist-info → usecortex_ai-0.5.0.dist-info}/METADATA +2 -2
  79. usecortex_ai-0.5.0.dist-info/RECORD +114 -0
  80. {usecortex_ai-0.3.6.dist-info → usecortex_ai-0.5.0.dist-info}/WHEEL +1 -1
  81. {usecortex_ai-0.3.6.dist-info → usecortex_ai-0.5.0.dist-info}/licenses/LICENSE +21 -21
  82. {usecortex_ai-0.3.6.dist-info → usecortex_ai-0.5.0.dist-info}/top_level.txt +0 -0
  83. usecortex_ai/document/client.py +0 -139
  84. usecortex_ai/document/raw_client.py +0 -312
  85. usecortex_ai/types/add_user_memory_response.py +0 -41
  86. usecortex_ai/types/body_scrape_webpage_upload_scrape_webpage_post.py +0 -17
  87. usecortex_ai/types/body_update_scrape_job_upload_update_webpage_patch.py +0 -17
  88. usecortex_ai/types/chunk_graph_relations_response.py +0 -33
  89. usecortex_ai/types/delete_memory_request.py +0 -32
  90. usecortex_ai/types/delete_sub_tenant_data.py +0 -42
  91. usecortex_ai/types/embeddings_delete_data.py +0 -37
  92. usecortex_ai/types/embeddings_get_data.py +0 -37
  93. usecortex_ai/types/embeddings_search_data.py +0 -37
  94. usecortex_ai/types/extended_context.py +0 -17
  95. usecortex_ai/types/markdown_upload_request.py +0 -41
  96. usecortex_ai/types/related_chunk.py +0 -22
  97. usecortex_ai/types/retrieve_user_memory_response.py +0 -38
  98. usecortex_ai/types/source.py +0 -52
  99. usecortex_ai/types/sub_tenant_ids_data.py +0 -47
  100. usecortex_ai/types/tenant_stats.py +0 -42
  101. usecortex_ai/user/__init__.py +0 -4
  102. usecortex_ai/user/client.py +0 -145
  103. usecortex_ai/user/raw_client.py +0 -316
  104. usecortex_ai/user_memory/__init__.py +0 -4
  105. usecortex_ai/user_memory/client.py +0 -515
  106. usecortex_ai-0.3.6.dist-info/RECORD +0 -112
  107. /usecortex_ai/{document → dashboard}/__init__.py +0 -0
@@ -3,107 +3,117 @@
3
3
  # isort: skip_file
4
4
 
5
5
  from .actual_error_response import ActualErrorResponse
6
- from .add_user_memory_response import AddUserMemoryResponse
6
+ from .add_memory_response import AddMemoryResponse
7
+ from .api_key_info import ApiKeyInfo
7
8
  from .app_sources_upload_data import AppSourcesUploadData
8
9
  from .attachment_model import AttachmentModel
9
- from .batch_upload_data import BatchUploadData
10
10
  from .bm_25_operator_type import Bm25OperatorType
11
- from .body_scrape_webpage_upload_scrape_webpage_post import BodyScrapeWebpageUploadScrapeWebpagePost
12
- from .body_update_scrape_job_upload_update_webpage_patch import BodyUpdateScrapeJobUploadUpdateWebpagePatch
13
- from .chunk_graph_relations_response import ChunkGraphRelationsResponse
11
+ from .collection_stats import CollectionStats
14
12
  from .content_model import ContentModel
15
- from .delete_memory_request import DeleteMemoryRequest
16
- from .delete_sources import DeleteSources
17
- from .delete_sub_tenant_data import DeleteSubTenantData
13
+ from .custom_property_definition import CustomPropertyDefinition
14
+ from .dashboard_apis_response import DashboardApisResponse
15
+ from .dashboard_sources_response import DashboardSourcesResponse
16
+ from .dashboard_tenants_response import DashboardTenantsResponse
17
+ from .delete_result import DeleteResult
18
18
  from .delete_user_memory_response import DeleteUserMemoryResponse
19
- from .embeddings_create_collection_data import EmbeddingsCreateCollectionData
20
- from .embeddings_delete_data import EmbeddingsDeleteData
21
- from .embeddings_get_data import EmbeddingsGetData
22
- from .embeddings_search_data import EmbeddingsSearchData
23
19
  from .entity import Entity
24
20
  from .error_response import ErrorResponse
25
- from .extended_context import ExtendedContext
26
- from .fetch_content_data import FetchContentData
27
- from .file_upload_result import FileUploadResult
28
- from .graph_relations_response import GraphRelationsResponse
21
+ from .fetch_mode import FetchMode
22
+ from .forceful_relations_payload import ForcefulRelationsPayload
23
+ from .graph_context import GraphContext
29
24
  from .http_validation_error import HttpValidationError
30
- from .list_sources_response import ListSourcesResponse
31
- from .list_user_memories_response import ListUserMemoriesResponse
32
- from .markdown_upload_request import MarkdownUploadRequest
25
+ from .infra import Infra
26
+ from .insert_result import InsertResult
27
+ from .memory_item import MemoryItem
28
+ from .memory_result_item import MemoryResultItem
29
+ from .milvus_data_type import MilvusDataType
33
30
  from .path_triplet import PathTriplet
34
31
  from .processing_status import ProcessingStatus
35
- from .related_chunk import RelatedChunk
32
+ from .processing_status_indexing_status import ProcessingStatusIndexingStatus
33
+ from .qn_a_search_response import QnASearchResponse
34
+ from .raw_embedding_document import RawEmbeddingDocument
35
+ from .raw_embedding_search_result import RawEmbeddingSearchResult
36
+ from .raw_embedding_vector import RawEmbeddingVector
36
37
  from .relation_evidence import RelationEvidence
37
- from .relations import Relations
38
+ from .retrieval_result import RetrievalResult
38
39
  from .retrieve_mode import RetrieveMode
39
- from .retrieve_response import RetrieveResponse
40
- from .retrieve_user_memory_response import RetrieveUserMemoryResponse
41
40
  from .scored_path_response import ScoredPathResponse
42
- from .scored_triplet_response import ScoredTripletResponse
43
- from .search_chunk import SearchChunk
44
- from .single_upload_data import SingleUploadData
45
- from .source import Source
41
+ from .search_mode import SearchMode
42
+ from .source_delete_response import SourceDeleteResponse
43
+ from .source_delete_result_item import SourceDeleteResultItem
44
+ from .source_fetch_response import SourceFetchResponse
45
+ from .source_graph_relations_response import SourceGraphRelationsResponse
46
+ from .source_list_response import SourceListResponse
46
47
  from .source_model import SourceModel
47
- from .sub_tenant_ids_data import SubTenantIdsData
48
- from .tenant_create_data import TenantCreateData
49
- from .tenant_stats import TenantStats
50
- from .triple_with_evidence import TripleWithEvidence
48
+ from .source_status import SourceStatus
49
+ from .source_upload_response import SourceUploadResponse
50
+ from .source_upload_result_item import SourceUploadResultItem
51
+ from .supported_llm_providers import SupportedLlmProviders
52
+ from .tenant_create_response import TenantCreateResponse
53
+ from .tenant_info import TenantInfo
54
+ from .tenant_metadata_schema_info import TenantMetadataSchemaInfo
55
+ from .tenant_stats_response import TenantStatsResponse
56
+ from .triplet_with_evidence import TripletWithEvidence
51
57
  from .user_assistant_pair import UserAssistantPair
52
- from .user_memory import UserMemory
53
58
  from .validation_error import ValidationError
54
59
  from .validation_error_loc_item import ValidationErrorLocItem
55
- from .webpage_scrape_request import WebpageScrapeRequest
60
+ from .vector_store_chunk import VectorStoreChunk
56
61
 
57
62
  __all__ = [
58
63
  "ActualErrorResponse",
59
- "AddUserMemoryResponse",
64
+ "AddMemoryResponse",
65
+ "ApiKeyInfo",
60
66
  "AppSourcesUploadData",
61
67
  "AttachmentModel",
62
- "BatchUploadData",
63
68
  "Bm25OperatorType",
64
- "BodyScrapeWebpageUploadScrapeWebpagePost",
65
- "BodyUpdateScrapeJobUploadUpdateWebpagePatch",
66
- "ChunkGraphRelationsResponse",
69
+ "CollectionStats",
67
70
  "ContentModel",
68
- "DeleteMemoryRequest",
69
- "DeleteSources",
70
- "DeleteSubTenantData",
71
+ "CustomPropertyDefinition",
72
+ "DashboardApisResponse",
73
+ "DashboardSourcesResponse",
74
+ "DashboardTenantsResponse",
75
+ "DeleteResult",
71
76
  "DeleteUserMemoryResponse",
72
- "EmbeddingsCreateCollectionData",
73
- "EmbeddingsDeleteData",
74
- "EmbeddingsGetData",
75
- "EmbeddingsSearchData",
76
77
  "Entity",
77
78
  "ErrorResponse",
78
- "ExtendedContext",
79
- "FetchContentData",
80
- "FileUploadResult",
81
- "GraphRelationsResponse",
79
+ "FetchMode",
80
+ "ForcefulRelationsPayload",
81
+ "GraphContext",
82
82
  "HttpValidationError",
83
- "ListSourcesResponse",
84
- "ListUserMemoriesResponse",
85
- "MarkdownUploadRequest",
83
+ "Infra",
84
+ "InsertResult",
85
+ "MemoryItem",
86
+ "MemoryResultItem",
87
+ "MilvusDataType",
86
88
  "PathTriplet",
87
89
  "ProcessingStatus",
88
- "RelatedChunk",
90
+ "ProcessingStatusIndexingStatus",
91
+ "QnASearchResponse",
92
+ "RawEmbeddingDocument",
93
+ "RawEmbeddingSearchResult",
94
+ "RawEmbeddingVector",
89
95
  "RelationEvidence",
90
- "Relations",
96
+ "RetrievalResult",
91
97
  "RetrieveMode",
92
- "RetrieveResponse",
93
- "RetrieveUserMemoryResponse",
94
98
  "ScoredPathResponse",
95
- "ScoredTripletResponse",
96
- "SearchChunk",
97
- "SingleUploadData",
98
- "Source",
99
+ "SearchMode",
100
+ "SourceDeleteResponse",
101
+ "SourceDeleteResultItem",
102
+ "SourceFetchResponse",
103
+ "SourceGraphRelationsResponse",
104
+ "SourceListResponse",
99
105
  "SourceModel",
100
- "SubTenantIdsData",
101
- "TenantCreateData",
102
- "TenantStats",
103
- "TripleWithEvidence",
106
+ "SourceStatus",
107
+ "SourceUploadResponse",
108
+ "SourceUploadResultItem",
109
+ "SupportedLlmProviders",
110
+ "TenantCreateResponse",
111
+ "TenantInfo",
112
+ "TenantMetadataSchemaInfo",
113
+ "TenantStatsResponse",
114
+ "TripletWithEvidence",
104
115
  "UserAssistantPair",
105
- "UserMemory",
106
116
  "ValidationError",
107
117
  "ValidationErrorLocItem",
108
- "WebpageScrapeRequest",
118
+ "VectorStoreChunk",
109
119
  ]
@@ -0,0 +1,39 @@
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 .memory_result_item import MemoryResultItem
8
+
9
+
10
+ class AddMemoryResponse(UniversalBaseModel):
11
+ """
12
+ Response model for add_memory endpoint.
13
+ """
14
+
15
+ success: typing.Optional[bool] = None
16
+ message: typing.Optional[str] = None
17
+ results: typing.Optional[typing.List[MemoryResultItem]] = pydantic.Field(default=None)
18
+ """
19
+ List of results for each ingested memory item.
20
+ """
21
+
22
+ success_count: typing.Optional[int] = pydantic.Field(default=None)
23
+ """
24
+ Number of items successfully queued for ingestion.
25
+ """
26
+
27
+ failed_count: typing.Optional[int] = pydantic.Field(default=None)
28
+ """
29
+ Number of items that failed to queue.
30
+ """
31
+
32
+ if IS_PYDANTIC_V2:
33
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
34
+ else:
35
+
36
+ class Config:
37
+ frozen = True
38
+ smart_union = True
39
+ extra = pydantic.Extra.allow
@@ -4,33 +4,37 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .entity import Entity
8
- from .relation_evidence import RelationEvidence
9
7
 
10
8
 
11
- class ScoredTripletResponse(UniversalBaseModel):
9
+ class ApiKeyInfo(UniversalBaseModel):
10
+ api_key_id: str = pydantic.Field()
12
11
  """
13
- Individual scored triplet for entity-based search results
12
+ API key identifier
14
13
  """
15
14
 
16
- source: Entity = pydantic.Field()
15
+ user_email: str = pydantic.Field()
17
16
  """
18
- Source entity
17
+ Owner email
19
18
  """
20
19
 
21
- target: Entity = pydantic.Field()
20
+ user_id: str = pydantic.Field()
22
21
  """
23
- Target entity
22
+ User ID
24
23
  """
25
24
 
26
- relation: RelationEvidence = pydantic.Field()
25
+ scopes: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
27
26
  """
28
- Relation between entities
27
+ API key scopes
29
28
  """
30
29
 
31
- relevancy_score: typing.Optional[float] = pydantic.Field(default=None)
30
+ is_valid: bool = pydantic.Field()
32
31
  """
33
- Relevancy score from reranking
32
+ Whether the API key is valid
33
+ """
34
+
35
+ created_at: str = pydantic.Field()
36
+ """
37
+ Creation timestamp
34
38
  """
35
39
 
36
40
  if IS_PYDANTIC_V2:
@@ -4,21 +4,30 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .file_upload_result import FileUploadResult
7
+ from .source_upload_result_item import SourceUploadResultItem
8
8
 
9
9
 
10
10
  class AppSourcesUploadData(UniversalBaseModel):
11
- uploaded: typing.List[FileUploadResult] = pydantic.Field()
12
11
  """
13
- List of successfully uploaded app source for indexing
12
+ Response model for uploads of app-generated sources.
14
13
  """
15
14
 
16
- message: str = pydantic.Field()
15
+ success: typing.Optional[bool] = None
16
+ message: typing.Optional[str] = None
17
+ results: typing.Optional[typing.List[SourceUploadResultItem]] = pydantic.Field(default=None)
17
18
  """
18
- Status message indicating app sources upload scheduled
19
+ List of upload results for each source.
19
20
  """
20
21
 
21
- success: typing.Optional[bool] = None
22
+ success_count: typing.Optional[int] = pydantic.Field(default=None)
23
+ """
24
+ Number of sources successfully queued.
25
+ """
26
+
27
+ failed_count: typing.Optional[int] = pydantic.Field(default=None)
28
+ """
29
+ Number of sources that failed to upload.
30
+ """
22
31
 
23
32
  if IS_PYDANTIC_V2:
24
33
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -6,15 +6,15 @@ import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
- class FileUploadResult(UniversalBaseModel):
10
- file_id: str = pydantic.Field()
9
+ class CollectionStats(UniversalBaseModel):
10
+ row_count: int = pydantic.Field()
11
11
  """
12
- Unique identifier for the file being processed
12
+ Number of rows in the collection
13
13
  """
14
14
 
15
- filename: typing.Optional[str] = pydantic.Field(default=None)
15
+ dimensions: int = pydantic.Field()
16
16
  """
17
- Name of the uploaded file, if provided
17
+ Number of dimensions in the collection
18
18
  """
19
19
 
20
20
  if IS_PYDANTIC_V2:
@@ -0,0 +1,75 @@
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 .milvus_data_type import MilvusDataType
8
+
9
+
10
+ class CustomPropertyDefinition(UniversalBaseModel):
11
+ """
12
+ Definition for custom/dynamic properties on a collection.
13
+
14
+ Use this to define tenant metadata fields that can enhance search capabilities:
15
+ - enable_dense_embedding: Creates a dense vector field for semantic similarity search
16
+ - enable_sparse_embedding: Creates a sparse vector field for BM25 keyword search
17
+
18
+ Example:
19
+ CustomPropertyDefinition(
20
+ name="product_description",
21
+ data_type=MilvusDataType.VARCHAR,
22
+ max_length=4096,
23
+ enable_dense_embedding=True, # Enables semantic search on this field
24
+ enable_sparse_embedding=True, # Enables keyword search on this field
25
+ )
26
+ """
27
+
28
+ name: str = pydantic.Field()
29
+ """
30
+ Property name (used as field name in Milvus)
31
+ """
32
+
33
+ data_type: typing.Optional[MilvusDataType] = pydantic.Field(default=None)
34
+ """
35
+ Milvus data type. Use VARCHAR for text fields that need embeddings.
36
+ """
37
+
38
+ max_length: typing.Optional[int] = pydantic.Field(default=None)
39
+ """
40
+ Max length for VARCHAR fields. Increase for longer text content.
41
+ """
42
+
43
+ enable_analyzer: typing.Optional[bool] = pydantic.Field(default=None)
44
+ """
45
+ Enable text analyzer for full-text search capabilities
46
+ """
47
+
48
+ enable_match: typing.Optional[bool] = pydantic.Field(default=None)
49
+ """
50
+ Enable TEXT_MATCH filtering on this field
51
+ """
52
+
53
+ enable_dense_embedding: typing.Optional[bool] = pydantic.Field(default=None)
54
+ """
55
+ Create a dense embedding field (FLOAT_VECTOR) for semantic similarity search. Only applicable to VARCHAR fields. A corresponding '{name}_embedding' field will be created.
56
+ """
57
+
58
+ enable_sparse_embedding: typing.Optional[bool] = pydantic.Field(default=None)
59
+ """
60
+ Create a sparse embedding field (BM25) for keyword search. Only applicable to VARCHAR fields. A corresponding '{name}_sparse' field and BM25 function will be created.
61
+ """
62
+
63
+ nullable: typing.Optional[bool] = pydantic.Field(default=None)
64
+ """
65
+ Whether field can be null
66
+ """
67
+
68
+ if IS_PYDANTIC_V2:
69
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
70
+ else:
71
+
72
+ class Config:
73
+ frozen = True
74
+ smart_union = True
75
+ extra = pydantic.Extra.allow
@@ -0,0 +1,33 @@
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 .api_key_info import ApiKeyInfo
8
+
9
+
10
+ class DashboardApisResponse(UniversalBaseModel):
11
+ api_keys: typing.Optional[typing.List[ApiKeyInfo]] = pydantic.Field(default=None)
12
+ """
13
+ List of API keys
14
+ """
15
+
16
+ count: int = pydantic.Field()
17
+ """
18
+ Total number of API keys
19
+ """
20
+
21
+ message: typing.Optional[str] = pydantic.Field(default=None)
22
+ """
23
+ Response message
24
+ """
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -0,0 +1,33 @@
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 .source_model import SourceModel
8
+
9
+
10
+ class DashboardSourcesResponse(UniversalBaseModel):
11
+ sources: typing.Optional[typing.List[SourceModel]] = pydantic.Field(default=None)
12
+ """
13
+ List of sources
14
+ """
15
+
16
+ count: int = pydantic.Field()
17
+ """
18
+ Total number of sources
19
+ """
20
+
21
+ message: typing.Optional[str] = pydantic.Field(default=None)
22
+ """
23
+ Response message
24
+ """
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -0,0 +1,33 @@
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 .tenant_info import TenantInfo
8
+
9
+
10
+ class DashboardTenantsResponse(UniversalBaseModel):
11
+ tenants: typing.Optional[typing.List[TenantInfo]] = pydantic.Field(default=None)
12
+ """
13
+ List of tenants
14
+ """
15
+
16
+ count: int = pydantic.Field()
17
+ """
18
+ Total number of tenants
19
+ """
20
+
21
+ message: typing.Optional[str] = pydantic.Field(default=None)
22
+ """
23
+ Response message
24
+ """
25
+
26
+ if IS_PYDANTIC_V2:
27
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
28
+ else:
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ extra = pydantic.Extra.allow
@@ -4,23 +4,26 @@ import typing
4
4
 
5
5
  import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
- from .source import Source
8
7
 
9
8
 
10
- class ListSourcesResponse(UniversalBaseModel):
11
- sources: typing.List[typing.Optional[Source]] = pydantic.Field()
9
+ class DeleteResult(UniversalBaseModel):
12
10
  """
13
- List of source documents retrieved
11
+ Result of a delete operation.
12
+ """
13
+
14
+ delete_count: int = pydantic.Field()
15
+ """
16
+ Number of entities deleted
14
17
  """
15
18
 
16
19
  success: typing.Optional[bool] = pydantic.Field(default=None)
17
20
  """
18
- Indicates whether the request was successful
21
+ Whether delete succeeded
19
22
  """
20
23
 
21
- message: typing.Optional[str] = pydantic.Field(default=None)
24
+ error: typing.Optional[str] = pydantic.Field(default=None)
22
25
  """
23
- Response message describing the operation result
26
+ Error message if failed
24
27
  """
25
28
 
26
29
  if IS_PYDANTIC_V2:
@@ -11,7 +11,7 @@ class DeleteUserMemoryResponse(UniversalBaseModel):
11
11
  Response model for deleting a user memory.
12
12
  """
13
13
 
14
- success: bool = pydantic.Field()
14
+ success: typing.Optional[bool] = pydantic.Field(default=None)
15
15
  """
16
16
  Indicates whether the memory deletion operation was successful
17
17
  """
@@ -22,14 +22,14 @@ class Entity(UniversalBaseModel):
22
22
  Context category like 'employees', 'projects'
23
23
  """
24
24
 
25
- identifier: typing.Optional[str] = pydantic.Field(default=None)
25
+ entity_id: str = pydantic.Field()
26
26
  """
27
- Unique ID like email, employee_id, URL
27
+ Internal unique entity ID from graph database
28
28
  """
29
29
 
30
- entity_id: typing.Optional[str] = pydantic.Field(default=None)
30
+ identifier: typing.Optional[str] = pydantic.Field(default=None)
31
31
  """
32
- Internal unique entity ID from graph database
32
+ Unique ID like email, employee_id, URL
33
33
  """
34
34
 
35
35
  if IS_PYDANTIC_V2:
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ FetchMode = typing.Union[typing.Literal["content", "url", "both"], typing.Any]
@@ -6,15 +6,15 @@ import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
- class Relations(UniversalBaseModel):
9
+ class ForcefulRelationsPayload(UniversalBaseModel):
10
10
  cortex_source_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
11
11
  """
12
- List of cortex source IDs to directly relate with
12
+ Cortex source IDs to forcefully relate to the uploaded source.
13
13
  """
14
14
 
15
- auto_discovery: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
15
+ properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
16
16
  """
17
- Key value pairs to allow cortex to automatically discover relations
17
+ Optional properties to attach to the forceful relation.
18
18
  """
19
19
 
20
20
  if IS_PYDANTIC_V2:
@@ -0,0 +1,26 @@
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 .scored_path_response import ScoredPathResponse
8
+
9
+
10
+ class GraphContext(UniversalBaseModel):
11
+ """
12
+ Graph context containing query-based paths and chunk-based relation paths.
13
+ """
14
+
15
+ query_paths: typing.Optional[typing.List[ScoredPathResponse]] = None
16
+ chunk_relations: typing.Optional[typing.List[ScoredPathResponse]] = None
17
+ chunk_id_to_group_ids: typing.Optional[typing.Dict[str, typing.List[str]]] = None
18
+
19
+ if IS_PYDANTIC_V2:
20
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
21
+ else:
22
+
23
+ class Config:
24
+ frozen = True
25
+ smart_union = True
26
+ extra = pydantic.Extra.allow
@@ -6,9 +6,10 @@ import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
- class DeleteSources(UniversalBaseModel):
10
- success: typing.Optional[bool] = None
11
- message: typing.Optional[str] = None
9
+ class Infra(UniversalBaseModel):
10
+ scheduler_status: bool
11
+ graph_status: bool
12
+ vectorstore_status: typing.List[typing.Optional[typing.Any]]
12
13
 
13
14
  if IS_PYDANTIC_V2:
14
15
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2