usecortex-ai 0.3.5__py3-none-any.whl → 0.4.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 (103) hide show
  1. usecortex_ai/__init__.py +84 -66
  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 +293 -257
  19. usecortex_ai/search/raw_client.py +445 -346
  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 +78 -62
  26. usecortex_ai/types/add_memory_response.py +39 -0
  27. usecortex_ai/types/{relations.py → api_key_info.py} +25 -5
  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/graph_context.py +26 -0
  39. usecortex_ai/types/{delete_sources.py → infra.py} +4 -3
  40. usecortex_ai/types/{fetch_content_data.py → insert_result.py} +12 -8
  41. usecortex_ai/types/memory_item.py +82 -0
  42. usecortex_ai/types/memory_result_item.py +47 -0
  43. usecortex_ai/types/milvus_data_type.py +21 -0
  44. usecortex_ai/types/{related_chunk.py → path_triplet.py} +6 -5
  45. usecortex_ai/types/processing_status.py +3 -2
  46. usecortex_ai/types/processing_status_indexing_status.py +7 -0
  47. usecortex_ai/types/qn_a_search_response.py +49 -0
  48. usecortex_ai/types/{retrieve_response.py → raw_embedding_document.py} +11 -8
  49. usecortex_ai/types/raw_embedding_search_result.py +47 -0
  50. usecortex_ai/types/{user_memory.py → raw_embedding_vector.py} +6 -6
  51. usecortex_ai/types/relation_evidence.py +20 -0
  52. usecortex_ai/types/retrieval_result.py +26 -0
  53. usecortex_ai/types/scored_path_response.py +26 -0
  54. usecortex_ai/types/search_mode.py +5 -0
  55. usecortex_ai/types/{batch_upload_data.py → source_delete_response.py} +8 -8
  56. usecortex_ai/types/{list_user_memories_response.py → source_delete_result_item.py} +11 -7
  57. usecortex_ai/types/source_fetch_response.py +70 -0
  58. usecortex_ai/types/{graph_relations_response.py → source_graph_relations_response.py} +3 -3
  59. usecortex_ai/types/{single_upload_data.py → source_list_response.py} +7 -10
  60. usecortex_ai/types/source_model.py +11 -1
  61. usecortex_ai/types/source_status.py +5 -0
  62. usecortex_ai/types/source_upload_response.py +35 -0
  63. usecortex_ai/types/source_upload_result_item.py +38 -0
  64. usecortex_ai/types/supported_llm_providers.py +5 -0
  65. usecortex_ai/types/{embeddings_create_collection_data.py → tenant_create_response.py} +9 -7
  66. usecortex_ai/types/{extended_context.py → tenant_info.py} +13 -4
  67. usecortex_ai/types/{embeddings_search_data.py → tenant_metadata_schema_info.py} +8 -9
  68. usecortex_ai/types/{tenant_create_data.py → tenant_stats_response.py} +9 -8
  69. usecortex_ai/types/{triple_with_evidence.py → triplet_with_evidence.py} +1 -1
  70. usecortex_ai/types/user_assistant_pair.py +4 -0
  71. usecortex_ai/types/{search_chunk.py → vector_store_chunk.py} +3 -9
  72. usecortex_ai/upload/__init__.py +3 -0
  73. usecortex_ai/upload/client.py +233 -1937
  74. usecortex_ai/upload/raw_client.py +364 -4401
  75. usecortex_ai/upload/types/__init__.py +7 -0
  76. usecortex_ai/upload/types/body_upload_app_ingestion_upload_app_post_app_sources.py +7 -0
  77. {usecortex_ai-0.3.5.dist-info → usecortex_ai-0.4.0.dist-info}/METADATA +2 -2
  78. usecortex_ai-0.4.0.dist-info/RECORD +113 -0
  79. {usecortex_ai-0.3.5.dist-info → usecortex_ai-0.4.0.dist-info}/WHEEL +1 -1
  80. usecortex_ai/document/client.py +0 -139
  81. usecortex_ai/document/raw_client.py +0 -312
  82. usecortex_ai/types/add_user_memory_response.py +0 -41
  83. usecortex_ai/types/body_scrape_webpage_upload_scrape_webpage_post.py +0 -17
  84. usecortex_ai/types/body_update_scrape_job_upload_update_webpage_patch.py +0 -17
  85. usecortex_ai/types/delete_memory_request.py +0 -32
  86. usecortex_ai/types/delete_sub_tenant_data.py +0 -42
  87. usecortex_ai/types/embeddings_delete_data.py +0 -37
  88. usecortex_ai/types/embeddings_get_data.py +0 -37
  89. usecortex_ai/types/markdown_upload_request.py +0 -41
  90. usecortex_ai/types/retrieve_user_memory_response.py +0 -38
  91. usecortex_ai/types/source.py +0 -52
  92. usecortex_ai/types/sub_tenant_ids_data.py +0 -47
  93. usecortex_ai/types/tenant_stats.py +0 -42
  94. usecortex_ai/types/webpage_scrape_request.py +0 -27
  95. usecortex_ai/user/__init__.py +0 -4
  96. usecortex_ai/user/client.py +0 -145
  97. usecortex_ai/user/raw_client.py +0 -316
  98. usecortex_ai/user_memory/__init__.py +0 -4
  99. usecortex_ai/user_memory/client.py +0 -515
  100. usecortex_ai-0.3.5.dist-info/RECORD +0 -108
  101. /usecortex_ai/{document → dashboard}/__init__.py +0 -0
  102. {usecortex_ai-0.3.5.dist-info → usecortex_ai-0.4.0.dist-info}/licenses/LICENSE +0 -0
  103. {usecortex_ai-0.3.5.dist-info → usecortex_ai-0.4.0.dist-info}/top_level.txt +0 -0
