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.
- usecortex_ai/__init__.py +82 -70
- usecortex_ai/client.py +25 -23
- usecortex_ai/dashboard/client.py +448 -0
- usecortex_ai/{user_memory → dashboard}/raw_client.py +371 -530
- usecortex_ai/embeddings/client.py +229 -102
- usecortex_ai/embeddings/raw_client.py +323 -211
- usecortex_ai/errors/__init__.py +2 -0
- usecortex_ai/errors/bad_request_error.py +1 -2
- usecortex_ai/errors/forbidden_error.py +1 -2
- usecortex_ai/errors/internal_server_error.py +1 -2
- usecortex_ai/errors/not_found_error.py +1 -2
- usecortex_ai/errors/service_unavailable_error.py +1 -2
- usecortex_ai/errors/too_many_requests_error.py +11 -0
- usecortex_ai/errors/unauthorized_error.py +1 -2
- usecortex_ai/fetch/client.py +350 -29
- usecortex_ai/fetch/raw_client.py +919 -65
- usecortex_ai/raw_client.py +8 -2
- usecortex_ai/search/client.py +313 -257
- usecortex_ai/search/raw_client.py +463 -344
- usecortex_ai/search/types/alpha.py +1 -1
- usecortex_ai/sources/client.py +29 -216
- usecortex_ai/sources/raw_client.py +51 -589
- usecortex_ai/tenant/client.py +155 -118
- usecortex_ai/tenant/raw_client.py +227 -350
- usecortex_ai/types/__init__.py +76 -66
- usecortex_ai/types/add_memory_response.py +39 -0
- usecortex_ai/types/{scored_triplet_response.py → api_key_info.py} +16 -12
- usecortex_ai/types/app_sources_upload_data.py +15 -6
- usecortex_ai/types/{file_upload_result.py → collection_stats.py} +5 -5
- usecortex_ai/types/custom_property_definition.py +75 -0
- usecortex_ai/types/dashboard_apis_response.py +33 -0
- usecortex_ai/types/dashboard_sources_response.py +33 -0
- usecortex_ai/types/dashboard_tenants_response.py +33 -0
- usecortex_ai/types/{list_sources_response.py → delete_result.py} +10 -7
- usecortex_ai/types/delete_user_memory_response.py +1 -1
- usecortex_ai/types/entity.py +4 -4
- usecortex_ai/types/fetch_mode.py +5 -0
- usecortex_ai/types/{relations.py → forceful_relations_payload.py} +4 -4
- usecortex_ai/types/graph_context.py +26 -0
- usecortex_ai/types/{delete_sources.py → infra.py} +4 -3
- usecortex_ai/types/{fetch_content_data.py → insert_result.py} +12 -8
- usecortex_ai/types/memory_item.py +88 -0
- usecortex_ai/types/memory_result_item.py +47 -0
- usecortex_ai/types/milvus_data_type.py +21 -0
- usecortex_ai/types/path_triplet.py +3 -18
- usecortex_ai/types/processing_status.py +3 -2
- usecortex_ai/types/processing_status_indexing_status.py +7 -0
- usecortex_ai/types/qn_a_search_response.py +49 -0
- usecortex_ai/types/{retrieve_response.py → raw_embedding_document.py} +11 -8
- usecortex_ai/types/raw_embedding_search_result.py +47 -0
- usecortex_ai/types/{user_memory.py → raw_embedding_vector.py} +6 -6
- usecortex_ai/types/relation_evidence.py +24 -5
- usecortex_ai/types/retrieval_result.py +30 -0
- usecortex_ai/types/scored_path_response.py +5 -19
- usecortex_ai/types/search_mode.py +5 -0
- usecortex_ai/types/{batch_upload_data.py → source_delete_response.py} +8 -8
- usecortex_ai/types/{list_user_memories_response.py → source_delete_result_item.py} +11 -7
- usecortex_ai/types/source_fetch_response.py +70 -0
- usecortex_ai/types/{graph_relations_response.py → source_graph_relations_response.py} +3 -3
- usecortex_ai/types/{single_upload_data.py → source_list_response.py} +7 -10
- usecortex_ai/types/source_model.py +11 -1
- usecortex_ai/types/source_status.py +5 -0
- usecortex_ai/types/source_upload_response.py +35 -0
- usecortex_ai/types/source_upload_result_item.py +38 -0
- usecortex_ai/types/supported_llm_providers.py +5 -0
- usecortex_ai/types/{embeddings_create_collection_data.py → tenant_create_response.py} +9 -7
- usecortex_ai/types/{webpage_scrape_request.py → tenant_info.py} +10 -5
- usecortex_ai/types/tenant_metadata_schema_info.py +36 -0
- usecortex_ai/types/{tenant_create_data.py → tenant_stats_response.py} +9 -8
- usecortex_ai/types/{triple_with_evidence.py → triplet_with_evidence.py} +5 -1
- usecortex_ai/types/user_assistant_pair.py +4 -0
- usecortex_ai/types/{search_chunk.py → vector_store_chunk.py} +5 -11
- usecortex_ai/upload/__init__.py +3 -0
- usecortex_ai/upload/client.py +233 -1937
- usecortex_ai/upload/raw_client.py +364 -4401
- usecortex_ai/upload/types/__init__.py +7 -0
- usecortex_ai/upload/types/body_upload_app_ingestion_upload_app_post_app_sources.py +7 -0
- {usecortex_ai-0.3.6.dist-info → usecortex_ai-0.5.0.dist-info}/METADATA +2 -2
- usecortex_ai-0.5.0.dist-info/RECORD +114 -0
- {usecortex_ai-0.3.6.dist-info → usecortex_ai-0.5.0.dist-info}/WHEEL +1 -1
- {usecortex_ai-0.3.6.dist-info → usecortex_ai-0.5.0.dist-info}/licenses/LICENSE +21 -21
- {usecortex_ai-0.3.6.dist-info → usecortex_ai-0.5.0.dist-info}/top_level.txt +0 -0
- usecortex_ai/document/client.py +0 -139
- usecortex_ai/document/raw_client.py +0 -312
- usecortex_ai/types/add_user_memory_response.py +0 -41
- usecortex_ai/types/body_scrape_webpage_upload_scrape_webpage_post.py +0 -17
- usecortex_ai/types/body_update_scrape_job_upload_update_webpage_patch.py +0 -17
- usecortex_ai/types/chunk_graph_relations_response.py +0 -33
- usecortex_ai/types/delete_memory_request.py +0 -32
- usecortex_ai/types/delete_sub_tenant_data.py +0 -42
- usecortex_ai/types/embeddings_delete_data.py +0 -37
- usecortex_ai/types/embeddings_get_data.py +0 -37
- usecortex_ai/types/embeddings_search_data.py +0 -37
- usecortex_ai/types/extended_context.py +0 -17
- usecortex_ai/types/markdown_upload_request.py +0 -41
- usecortex_ai/types/related_chunk.py +0 -22
- usecortex_ai/types/retrieve_user_memory_response.py +0 -38
- usecortex_ai/types/source.py +0 -52
- usecortex_ai/types/sub_tenant_ids_data.py +0 -47
- usecortex_ai/types/tenant_stats.py +0 -42
- usecortex_ai/user/__init__.py +0 -4
- usecortex_ai/user/client.py +0 -145
- usecortex_ai/user/raw_client.py +0 -316
- usecortex_ai/user_memory/__init__.py +0 -4
- usecortex_ai/user_memory/client.py +0 -515
- usecortex_ai-0.3.6.dist-info/RECORD +0 -112
- /usecortex_ai/{document → dashboard}/__init__.py +0 -0
|
@@ -1,41 +0,0 @@
|
|
|
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 AddUserMemoryResponse(UniversalBaseModel):
|
|
10
|
-
"""
|
|
11
|
-
Response model for adding a new user memory.
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
success: bool = pydantic.Field()
|
|
15
|
-
"""
|
|
16
|
-
Indicates whether the memory addition operation was successful
|
|
17
|
-
"""
|
|
18
|
-
|
|
19
|
-
user_memory_added: bool = pydantic.Field()
|
|
20
|
-
"""
|
|
21
|
-
Confirms whether the memory was successfully stored in the system
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
memory_id: str = pydantic.Field()
|
|
25
|
-
"""
|
|
26
|
-
Unique identifier assigned to the newly created memory
|
|
27
|
-
"""
|
|
28
|
-
|
|
29
|
-
chunks_created: typing.Optional[int] = pydantic.Field(default=None)
|
|
30
|
-
"""
|
|
31
|
-
Total number of chunks created from the memory
|
|
32
|
-
"""
|
|
33
|
-
|
|
34
|
-
if IS_PYDANTIC_V2:
|
|
35
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
36
|
-
else:
|
|
37
|
-
|
|
38
|
-
class Config:
|
|
39
|
-
frozen = True
|
|
40
|
-
smart_union = True
|
|
41
|
-
extra = pydantic.Extra.allow
|
|
@@ -1,17 +0,0 @@
|
|
|
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 BodyScrapeWebpageUploadScrapeWebpagePost(UniversalBaseModel):
|
|
10
|
-
if IS_PYDANTIC_V2:
|
|
11
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
12
|
-
else:
|
|
13
|
-
|
|
14
|
-
class Config:
|
|
15
|
-
frozen = True
|
|
16
|
-
smart_union = True
|
|
17
|
-
extra = pydantic.Extra.allow
|
|
@@ -1,17 +0,0 @@
|
|
|
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 BodyUpdateScrapeJobUploadUpdateWebpagePatch(UniversalBaseModel):
|
|
10
|
-
if IS_PYDANTIC_V2:
|
|
11
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
12
|
-
else:
|
|
13
|
-
|
|
14
|
-
class Config:
|
|
15
|
-
frozen = True
|
|
16
|
-
smart_union = True
|
|
17
|
-
extra = pydantic.Extra.allow
|
|
@@ -1,33 +0,0 @@
|
|
|
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
|
-
from .scored_triplet_response import ScoredTripletResponse
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class ChunkGraphRelationsResponse(UniversalBaseModel):
|
|
12
|
-
"""
|
|
13
|
-
Graph relations with group_id -> triplet mapping
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
entity_paths: typing.Optional[typing.List[ScoredPathResponse]] = pydantic.Field(default=None)
|
|
17
|
-
"""
|
|
18
|
-
Multi-hop paths connecting entities from the query, reranked by relevance. Each path is a chain of connected triplets.
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
chunk_triplets: typing.Optional[typing.Dict[str, ScoredTripletResponse]] = pydantic.Field(default=None)
|
|
22
|
-
"""
|
|
23
|
-
Mapping of group_id to scored triplet. Use chunk.graph_triplet_ids to find which groups belong to a chunk.
|
|
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
|
|
@@ -1,32 +0,0 @@
|
|
|
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 DeleteMemoryRequest(UniversalBaseModel):
|
|
10
|
-
tenant_id: str = pydantic.Field()
|
|
11
|
-
"""
|
|
12
|
-
Unique identifier for the tenant/organization
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
source_ids: typing.List[str] = pydantic.Field()
|
|
16
|
-
"""
|
|
17
|
-
List of source IDs to delete
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
sub_tenant_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
21
|
-
"""
|
|
22
|
-
Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
|
|
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
|
|
@@ -1,42 +0,0 @@
|
|
|
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 DeleteSubTenantData(UniversalBaseModel):
|
|
10
|
-
status: str = pydantic.Field()
|
|
11
|
-
"""
|
|
12
|
-
The status of the deletion operation.
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
tenant_id: str = pydantic.Field()
|
|
16
|
-
"""
|
|
17
|
-
The tenant ID from which the sub-tenant was deleted.
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
sub_tenant_id: str = pydantic.Field()
|
|
21
|
-
"""
|
|
22
|
-
The ID of the sub-tenant that was deleted.
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
success: typing.Optional[bool] = pydantic.Field(default=None)
|
|
26
|
-
"""
|
|
27
|
-
Indicates whether the sub-tenant deletion was successful.
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
message: typing.Optional[str] = pydantic.Field(default=None)
|
|
31
|
-
"""
|
|
32
|
-
Response message describing the operation result.
|
|
33
|
-
"""
|
|
34
|
-
|
|
35
|
-
if IS_PYDANTIC_V2:
|
|
36
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
37
|
-
else:
|
|
38
|
-
|
|
39
|
-
class Config:
|
|
40
|
-
frozen = True
|
|
41
|
-
smart_union = True
|
|
42
|
-
extra = pydantic.Extra.allow
|
|
@@ -1,37 +0,0 @@
|
|
|
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 EmbeddingsDeleteData(UniversalBaseModel):
|
|
10
|
-
total_deleted: int = pydantic.Field()
|
|
11
|
-
"""
|
|
12
|
-
Total number of embeddings that were successfully deleted
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
status: typing.Dict[str, bool] = pydantic.Field()
|
|
16
|
-
"""
|
|
17
|
-
Dictionary mapping chunk IDs to their deletion status (true if deleted successfully). Example: {'chunk_1234': true}
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
success: typing.Optional[bool] = pydantic.Field(default=None)
|
|
21
|
-
"""
|
|
22
|
-
Indicates whether the embeddings deletion operation completed successfully
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
message: typing.Optional[str] = pydantic.Field(default=None)
|
|
26
|
-
"""
|
|
27
|
-
Status message about the deletion operation
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
if IS_PYDANTIC_V2:
|
|
31
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
32
|
-
else:
|
|
33
|
-
|
|
34
|
-
class Config:
|
|
35
|
-
frozen = True
|
|
36
|
-
smart_union = True
|
|
37
|
-
extra = pydantic.Extra.allow
|
|
@@ -1,37 +0,0 @@
|
|
|
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 EmbeddingsGetData(UniversalBaseModel):
|
|
10
|
-
embeddings: typing.Dict[str, typing.List[float]] = pydantic.Field()
|
|
11
|
-
"""
|
|
12
|
-
Dictionary mapping chunk IDs to their embedding vectors (lists of float values)
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
not_found_chunk_ids: typing.List[str] = pydantic.Field()
|
|
16
|
-
"""
|
|
17
|
-
List of chunk IDs that were not found in the embeddings collection
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
success: typing.Optional[bool] = pydantic.Field(default=None)
|
|
21
|
-
"""
|
|
22
|
-
Indicates whether the embeddings retrieval operation completed successfully
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
message: typing.Optional[str] = pydantic.Field(default=None)
|
|
26
|
-
"""
|
|
27
|
-
Status message about the retrieval operation
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
if IS_PYDANTIC_V2:
|
|
31
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
32
|
-
else:
|
|
33
|
-
|
|
34
|
-
class Config:
|
|
35
|
-
frozen = True
|
|
36
|
-
smart_union = True
|
|
37
|
-
extra = pydantic.Extra.allow
|
|
@@ -1,37 +0,0 @@
|
|
|
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 EmbeddingsSearchData(UniversalBaseModel):
|
|
10
|
-
chunk_ids: typing.List[str] = pydantic.Field()
|
|
11
|
-
"""
|
|
12
|
-
List of chunk IDs that match the search query
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
scores: typing.List[float] = pydantic.Field()
|
|
16
|
-
"""
|
|
17
|
-
Similarity scores for each matching chunk (higher is more similar)
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
success: typing.Optional[bool] = pydantic.Field(default=None)
|
|
21
|
-
"""
|
|
22
|
-
Indicates whether the embeddings search operation completed successfully
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
message: typing.Optional[str] = pydantic.Field(default=None)
|
|
26
|
-
"""
|
|
27
|
-
Status message about the search operation
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
if IS_PYDANTIC_V2:
|
|
31
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
32
|
-
else:
|
|
33
|
-
|
|
34
|
-
class Config:
|
|
35
|
-
frozen = True
|
|
36
|
-
smart_union = True
|
|
37
|
-
extra = pydantic.Extra.allow
|
|
@@ -1,17 +0,0 @@
|
|
|
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 ExtendedContext(UniversalBaseModel):
|
|
10
|
-
if IS_PYDANTIC_V2:
|
|
11
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
12
|
-
else:
|
|
13
|
-
|
|
14
|
-
class Config:
|
|
15
|
-
frozen = True
|
|
16
|
-
smart_union = True
|
|
17
|
-
extra = pydantic.Extra.allow
|
|
@@ -1,41 +0,0 @@
|
|
|
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 MarkdownUploadRequest(UniversalBaseModel):
|
|
10
|
-
content: str = pydantic.Field()
|
|
11
|
-
"""
|
|
12
|
-
The text or markdown content to upload
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
file_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
16
|
-
"""
|
|
17
|
-
Optional file ID for the uploaded content. If not provided, will be generated automatically.
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
21
|
-
"""
|
|
22
|
-
JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
23
|
-
|
|
24
|
-
Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
25
|
-
"""
|
|
26
|
-
|
|
27
|
-
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
28
|
-
"""
|
|
29
|
-
JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
|
|
30
|
-
|
|
31
|
-
Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
32
|
-
"""
|
|
33
|
-
|
|
34
|
-
if IS_PYDANTIC_V2:
|
|
35
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
36
|
-
else:
|
|
37
|
-
|
|
38
|
-
class Config:
|
|
39
|
-
frozen = True
|
|
40
|
-
smart_union = True
|
|
41
|
-
extra = pydantic.Extra.allow
|
|
@@ -1,22 +0,0 @@
|
|
|
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 RelatedChunk(UniversalBaseModel):
|
|
10
|
-
source_id: str
|
|
11
|
-
chunk_uuid: str
|
|
12
|
-
chunk_content: str
|
|
13
|
-
source_title: typing.Optional[str] = None
|
|
14
|
-
|
|
15
|
-
if IS_PYDANTIC_V2:
|
|
16
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
-
else:
|
|
18
|
-
|
|
19
|
-
class Config:
|
|
20
|
-
frozen = True
|
|
21
|
-
smart_union = True
|
|
22
|
-
extra = pydantic.Extra.allow
|
|
@@ -1,38 +0,0 @@
|
|
|
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
|
-
from .user_memory import UserMemory
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class RetrieveUserMemoryResponse(UniversalBaseModel):
|
|
12
|
-
"""
|
|
13
|
-
Response model for retrieving user memories through semantic search.
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
success: bool = pydantic.Field()
|
|
17
|
-
"""
|
|
18
|
-
Indicates whether the memory retrieval operation was successful
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
retrieved_user_memories: typing.Optional[typing.List[UserMemory]] = pydantic.Field(default=None)
|
|
22
|
-
"""
|
|
23
|
-
Array of user memories ranked by relevance to your search query
|
|
24
|
-
"""
|
|
25
|
-
|
|
26
|
-
relations: typing.Optional[typing.List[ScoredPathResponse]] = pydantic.Field(default=None)
|
|
27
|
-
"""
|
|
28
|
-
Array of scored relations extracted from the user query via knowledge graph search
|
|
29
|
-
"""
|
|
30
|
-
|
|
31
|
-
if IS_PYDANTIC_V2:
|
|
32
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
33
|
-
else:
|
|
34
|
-
|
|
35
|
-
class Config:
|
|
36
|
-
frozen = True
|
|
37
|
-
smart_union = True
|
|
38
|
-
extra = pydantic.Extra.allow
|
usecortex_ai/types/source.py
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
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 Source(UniversalBaseModel):
|
|
10
|
-
id: str = pydantic.Field()
|
|
11
|
-
"""
|
|
12
|
-
Unique identifier for the source document
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
title: str = pydantic.Field()
|
|
16
|
-
"""
|
|
17
|
-
Display title of the source document
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
type: str = pydantic.Field()
|
|
21
|
-
"""
|
|
22
|
-
Type of content (document, file, text, etc.)
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
timestamp: str = pydantic.Field()
|
|
26
|
-
"""
|
|
27
|
-
When the source was originally created or uploaded
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
31
|
-
"""
|
|
32
|
-
Brief summary or description of the source content
|
|
33
|
-
"""
|
|
34
|
-
|
|
35
|
-
document_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
36
|
-
"""
|
|
37
|
-
Additional metadata specific to the document
|
|
38
|
-
"""
|
|
39
|
-
|
|
40
|
-
tenant_metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
41
|
-
"""
|
|
42
|
-
Metadata related to the tenant and organizational context
|
|
43
|
-
"""
|
|
44
|
-
|
|
45
|
-
if IS_PYDANTIC_V2:
|
|
46
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
47
|
-
else:
|
|
48
|
-
|
|
49
|
-
class Config:
|
|
50
|
-
frozen = True
|
|
51
|
-
smart_union = True
|
|
52
|
-
extra = pydantic.Extra.allow
|
|
@@ -1,47 +0,0 @@
|
|
|
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 SubTenantIdsData(UniversalBaseModel):
|
|
10
|
-
tenant_id: str = pydantic.Field()
|
|
11
|
-
"""
|
|
12
|
-
The tenant ID that was queried
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
sub_tenant_ids: typing.List[str] = pydantic.Field()
|
|
16
|
-
"""
|
|
17
|
-
Array of all sub-tenant IDs within the tenant
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
count: int = pydantic.Field()
|
|
21
|
-
"""
|
|
22
|
-
Total number of sub-tenants found
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
tenant_schema: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
26
|
-
"""
|
|
27
|
-
Schema configuration for the tenant collection
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
success: typing.Optional[bool] = pydantic.Field(default=None)
|
|
31
|
-
"""
|
|
32
|
-
Indicates whether the sub-tenant retrieval was successful
|
|
33
|
-
"""
|
|
34
|
-
|
|
35
|
-
message: typing.Optional[str] = pydantic.Field(default=None)
|
|
36
|
-
"""
|
|
37
|
-
Response message describing the operation result
|
|
38
|
-
"""
|
|
39
|
-
|
|
40
|
-
if IS_PYDANTIC_V2:
|
|
41
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
42
|
-
else:
|
|
43
|
-
|
|
44
|
-
class Config:
|
|
45
|
-
frozen = True
|
|
46
|
-
smart_union = True
|
|
47
|
-
extra = pydantic.Extra.allow
|
|
@@ -1,42 +0,0 @@
|
|
|
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 TenantStats(UniversalBaseModel):
|
|
10
|
-
object_count: int = pydantic.Field()
|
|
11
|
-
"""
|
|
12
|
-
Total number of objects stored for this tenant
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
tenant_id: str = pydantic.Field()
|
|
16
|
-
"""
|
|
17
|
-
identifier for the tenant
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
|
-
vector_dimension: typing.Optional[int] = pydantic.Field(default=None)
|
|
21
|
-
"""
|
|
22
|
-
Dimensions of the vector embeddings used for this tenant. Null when the tenant is empty.
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
success: typing.Optional[bool] = pydantic.Field(default=None)
|
|
26
|
-
"""
|
|
27
|
-
Indicates whether the stats retrieval was successful
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
message: typing.Optional[str] = pydantic.Field(default=None)
|
|
31
|
-
"""
|
|
32
|
-
Response message describing the operation result
|
|
33
|
-
"""
|
|
34
|
-
|
|
35
|
-
if IS_PYDANTIC_V2:
|
|
36
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
37
|
-
else:
|
|
38
|
-
|
|
39
|
-
class Config:
|
|
40
|
-
frozen = True
|
|
41
|
-
smart_union = True
|
|
42
|
-
extra = pydantic.Extra.allow
|
usecortex_ai/user/__init__.py
DELETED