@@ -3,99 +3,115 @@
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
11
+ from .collection_stats import CollectionStats
13
12
  from .content_model import ContentModel
14
- from .delete_memory_request import DeleteMemoryRequest
15
- from .delete_sources import DeleteSources
16
- 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
17
18
  from .delete_user_memory_response import DeleteUserMemoryResponse
18
- from .embeddings_create_collection_data import EmbeddingsCreateCollectionData
19
- from .embeddings_delete_data import EmbeddingsDeleteData
20
- from .embeddings_get_data import EmbeddingsGetData
21
- from .embeddings_search_data import EmbeddingsSearchData
22
19
  from .entity import Entity
23
20
  from .error_response import ErrorResponse
24
- from .extended_context import ExtendedContext
25
- from .fetch_content_data import FetchContentData
26
- from .file_upload_result import FileUploadResult
27
- from .graph_relations_response import GraphRelationsResponse
21
+ from .fetch_mode import FetchMode
22
+ from .graph_context import GraphContext
28
23
  from .http_validation_error import HttpValidationError
29
- from .list_sources_response import ListSourcesResponse
30
- from .list_user_memories_response import ListUserMemoriesResponse
31
- from .markdown_upload_request import MarkdownUploadRequest
24
+ from .infra import Infra
25
+ from .insert_result import InsertResult
26
+ from .memory_item import MemoryItem
27
+ from .memory_result_item import MemoryResultItem
28
+ from .milvus_data_type import MilvusDataType
29
+ from .path_triplet import PathTriplet
32
30
  from .processing_status import ProcessingStatus
33
- from .related_chunk import RelatedChunk
31
+ from .processing_status_indexing_status import ProcessingStatusIndexingStatus
32
+ from .qn_a_search_response import QnASearchResponse
33
+ from .raw_embedding_document import RawEmbeddingDocument
34
+ from .raw_embedding_search_result import RawEmbeddingSearchResult
35
+ from .raw_embedding_vector import RawEmbeddingVector
34
36
  from .relation_evidence import RelationEvidence
35
- from .relations import Relations
37
+ from .retrieval_result import RetrievalResult
36
38
  from .retrieve_mode import RetrieveMode
37
- from .retrieve_response import RetrieveResponse
38
- from .retrieve_user_memory_response import RetrieveUserMemoryResponse
39
- from .search_chunk import SearchChunk
40
- from .single_upload_data import SingleUploadData
41
- from .source import Source
39
+ from .scored_path_response import ScoredPathResponse
40
+ from .search_mode import SearchMode
41
+ from .source_delete_response import SourceDeleteResponse
42
+ from .source_delete_result_item import SourceDeleteResultItem
43
+ from .source_fetch_response import SourceFetchResponse
44
+ from .source_graph_relations_response import SourceGraphRelationsResponse
45
+ from .source_list_response import SourceListResponse
42
46
  from .source_model import SourceModel
43
- from .sub_tenant_ids_data import SubTenantIdsData
44
- from .tenant_create_data import TenantCreateData
45
- from .tenant_stats import TenantStats
46
- from .triple_with_evidence import TripleWithEvidence
47
+ from .source_status import SourceStatus
48
+ from .source_upload_response import SourceUploadResponse
49
+ from .source_upload_result_item import SourceUploadResultItem
50
+ from .supported_llm_providers import SupportedLlmProviders
51
+ from .tenant_create_response import TenantCreateResponse
52
+ from .tenant_info import TenantInfo
53
+ from .tenant_metadata_schema_info import TenantMetadataSchemaInfo
54
+ from .tenant_stats_response import TenantStatsResponse
55
+ from .triplet_with_evidence import TripletWithEvidence
47
56
  from .user_assistant_pair import UserAssistantPair
48
- from .user_memory import UserMemory
49
57
  from .validation_error import ValidationError
50
58
  from .validation_error_loc_item import ValidationErrorLocItem
51
- from .webpage_scrape_request import WebpageScrapeRequest
59
+ from .vector_store_chunk import VectorStoreChunk
52
60
 
53
61
  __all__ = [
54
62
  "ActualErrorResponse",
55
- "AddUserMemoryResponse",
63
+ "AddMemoryResponse",
64
+ "ApiKeyInfo",
56
65
  "AppSourcesUploadData",
57
66
  "AttachmentModel",
58
- "BatchUploadData",
59
67
  "Bm25OperatorType",
60
- "BodyScrapeWebpageUploadScrapeWebpagePost",
61
- "BodyUpdateScrapeJobUploadUpdateWebpagePatch",
68
+ "CollectionStats",
62
69
  "ContentModel",
63
- "DeleteMemoryRequest",
64
- "DeleteSources",
65
- "DeleteSubTenantData",
70
+ "CustomPropertyDefinition",
71
+ "DashboardApisResponse",
72
+ "DashboardSourcesResponse",
73
+ "DashboardTenantsResponse",
74
+ "DeleteResult",
66
75
  "DeleteUserMemoryResponse",
67
- "EmbeddingsCreateCollectionData",
68
- "EmbeddingsDeleteData",
69
- "EmbeddingsGetData",
70
- "EmbeddingsSearchData",
71
76
  "Entity",
72
77
  "ErrorResponse",
73
- "ExtendedContext",
74
- "FetchContentData",
75
- "FileUploadResult",
76
- "GraphRelationsResponse",
78
+ "FetchMode",
79
+ "GraphContext",
77
80
  "HttpValidationError",
78
- "ListSourcesResponse",
79
- "ListUserMemoriesResponse",
80
- "MarkdownUploadRequest",
81
+ "Infra",
82
+ "InsertResult",
83
+ "MemoryItem",
84
+ "MemoryResultItem",
85
+ "MilvusDataType",
86
+ "PathTriplet",
81
87
  "ProcessingStatus",
82
- "RelatedChunk",
88
+ "ProcessingStatusIndexingStatus",
89
+ "QnASearchResponse",
90
+ "RawEmbeddingDocument",
91
+ "RawEmbeddingSearchResult",
92
+ "RawEmbeddingVector",
83
93
  "RelationEvidence",
84
- "Relations",
94
+ "RetrievalResult",
85
95
  "RetrieveMode",
86
- "RetrieveResponse",
87
- "RetrieveUserMemoryResponse",
88
- "SearchChunk",
89
- "SingleUploadData",
90
- "Source",
96
+ "ScoredPathResponse",
97
+ "SearchMode",
98
+ "SourceDeleteResponse",
99
+ "SourceDeleteResultItem",
100
+ "SourceFetchResponse",
101
+ "SourceGraphRelationsResponse",
102
+ "SourceListResponse",
91
103
  "SourceModel",
92
- "SubTenantIdsData",
93
- "TenantCreateData",
94
- "TenantStats",
95
- "TripleWithEvidence",
104
+ "SourceStatus",
105
+ "SourceUploadResponse",
106
+ "SourceUploadResultItem",
107
+ "SupportedLlmProviders",
108
+ "TenantCreateResponse",
109
+ "TenantInfo",
110
+ "TenantMetadataSchemaInfo",
111
+ "TenantStatsResponse",
112
+ "TripletWithEvidence",
96
113
  "UserAssistantPair",
97
- "UserMemory",
98
114
  "ValidationError",
99
115
  "ValidationErrorLocItem",
100
- "WebpageScrapeRequest",
116
+ "VectorStoreChunk",
101
117
  ]
@@ -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
@@ -6,15 +6,35 @@ import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
- class Relations(UniversalBaseModel):
10
- cortex_source_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
9
+ class ApiKeyInfo(UniversalBaseModel):
10
+ api_key_id: str = pydantic.Field()
11
11
  """
12
- List of cortex source IDs to directly relate with
12
+ API key identifier
13
13
  """
14
14
 
15
- auto_discovery: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
15
+ user_email: str = pydantic.Field()
16
16
  """
17
- Key value pairs to allow cortex to automatically discover relations
17
+ Owner email
18
+ """
19
+
20
+ user_id: str = pydantic.Field()
21
+ """
22
+ User ID
23
+ """
24
+
25
+ scopes: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
26
+ """
27
+ API key scopes
28
+ """
29
+
30
+ is_valid: bool = pydantic.Field()
31
+ """
32
+ Whether the API key is valid
33
+ """
34
+
35
+ created_at: str = pydantic.Field()
36
+ """
37
+ Creation timestamp
18
38
  """
19
39
 
20
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]
@@ -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
@@ -6,25 +6,29 @@ import pydantic
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
7
7
 
8
8
 
9
- class FetchContentData(UniversalBaseModel):
10
- file_id: str = pydantic.Field()
9
+ class InsertResult(UniversalBaseModel):
11
10
  """
12
- Unique identifier for the file being fetched
11
+ Result of an insert operation.
13
12
  """
14
13
 
15
- file_content: typing.Optional[str] = pydantic.Field(default=None)
14
+ insert_count: int = pydantic.Field()
16
15
  """
17
- Content of the fetched file
16
+ Number of entities inserted
17
+ """
18
+
19
+ ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
20
+ """
21
+ Inserted entity IDs
18
22
  """
19
23
 
20
24
  success: typing.Optional[bool] = pydantic.Field(default=None)
21
25
  """
22
- Indicates whether the fetch operation completed successfully
26
+ Whether insert succeeded
23
27
  """
24
28
 
25
- message: typing.Optional[str] = pydantic.Field(default=None)
29
+ error: typing.Optional[str] = pydantic.Field(default=None)
26
30
  """
27
- Status message about the fetch operation
31
+ Error message if failed
28
32
  """
29
33
 
30
34
  if IS_PYDANTIC_V2: