From bc6730e88b44e3540611689240cb541a80ba6f41 Mon Sep 17 00:00:00 2001 From: Nick K Date: Tue, 9 Apr 2024 17:13:07 -0700 Subject: [PATCH] feature: update to 0.6.2 version --- .openapi-generator/FILES | 41 +- README.md | 28 +- docs/BookmarkData.md | 2 +- docs/ChunkApi.md | 18 +- docs/ChunkGroupApi.md | 29 +- docs/ChunkMetadataWithScore.md | 42 ++ docs/CreateChunkGroupData.md | 2 +- docs/GetEventsData.md | 2 +- docs/GroupScoreChunk.md | 31 ++ docs/GroupScoreSlimChunks.md | 30 ++ docs/ScoreChunkDTO.md | 2 +- docs/SearchOverGroupsResults.md | 30 ++ docs/SearchOverGroupsSlimResults.md | 30 ++ docs/SearchWithinGroupResults.md | 31 ++ docs/SearchWithinGroupSlimResults.md | 31 ++ docs/SlimChunkMetadataWithScore.md | 39 ++ docs/UserApi.md | 4 +- openapi-generator.yaml | 4 +- openapi.json | 444 ++++++++++-------- pyproject.toml | 2 +- setup.py | 4 +- test/test_chunk_metadata_with_score.py | 72 +++ test/test_group_score_chunk.py | 60 +++ test/test_group_score_slim_chunks.py | 59 +++ test/test_search_over_groups_results.py | 59 +++ test/test_search_over_groups_slim_results.py | 59 +++ test/test_search_within_group_results.py | 61 +++ test/test_search_within_group_slim_results.py | 61 +++ test/test_slim_chunk_metadata_with_score.py | 67 +++ trieve_py_client/__init__.py | 24 +- trieve_py_client/api/auth_api.py | 2 +- trieve_py_client/api/chunk_api.py | 32 +- trieve_py_client/api/chunk_group_api.py | 47 +- trieve_py_client/api/dataset_api.py | 2 +- trieve_py_client/api/events_api.py | 2 +- trieve_py_client/api/file_api.py | 2 +- trieve_py_client/api/health_api.py | 2 +- trieve_py_client/api/invitation_api.py | 2 +- trieve_py_client/api/message_api.py | 2 +- trieve_py_client/api/organization_api.py | 2 +- trieve_py_client/api/stripe_api.py | 2 +- trieve_py_client/api/topic_api.py | 2 +- trieve_py_client/api/user_api.py | 6 +- trieve_py_client/api_client.py | 4 +- trieve_py_client/configuration.py | 6 +- trieve_py_client/exceptions.py | 2 +- trieve_py_client/models/__init__.py | 22 +- .../models/add_chunk_to_group_data.py | 2 +- trieve_py_client/models/api_key_dto.py | 2 +- trieve_py_client/models/auth_query.py | 2 +- .../models/batch_queued_chunk_response.py | 2 +- trieve_py_client/models/bookmark_data.py | 8 +- .../models/bookmark_group_result.py | 2 +- trieve_py_client/models/chat_message_proxy.py | 2 +- trieve_py_client/models/chunk_data.py | 2 +- trieve_py_client/models/chunk_filter.py | 2 +- trieve_py_client/models/chunk_group.py | 2 +- .../models/chunk_group_and_file.py | 2 +- trieve_py_client/models/chunk_metadata.py | 2 +- .../models/chunk_metadata_with_score.py | 150 ++++++ .../models/client_dataset_configuration.py | 2 +- trieve_py_client/models/create_chunk_data.py | 2 +- .../models/create_chunk_group_data.py | 9 +- .../models/create_dataset_request.py | 2 +- .../models/create_message_data.py | 2 +- .../models/create_organization_data.py | 2 +- trieve_py_client/models/create_topic_data.py | 2 +- trieve_py_client/models/dataset.py | 2 +- trieve_py_client/models/dataset_and_usage.py | 2 +- trieve_py_client/models/dataset_dto.py | 2 +- .../models/dataset_usage_count.py | 2 +- trieve_py_client/models/delete_topic_data.py | 2 +- .../models/delete_user_api_key_request.py | 2 +- trieve_py_client/models/edit_message_data.py | 2 +- .../models/error_response_body.py | 2 +- trieve_py_client/models/event.py | 2 +- trieve_py_client/models/event_return.py | 2 +- trieve_py_client/models/field_condition.py | 2 +- trieve_py_client/models/file.py | 2 +- trieve_py_client/models/file_dto.py | 2 +- .../models/generate_chunks_request.py | 2 +- trieve_py_client/models/get_events_data.py | 4 +- .../models/get_groups_for_chunks_data.py | 2 +- trieve_py_client/models/group_data.py | 2 +- trieve_py_client/models/group_score_chunk.py | 105 +++++ .../models/group_score_slim_chunks.py | 98 ++++ trieve_py_client/models/invitation_data.py | 2 +- trieve_py_client/models/match_condition.py | 2 +- trieve_py_client/models/message.py | 2 +- trieve_py_client/models/organization.py | 2 +- .../models/organization_usage_count.py | 2 +- trieve_py_client/models/range.py | 2 +- trieve_py_client/models/range_condition.py | 2 +- .../models/recommend_chunks_request.py | 2 +- .../models/recommend_group_chunks_request.py | 2 +- .../models/regenerate_message_data.py | 2 +- .../models/return_queued_chunk.py | 2 +- trieve_py_client/models/score_chunk_dto.py | 8 +- trieve_py_client/models/score_slim_chunks.py | 2 +- trieve_py_client/models/search_chunk_data.py | 2 +- .../search_chunk_query_response_body.py | 2 +- .../models/search_over_groups_data.py | 2 +- .../models/search_over_groups_results.py | 98 ++++ .../models/search_over_groups_slim_results.py | 98 ++++ .../search_slim_chunk_query_response_body.py | 2 +- .../models/search_within_group_data.py | 2 +- .../models/search_within_group_results.py | 104 ++++ .../search_within_group_slim_results.py | 104 ++++ .../models/set_user_api_key_request.py | 2 +- .../models/set_user_api_key_response.py | 2 +- .../models/single_queued_chunk_response.py | 2 +- .../models/slim_chunk_metadata.py | 2 +- .../models/slim_chunk_metadata_with_score.py | 139 ++++++ trieve_py_client/models/slim_group.py | 2 +- trieve_py_client/models/slim_user.py | 2 +- trieve_py_client/models/stripe_plan.py | 2 +- .../models/suggested_queries_request.py | 2 +- .../models/suggested_queries_response.py | 2 +- trieve_py_client/models/topic.py | 2 +- .../update_chunk_by_tracking_id_data.py | 2 +- trieve_py_client/models/update_chunk_data.py | 2 +- .../models/update_chunk_group_data.py | 2 +- .../models/update_dataset_request.py | 2 +- .../update_group_by_tracking_id_data.py | 2 +- .../models/update_organization_data.py | 2 +- trieve_py_client/models/update_topic_data.py | 2 +- trieve_py_client/models/update_user_data.py | 2 +- trieve_py_client/models/upload_file_data.py | 2 +- trieve_py_client/models/upload_file_result.py | 2 +- trieve_py_client/models/user_organization.py | 2 +- trieve_py_client/rest.py | 2 +- 131 files changed, 2150 insertions(+), 426 deletions(-) create mode 100644 docs/ChunkMetadataWithScore.md create mode 100644 docs/GroupScoreChunk.md create mode 100644 docs/GroupScoreSlimChunks.md create mode 100644 docs/SearchOverGroupsResults.md create mode 100644 docs/SearchOverGroupsSlimResults.md create mode 100644 docs/SearchWithinGroupResults.md create mode 100644 docs/SearchWithinGroupSlimResults.md create mode 100644 docs/SlimChunkMetadataWithScore.md create mode 100644 test/test_chunk_metadata_with_score.py create mode 100644 test/test_group_score_chunk.py create mode 100644 test/test_group_score_slim_chunks.py create mode 100644 test/test_search_over_groups_results.py create mode 100644 test/test_search_over_groups_slim_results.py create mode 100644 test/test_search_within_group_results.py create mode 100644 test/test_search_within_group_slim_results.py create mode 100644 test/test_slim_chunk_metadata_with_score.py create mode 100644 trieve_py_client/models/chunk_metadata_with_score.py create mode 100644 trieve_py_client/models/group_score_chunk.py create mode 100644 trieve_py_client/models/group_score_slim_chunks.py create mode 100644 trieve_py_client/models/search_over_groups_results.py create mode 100644 trieve_py_client/models/search_over_groups_slim_results.py create mode 100644 trieve_py_client/models/search_within_group_results.py create mode 100644 trieve_py_client/models/search_within_group_slim_results.py create mode 100644 trieve_py_client/models/slim_chunk_metadata_with_score.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 03bea95..e6c3267 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -18,7 +18,7 @@ docs/ChunkGroup.md docs/ChunkGroupAndFile.md docs/ChunkGroupApi.md docs/ChunkMetadata.md -docs/ChunkMetadataWithFileData.md +docs/ChunkMetadataWithScore.md docs/ClientDatasetConfiguration.md docs/CreateChunkData.md docs/CreateChunkGroupData.md @@ -46,8 +46,8 @@ docs/GenerateChunksRequest.md docs/GetEventsData.md docs/GetGroupsForChunksData.md docs/GroupData.md -docs/GroupScoreChunkDTO.md -docs/GroupSlimChunksDTO.md +docs/GroupScoreChunk.md +docs/GroupScoreSlimChunks.md docs/HealthApi.md docs/InvitationApi.md docs/InvitationData.md @@ -60,8 +60,6 @@ docs/OrganizationUsageCount.md docs/Range.md docs/RangeCondition.md docs/RecommendChunksRequest.md -docs/RecommendChunksResponseTypes.md -docs/RecommendGroupChunkResponseTypes.md docs/RecommendGroupChunksRequest.md docs/RegenerateMessageData.md docs/ReturnQueuedChunk.md @@ -69,20 +67,18 @@ docs/ScoreChunkDTO.md docs/ScoreSlimChunks.md docs/SearchChunkData.md docs/SearchChunkQueryResponseBody.md -docs/SearchChunkResponseTypes.md -docs/SearchGroupSlimChunksResult.md -docs/SearchGroupsResult.md docs/SearchOverGroupsData.md -docs/SearchOverGroupsResponseBody.md -docs/SearchOverGroupsResponseTypes.md -docs/SearchOverGroupsSlimChunksResponseBody.md +docs/SearchOverGroupsResults.md +docs/SearchOverGroupsSlimResults.md docs/SearchSlimChunkQueryResponseBody.md docs/SearchWithinGroupData.md -docs/SearchWithinGroupResponseTypes.md +docs/SearchWithinGroupResults.md +docs/SearchWithinGroupSlimResults.md docs/SetUserApiKeyRequest.md docs/SetUserApiKeyResponse.md docs/SingleQueuedChunkResponse.md docs/SlimChunkMetadata.md +docs/SlimChunkMetadataWithScore.md docs/SlimGroup.md docs/SlimUser.md docs/StripeApi.md @@ -110,7 +106,6 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_recommend_group_chunks_request.py tox.ini trieve_py_client/__init__.py trieve_py_client/api/__init__.py @@ -144,7 +139,7 @@ trieve_py_client/models/chunk_filter.py trieve_py_client/models/chunk_group.py trieve_py_client/models/chunk_group_and_file.py trieve_py_client/models/chunk_metadata.py -trieve_py_client/models/chunk_metadata_with_file_data.py +trieve_py_client/models/chunk_metadata_with_score.py trieve_py_client/models/client_dataset_configuration.py trieve_py_client/models/create_chunk_data.py trieve_py_client/models/create_chunk_group_data.py @@ -169,8 +164,8 @@ trieve_py_client/models/generate_chunks_request.py trieve_py_client/models/get_events_data.py trieve_py_client/models/get_groups_for_chunks_data.py trieve_py_client/models/group_data.py -trieve_py_client/models/group_score_chunk_dto.py -trieve_py_client/models/group_slim_chunks_dto.py +trieve_py_client/models/group_score_chunk.py +trieve_py_client/models/group_score_slim_chunks.py trieve_py_client/models/invitation_data.py trieve_py_client/models/match_condition.py trieve_py_client/models/message.py @@ -179,8 +174,6 @@ trieve_py_client/models/organization_usage_count.py trieve_py_client/models/range.py trieve_py_client/models/range_condition.py trieve_py_client/models/recommend_chunks_request.py -trieve_py_client/models/recommend_chunks_response_types.py -trieve_py_client/models/recommend_group_chunk_response_types.py trieve_py_client/models/recommend_group_chunks_request.py trieve_py_client/models/regenerate_message_data.py trieve_py_client/models/return_queued_chunk.py @@ -188,20 +181,18 @@ trieve_py_client/models/score_chunk_dto.py trieve_py_client/models/score_slim_chunks.py trieve_py_client/models/search_chunk_data.py trieve_py_client/models/search_chunk_query_response_body.py -trieve_py_client/models/search_chunk_response_types.py -trieve_py_client/models/search_group_slim_chunks_result.py -trieve_py_client/models/search_groups_result.py trieve_py_client/models/search_over_groups_data.py -trieve_py_client/models/search_over_groups_response_body.py -trieve_py_client/models/search_over_groups_response_types.py -trieve_py_client/models/search_over_groups_slim_chunks_response_body.py +trieve_py_client/models/search_over_groups_results.py +trieve_py_client/models/search_over_groups_slim_results.py trieve_py_client/models/search_slim_chunk_query_response_body.py trieve_py_client/models/search_within_group_data.py -trieve_py_client/models/search_within_group_response_types.py +trieve_py_client/models/search_within_group_results.py +trieve_py_client/models/search_within_group_slim_results.py trieve_py_client/models/set_user_api_key_request.py trieve_py_client/models/set_user_api_key_response.py trieve_py_client/models/single_queued_chunk_response.py trieve_py_client/models/slim_chunk_metadata.py +trieve_py_client/models/slim_chunk_metadata_with_score.py trieve_py_client/models/slim_group.py trieve_py_client/models/slim_user.py trieve_py_client/models/stripe_plan.py diff --git a/README.md b/README.md index fefd3e9..6531692 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ Trieve OpenAPI Specification. This document describes all of the operations avai This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 0.6.0 -- Package version: 0.6.0 +- API version: 0.6.2 +- Package version: 0.6.2 - Generator version: 7.4.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://trieve.ai](https://trieve.ai) @@ -148,8 +148,8 @@ Class | Method | HTTP request | Description *TopicApi* | [**delete_topic**](docs/TopicApi.md#delete_topic) | **DELETE** /api/topic/{topic_id} | Delete Topic *TopicApi* | [**get_all_topics_for_user**](docs/TopicApi.md#get_all_topics_for_user) | **GET** /api/topic/user/{user_id} | Get All Topics for User *TopicApi* | [**update_topic**](docs/TopicApi.md#update_topic) | **PUT** /api/topic | Update Topic -*UserApi* | [**delete_user_api_key**](docs/UserApi.md#delete_user_api_key) | **DELETE** /api/user/delete_api_key/{api_key_id} | Delete User Api Key -*UserApi* | [**set_user_api_key**](docs/UserApi.md#set_user_api_key) | **POST** /api/user/set_api_key | Set User Api Key +*UserApi* | [**delete_user_api_key**](docs/UserApi.md#delete_user_api_key) | **DELETE** /api/user/api_key/{api_key_id} | Delete User Api Key +*UserApi* | [**set_user_api_key**](docs/UserApi.md#set_user_api_key) | **POST** /api/user/api_key | Set User Api Key *UserApi* | [**update_user**](docs/UserApi.md#update_user) | **PUT** /api/user | Update User @@ -167,7 +167,7 @@ Class | Method | HTTP request | Description - [ChunkGroup](docs/ChunkGroup.md) - [ChunkGroupAndFile](docs/ChunkGroupAndFile.md) - [ChunkMetadata](docs/ChunkMetadata.md) - - [ChunkMetadataWithFileData](docs/ChunkMetadataWithFileData.md) + - [ChunkMetadataWithScore](docs/ChunkMetadataWithScore.md) - [ClientDatasetConfiguration](docs/ClientDatasetConfiguration.md) - [CreateChunkData](docs/CreateChunkData.md) - [CreateChunkGroupData](docs/CreateChunkGroupData.md) @@ -192,8 +192,8 @@ Class | Method | HTTP request | Description - [GetEventsData](docs/GetEventsData.md) - [GetGroupsForChunksData](docs/GetGroupsForChunksData.md) - [GroupData](docs/GroupData.md) - - [GroupScoreChunkDTO](docs/GroupScoreChunkDTO.md) - - [GroupSlimChunksDTO](docs/GroupSlimChunksDTO.md) + - [GroupScoreChunk](docs/GroupScoreChunk.md) + - [GroupScoreSlimChunks](docs/GroupScoreSlimChunks.md) - [InvitationData](docs/InvitationData.md) - [MatchCondition](docs/MatchCondition.md) - [Message](docs/Message.md) @@ -202,8 +202,6 @@ Class | Method | HTTP request | Description - [Range](docs/Range.md) - [RangeCondition](docs/RangeCondition.md) - [RecommendChunksRequest](docs/RecommendChunksRequest.md) - - [RecommendChunksResponseTypes](docs/RecommendChunksResponseTypes.md) - - [RecommendGroupChunkResponseTypes](docs/RecommendGroupChunkResponseTypes.md) - [RecommendGroupChunksRequest](docs/RecommendGroupChunksRequest.md) - [RegenerateMessageData](docs/RegenerateMessageData.md) - [ReturnQueuedChunk](docs/ReturnQueuedChunk.md) @@ -211,20 +209,18 @@ Class | Method | HTTP request | Description - [ScoreSlimChunks](docs/ScoreSlimChunks.md) - [SearchChunkData](docs/SearchChunkData.md) - [SearchChunkQueryResponseBody](docs/SearchChunkQueryResponseBody.md) - - [SearchChunkResponseTypes](docs/SearchChunkResponseTypes.md) - - [SearchGroupSlimChunksResult](docs/SearchGroupSlimChunksResult.md) - - [SearchGroupsResult](docs/SearchGroupsResult.md) - [SearchOverGroupsData](docs/SearchOverGroupsData.md) - - [SearchOverGroupsResponseBody](docs/SearchOverGroupsResponseBody.md) - - [SearchOverGroupsResponseTypes](docs/SearchOverGroupsResponseTypes.md) - - [SearchOverGroupsSlimChunksResponseBody](docs/SearchOverGroupsSlimChunksResponseBody.md) + - [SearchOverGroupsResults](docs/SearchOverGroupsResults.md) + - [SearchOverGroupsSlimResults](docs/SearchOverGroupsSlimResults.md) - [SearchSlimChunkQueryResponseBody](docs/SearchSlimChunkQueryResponseBody.md) - [SearchWithinGroupData](docs/SearchWithinGroupData.md) - - [SearchWithinGroupResponseTypes](docs/SearchWithinGroupResponseTypes.md) + - [SearchWithinGroupResults](docs/SearchWithinGroupResults.md) + - [SearchWithinGroupSlimResults](docs/SearchWithinGroupSlimResults.md) - [SetUserApiKeyRequest](docs/SetUserApiKeyRequest.md) - [SetUserApiKeyResponse](docs/SetUserApiKeyResponse.md) - [SingleQueuedChunkResponse](docs/SingleQueuedChunkResponse.md) - [SlimChunkMetadata](docs/SlimChunkMetadata.md) + - [SlimChunkMetadataWithScore](docs/SlimChunkMetadataWithScore.md) - [SlimGroup](docs/SlimGroup.md) - [SlimUser](docs/SlimUser.md) - [StripePlan](docs/StripePlan.md) diff --git a/docs/BookmarkData.md b/docs/BookmarkData.md index 73fd87b..ca6d7bc 100644 --- a/docs/BookmarkData.md +++ b/docs/BookmarkData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**chunks** | [**List[ChunkMetadataWithFileData]**](ChunkMetadataWithFileData.md) | | +**chunks** | [**List[ChunkMetadata]**](ChunkMetadata.md) | | **group** | [**ChunkGroup**](ChunkGroup.md) | | **total_pages** | **int** | | diff --git a/docs/ChunkApi.md b/docs/ChunkApi.md index 1882028..236d12d 100644 --- a/docs/ChunkApi.md +++ b/docs/ChunkApi.md @@ -589,7 +589,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_recommended_chunks** -> RecommendChunksResponseTypes get_recommended_chunks(tr_dataset, recommend_chunks_request) +> List[ChunkMetadataWithScore] get_recommended_chunks(tr_dataset, recommend_chunks_request) Get Recommended Chunks @@ -601,8 +601,8 @@ Get Recommended Chunks Get recommendations of chunks similar to the chunks in t ```python import trieve_py_client +from trieve_py_client.models.chunk_metadata_with_score import ChunkMetadataWithScore from trieve_py_client.models.recommend_chunks_request import RecommendChunksRequest -from trieve_py_client.models.recommend_chunks_response_types import RecommendChunksResponseTypes from trieve_py_client.rest import ApiException from pprint import pprint @@ -651,7 +651,7 @@ Name | Type | Description | Notes ### Return type -[**RecommendChunksResponseTypes**](RecommendChunksResponseTypes.md) +[**List[ChunkMetadataWithScore]**](ChunkMetadataWithScore.md) ### Authorization @@ -666,13 +666,14 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Chunks with embedding vectors which are similar to those in the request body | - | +**200** | Chunks with embedding vectors which are similar to positives and dissimilar to negatives if slim_chunks is false in the request | - | +**206** | Chunks with embedding vectors which are similar to positives and dissimilar to negatives if slim_chunks is true in the request | - | **400** | Service error relating to to getting similar chunks | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **search_chunk** -> SearchChunkResponseTypes search_chunk(tr_dataset, search_chunk_data) +> SearchChunkQueryResponseBody search_chunk(tr_dataset, search_chunk_data) Search @@ -685,7 +686,7 @@ Search This route provides the primary search functionality for the API. It can ```python import trieve_py_client from trieve_py_client.models.search_chunk_data import SearchChunkData -from trieve_py_client.models.search_chunk_response_types import SearchChunkResponseTypes +from trieve_py_client.models.search_chunk_query_response_body import SearchChunkQueryResponseBody from trieve_py_client.rest import ApiException from pprint import pprint @@ -734,7 +735,7 @@ Name | Type | Description | Notes ### Return type -[**SearchChunkResponseTypes**](SearchChunkResponseTypes.md) +[**SearchChunkQueryResponseBody**](SearchChunkQueryResponseBody.md) ### Authorization @@ -749,7 +750,8 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Chunks with embedding vectors which are similar to those in the request body | - | +**200** | Chunks with embedding vectors which are similar to those in the request body if slim_chunks is false or not specified in the request body | - | +**206** | Chunks with embedding vectors which are similar to those in the request body if slim_chunks is true in the request body | - | **400** | Service error relating to searching | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/ChunkGroupApi.md b/docs/ChunkGroupApi.md index fd21eef..f1fa4b8 100644 --- a/docs/ChunkGroupApi.md +++ b/docs/ChunkGroupApi.md @@ -846,7 +846,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_recommended_groups** -> RecommendGroupChunkResponseTypes get_recommended_groups(tr_dataset, recommend_group_chunks_request) +> List[GroupScoreChunk] get_recommended_groups(tr_dataset, recommend_group_chunks_request) Get Recommended Groups @@ -858,7 +858,7 @@ Get Recommended Groups Route to get recommended groups. This route will return ```python import trieve_py_client -from trieve_py_client.models.recommend_group_chunk_response_types import RecommendGroupChunkResponseTypes +from trieve_py_client.models.group_score_chunk import GroupScoreChunk from trieve_py_client.models.recommend_group_chunks_request import RecommendGroupChunksRequest from trieve_py_client.rest import ApiException from pprint import pprint @@ -908,7 +908,7 @@ Name | Type | Description | Notes ### Return type -[**RecommendGroupChunkResponseTypes**](RecommendGroupChunkResponseTypes.md) +[**List[GroupScoreChunk]**](GroupScoreChunk.md) ### Authorization @@ -923,7 +923,8 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | JSON body representing the groups which are similar to the groups in the request | - | +**200** | JSON body representing the groups which are similar to the positive groups and dissimilar to the negative ones if slim_chunks is false in the request | - | +**206** | JSON body representing the groups which are similar to the positive groups and dissimilar to the negative ones if slim_chunks is false in the request | - | **400** | Service error relating to to getting similar chunks | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1095,7 +1096,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **search_over_groups** -> SearchOverGroupsResponseTypes search_over_groups(tr_dataset, search_over_groups_data) +> SearchOverGroupsResults search_over_groups(tr_dataset, search_over_groups_data) Search Over Groups @@ -1108,7 +1109,7 @@ Search Over Groups This route allows you to get groups as results instead of ch ```python import trieve_py_client from trieve_py_client.models.search_over_groups_data import SearchOverGroupsData -from trieve_py_client.models.search_over_groups_response_types import SearchOverGroupsResponseTypes +from trieve_py_client.models.search_over_groups_results import SearchOverGroupsResults from trieve_py_client.rest import ApiException from pprint import pprint @@ -1157,7 +1158,7 @@ Name | Type | Description | Notes ### Return type -[**SearchOverGroupsResponseTypes**](SearchOverGroupsResponseTypes.md) +[**SearchOverGroupsResults**](SearchOverGroupsResults.md) ### Authorization @@ -1172,13 +1173,14 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Group chunks which are similar to the embedding vector of the search query | - | -**400** | Service error relating to getting the groups that the chunk is in | - | +**200** | Group chunks which are similar to the embedding vector of the search query if slim_chunks is false or unspecified in the request body | - | +**206** | Group chunks which are similar to the embedding vector of the search query if slim_chunks is true in the request body | - | +**400** | Service error relating to searching over groups | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **search_within_group** -> SearchWithinGroupResponseTypes search_within_group(tr_dataset, search_within_group_data) +> SearchWithinGroupResults search_within_group(tr_dataset, search_within_group_data) Search Within Group @@ -1191,7 +1193,7 @@ Search Within Group This route allows you to search only within a group. This i ```python import trieve_py_client from trieve_py_client.models.search_within_group_data import SearchWithinGroupData -from trieve_py_client.models.search_within_group_response_types import SearchWithinGroupResponseTypes +from trieve_py_client.models.search_within_group_results import SearchWithinGroupResults from trieve_py_client.rest import ApiException from pprint import pprint @@ -1240,7 +1242,7 @@ Name | Type | Description | Notes ### Return type -[**SearchWithinGroupResponseTypes**](SearchWithinGroupResponseTypes.md) +[**SearchWithinGroupResults**](SearchWithinGroupResults.md) ### Authorization @@ -1255,7 +1257,8 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Group chunks which are similar to the embedding vector of the search query | - | +**200** | Group chunks which are similar to the embedding vector of the search query if slim_chunks is false in the request | - | +**206** | Group chunks which are similar to the embedding vector of the search query if slim_chunks is true in the request | - | **400** | Service error relating to getting the groups that the chunk is in | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/ChunkMetadataWithScore.md b/docs/ChunkMetadataWithScore.md new file mode 100644 index 0000000..57be19f --- /dev/null +++ b/docs/ChunkMetadataWithScore.md @@ -0,0 +1,42 @@ +# ChunkMetadataWithScore + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**chunk_html** | **str** | | [optional] +**content** | **str** | | +**created_at** | **datetime** | | +**dataset_id** | **str** | | +**id** | **str** | | +**link** | **str** | | [optional] +**metadata** | **object** | | [optional] +**qdrant_point_id** | **str** | | [optional] +**score** | **float** | | +**tag_set** | **str** | | [optional] +**time_stamp** | **datetime** | | [optional] +**tracking_id** | **str** | | [optional] +**updated_at** | **datetime** | | +**weight** | **float** | | + +## Example + +```python +from trieve_py_client.models.chunk_metadata_with_score import ChunkMetadataWithScore + +# TODO update the JSON string below +json = "{}" +# create an instance of ChunkMetadataWithScore from a JSON string +chunk_metadata_with_score_instance = ChunkMetadataWithScore.from_json(json) +# print the JSON string representation of the object +print(ChunkMetadataWithScore.to_json()) + +# convert the object into a dict +chunk_metadata_with_score_dict = chunk_metadata_with_score_instance.to_dict() +# create an instance of ChunkMetadataWithScore from a dict +chunk_metadata_with_score_form_dict = chunk_metadata_with_score.from_dict(chunk_metadata_with_score_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateChunkGroupData.md b/docs/CreateChunkGroupData.md index 4ec60a9..e320fca 100644 --- a/docs/CreateChunkGroupData.md +++ b/docs/CreateChunkGroupData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**description** | **str** | Description to assign to the chunk_group. Convenience field for you to avoid having to remember what the group is for. | +**description** | **str** | Description to assign to the chunk_group. Convenience field for you to avoid having to remember what the group is for. | [optional] **metadata** | **object** | Optional metadata to assign to the chunk_group. This is a JSON object that can store any additional information you want to associate with the chunks inside of the chunk_group. | [optional] **name** | **str** | Name to assign to the chunk_group. Does not need to be unique. | **tag_set** | **List[str]** | Optional tags to assign to the chunk_group. This is a list of strings that can be used to categorize the chunks inside the chunk_group. | [optional] diff --git a/docs/GetEventsData.md b/docs/GetEventsData.md index 87d5346..36aa39f 100644 --- a/docs/GetEventsData.md +++ b/docs/GetEventsData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_types** | **List[str]** | The types of events to get. Any combination of file_uploaded, card_uploaded, card_action_failed, or card_updated. Leave undefined to get all events. | [optional] +**event_types** | **List[str]** | The types of events to get. Any combination of file_uploaded, chunk_uploaded, chunk_action_failed, or chunk_updated. Leave undefined to get all events. | [optional] **page** | **int** | The page number to get. Default is 1. | [optional] **page_size** | **int** | The number of items per page. Default is 10. | [optional] diff --git a/docs/GroupScoreChunk.md b/docs/GroupScoreChunk.md new file mode 100644 index 0000000..d9f5b18 --- /dev/null +++ b/docs/GroupScoreChunk.md @@ -0,0 +1,31 @@ +# GroupScoreChunk + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | | +**group_tracking_id** | **str** | | [optional] +**metadata** | [**List[ScoreChunkDTO]**](ScoreChunkDTO.md) | | + +## Example + +```python +from trieve_py_client.models.group_score_chunk import GroupScoreChunk + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupScoreChunk from a JSON string +group_score_chunk_instance = GroupScoreChunk.from_json(json) +# print the JSON string representation of the object +print(GroupScoreChunk.to_json()) + +# convert the object into a dict +group_score_chunk_dict = group_score_chunk_instance.to_dict() +# create an instance of GroupScoreChunk from a dict +group_score_chunk_form_dict = group_score_chunk.from_dict(group_score_chunk_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GroupScoreSlimChunks.md b/docs/GroupScoreSlimChunks.md new file mode 100644 index 0000000..61c8973 --- /dev/null +++ b/docs/GroupScoreSlimChunks.md @@ -0,0 +1,30 @@ +# GroupScoreSlimChunks + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_id** | **str** | | +**metadata** | [**List[ScoreSlimChunks]**](ScoreSlimChunks.md) | | + +## Example + +```python +from trieve_py_client.models.group_score_slim_chunks import GroupScoreSlimChunks + +# TODO update the JSON string below +json = "{}" +# create an instance of GroupScoreSlimChunks from a JSON string +group_score_slim_chunks_instance = GroupScoreSlimChunks.from_json(json) +# print the JSON string representation of the object +print(GroupScoreSlimChunks.to_json()) + +# convert the object into a dict +group_score_slim_chunks_dict = group_score_slim_chunks_instance.to_dict() +# create an instance of GroupScoreSlimChunks from a dict +group_score_slim_chunks_form_dict = group_score_slim_chunks.from_dict(group_score_slim_chunks_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ScoreChunkDTO.md b/docs/ScoreChunkDTO.md index 09b5460..9998413 100644 --- a/docs/ScoreChunkDTO.md +++ b/docs/ScoreChunkDTO.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**metadata** | [**List[ChunkMetadataWithFileData]**](ChunkMetadataWithFileData.md) | | +**metadata** | [**List[ChunkMetadata]**](ChunkMetadata.md) | | **score** | **float** | | ## Example diff --git a/docs/SearchOverGroupsResults.md b/docs/SearchOverGroupsResults.md new file mode 100644 index 0000000..a55b123 --- /dev/null +++ b/docs/SearchOverGroupsResults.md @@ -0,0 +1,30 @@ +# SearchOverGroupsResults + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_chunks** | [**List[GroupScoreChunk]**](GroupScoreChunk.md) | | +**total_chunk_pages** | **int** | | + +## Example + +```python +from trieve_py_client.models.search_over_groups_results import SearchOverGroupsResults + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchOverGroupsResults from a JSON string +search_over_groups_results_instance = SearchOverGroupsResults.from_json(json) +# print the JSON string representation of the object +print(SearchOverGroupsResults.to_json()) + +# convert the object into a dict +search_over_groups_results_dict = search_over_groups_results_instance.to_dict() +# create an instance of SearchOverGroupsResults from a dict +search_over_groups_results_form_dict = search_over_groups_results.from_dict(search_over_groups_results_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchOverGroupsSlimResults.md b/docs/SearchOverGroupsSlimResults.md new file mode 100644 index 0000000..0b25cd7 --- /dev/null +++ b/docs/SearchOverGroupsSlimResults.md @@ -0,0 +1,30 @@ +# SearchOverGroupsSlimResults + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group_chunks** | [**List[GroupScoreSlimChunks]**](GroupScoreSlimChunks.md) | | +**total_chunk_pages** | **int** | | + +## Example + +```python +from trieve_py_client.models.search_over_groups_slim_results import SearchOverGroupsSlimResults + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchOverGroupsSlimResults from a JSON string +search_over_groups_slim_results_instance = SearchOverGroupsSlimResults.from_json(json) +# print the JSON string representation of the object +print(SearchOverGroupsSlimResults.to_json()) + +# convert the object into a dict +search_over_groups_slim_results_dict = search_over_groups_slim_results_instance.to_dict() +# create an instance of SearchOverGroupsSlimResults from a dict +search_over_groups_slim_results_form_dict = search_over_groups_slim_results.from_dict(search_over_groups_slim_results_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchWithinGroupResults.md b/docs/SearchWithinGroupResults.md new file mode 100644 index 0000000..2cedaeb --- /dev/null +++ b/docs/SearchWithinGroupResults.md @@ -0,0 +1,31 @@ +# SearchWithinGroupResults + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bookmarks** | [**List[ScoreChunkDTO]**](ScoreChunkDTO.md) | | +**group** | [**ChunkGroup**](ChunkGroup.md) | | +**total_pages** | **int** | | + +## Example + +```python +from trieve_py_client.models.search_within_group_results import SearchWithinGroupResults + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchWithinGroupResults from a JSON string +search_within_group_results_instance = SearchWithinGroupResults.from_json(json) +# print the JSON string representation of the object +print(SearchWithinGroupResults.to_json()) + +# convert the object into a dict +search_within_group_results_dict = search_within_group_results_instance.to_dict() +# create an instance of SearchWithinGroupResults from a dict +search_within_group_results_form_dict = search_within_group_results.from_dict(search_within_group_results_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchWithinGroupSlimResults.md b/docs/SearchWithinGroupSlimResults.md new file mode 100644 index 0000000..0cd8bca --- /dev/null +++ b/docs/SearchWithinGroupSlimResults.md @@ -0,0 +1,31 @@ +# SearchWithinGroupSlimResults + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bookmarks** | [**List[ScoreSlimChunks]**](ScoreSlimChunks.md) | | +**group** | [**ChunkGroup**](ChunkGroup.md) | | +**total_pages** | **int** | | + +## Example + +```python +from trieve_py_client.models.search_within_group_slim_results import SearchWithinGroupSlimResults + +# TODO update the JSON string below +json = "{}" +# create an instance of SearchWithinGroupSlimResults from a JSON string +search_within_group_slim_results_instance = SearchWithinGroupSlimResults.from_json(json) +# print the JSON string representation of the object +print(SearchWithinGroupSlimResults.to_json()) + +# convert the object into a dict +search_within_group_slim_results_dict = search_within_group_slim_results_instance.to_dict() +# create an instance of SearchWithinGroupSlimResults from a dict +search_within_group_slim_results_form_dict = search_within_group_slim_results.from_dict(search_within_group_slim_results_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SlimChunkMetadataWithScore.md b/docs/SlimChunkMetadataWithScore.md new file mode 100644 index 0000000..3eeedec --- /dev/null +++ b/docs/SlimChunkMetadataWithScore.md @@ -0,0 +1,39 @@ +# SlimChunkMetadataWithScore + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | | +**id** | **str** | | +**link** | **str** | | [optional] +**metadata** | **object** | | [optional] +**qdrant_point_id** | **str** | | [optional] +**score** | **float** | | +**tag_set** | **str** | | [optional] +**time_stamp** | **datetime** | | [optional] +**tracking_id** | **str** | | [optional] +**updated_at** | **datetime** | | +**weight** | **float** | | + +## Example + +```python +from trieve_py_client.models.slim_chunk_metadata_with_score import SlimChunkMetadataWithScore + +# TODO update the JSON string below +json = "{}" +# create an instance of SlimChunkMetadataWithScore from a JSON string +slim_chunk_metadata_with_score_instance = SlimChunkMetadataWithScore.from_json(json) +# print the JSON string representation of the object +print(SlimChunkMetadataWithScore.to_json()) + +# convert the object into a dict +slim_chunk_metadata_with_score_dict = slim_chunk_metadata_with_score_instance.to_dict() +# create an instance of SlimChunkMetadataWithScore from a dict +slim_chunk_metadata_with_score_form_dict = slim_chunk_metadata_with_score.from_dict(slim_chunk_metadata_with_score_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserApi.md b/docs/UserApi.md index 1fb7973..e9f3f82 100644 --- a/docs/UserApi.md +++ b/docs/UserApi.md @@ -4,8 +4,8 @@ All URIs are relative to *https://api.trieve.ai* Method | HTTP request | Description ------------- | ------------- | ------------- -[**delete_user_api_key**](UserApi.md#delete_user_api_key) | **DELETE** /api/user/delete_api_key/{api_key_id} | Delete User Api Key -[**set_user_api_key**](UserApi.md#set_user_api_key) | **POST** /api/user/set_api_key | Set User Api Key +[**delete_user_api_key**](UserApi.md#delete_user_api_key) | **DELETE** /api/user/api_key/{api_key_id} | Delete User Api Key +[**set_user_api_key**](UserApi.md#set_user_api_key) | **POST** /api/user/api_key | Set User Api Key [**update_user**](UserApi.md#update_user) | **PUT** /api/user | Update User diff --git a/openapi-generator.yaml b/openapi-generator.yaml index 54f79d3..cfdcb3f 100644 --- a/openapi-generator.yaml +++ b/openapi-generator.yaml @@ -1,7 +1,7 @@ generatorName: python outputDir: ./generated-code/python-client packageName: trieve_py_client -packageVersion: 0.6.0 +packageVersion: 0.6.2 additionalProperties: projectName: trieve_py_client @@ -10,4 +10,4 @@ additionalProperties: packageDescription: "Python client for Trieve API generated from its OpenAPI specification using openapi-generator." packageAuthor: "Trieve" packageAuthorEmail: "developers@trieve.ai" - packageVersion: "0.6.0" \ No newline at end of file + packageVersion: "0.6.2" \ No newline at end of file diff --git a/openapi.json b/openapi.json index 325379a..6b8908d 100644 --- a/openapi.json +++ b/openapi.json @@ -12,7 +12,7 @@ "name": "BSL", "url": "https://github.com/devflowinc/trieve/blob/main/LICENSE.txt" }, - "version": "0.6.0" + "version": "0.6.2" }, "servers": [ { @@ -445,11 +445,27 @@ }, "responses": { "200": { - "description": "Chunks with embedding vectors which are similar to those in the request body", + "description": "Chunks with embedding vectors which are similar to positives and dissimilar to negatives if slim_chunks is false in the request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RecommendChunksResponseTypes" + "type": "array", + "items": { + "$ref": "#/components/schemas/ChunkMetadataWithScore" + } + } + } + } + }, + "206": { + "description": "Chunks with embedding vectors which are similar to positives and dissimilar to negatives if slim_chunks is true in the request", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SlimChunkMetadataWithScore" + } } } } @@ -506,11 +522,21 @@ }, "responses": { "200": { - "description": "Chunks with embedding vectors which are similar to those in the request body", + "description": "Chunks with embedding vectors which are similar to those in the request body if slim_chunks is false or not specified in the request body", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SearchChunkResponseTypes" + "$ref": "#/components/schemas/SearchChunkQueryResponseBody" + } + } + } + }, + "206": { + "description": "Chunks with embedding vectors which are similar to those in the request body if slim_chunks is true in the request body", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchSlimChunkQueryResponseBody" } } } @@ -1145,17 +1171,27 @@ }, "responses": { "200": { - "description": "Group chunks which are similar to the embedding vector of the search query", + "description": "Group chunks which are similar to the embedding vector of the search query if slim_chunks is false or unspecified in the request body", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SearchOverGroupsResponseTypes" + "$ref": "#/components/schemas/SearchOverGroupsResults" + } + } + } + }, + "206": { + "description": "Group chunks which are similar to the embedding vector of the search query if slim_chunks is true in the request body", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchOverGroupsSlimResults" } } } }, "400": { - "description": "Service error relating to getting the groups that the chunk is in", + "description": "Service error relating to searching over groups", "content": { "application/json": { "schema": { @@ -1206,11 +1242,27 @@ }, "responses": { "200": { - "description": "JSON body representing the groups which are similar to the groups in the request", + "description": "JSON body representing the groups which are similar to the positive groups and dissimilar to the negative ones if slim_chunks is false in the request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RecommendGroupChunkResponseTypes" + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupScoreChunk" + } + } + } + } + }, + "206": { + "description": "JSON body representing the groups which are similar to the positive groups and dissimilar to the negative ones if slim_chunks is false in the request", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupScoreSlimChunks" + } } } } @@ -1267,11 +1319,21 @@ }, "responses": { "200": { - "description": "Group chunks which are similar to the embedding vector of the search query", + "description": "Group chunks which are similar to the embedding vector of the search query if slim_chunks is false in the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchWithinGroupResults" + } + } + } + }, + "206": { + "description": "Group chunks which are similar to the embedding vector of the search query if slim_chunks is true in the request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SearchWithinGroupResponseTypes" + "$ref": "#/components/schemas/SearchWithinGroupSlimResults" } } } @@ -3672,36 +3734,32 @@ ] } }, - "/api/user/delete_api_key/{api_key_id}": { - "delete": { + "/api/user/api_key": { + "post": { "tags": [ "user" ], - "summary": "Delete User Api Key", - "description": "Delete User Api Key\n\nDelete an api key for the auth'ed user.", - "operationId": "delete_user_api_key", - "parameters": [ - { - "name": "api_key_id", - "in": "path", - "description": "The id of the api key to delete", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Set User Api Key", + "description": "Set User Api Key\n\nCreate a new api key for the auth'ed user. Successful response will contain the newly created api key. If a write role is assigned the api key will have permission level of the auth'ed user who calls this endpoint.", + "operationId": "set_user_api_key", + "requestBody": { + "description": "JSON request payload to create a new user api key", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetUserApiKeyRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "JSON body representing the api_key for the user", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApiKeyDTO" - } + "$ref": "#/components/schemas/SetUserApiKeyResponse" } } } @@ -3726,32 +3784,36 @@ ] } }, - "/api/user/set_api_key": { - "post": { + "/api/user/api_key/{api_key_id}": { + "delete": { "tags": [ "user" ], - "summary": "Set User Api Key", - "description": "Set User Api Key\n\nCreate a new api key for the auth'ed user. Successful response will contain the newly created api key. If a write role is assigned the api key will have permission level of the auth'ed user who calls this endpoint.", - "operationId": "set_user_api_key", - "requestBody": { - "description": "JSON request payload to create a new user api key", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetUserApiKeyRequest" - } + "summary": "Delete User Api Key", + "description": "Delete User Api Key\n\nDelete an api key for the auth'ed user.", + "operationId": "delete_user_api_key", + "parameters": [ + { + "name": "api_key_id", + "in": "path", + "description": "The id of the api key to delete", + "required": true, + "schema": { + "type": "string", + "format": "uuid" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "JSON body representing the api_key for the user", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SetUserApiKeyResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/ApiKeyDTO" + } } } } @@ -3944,7 +4006,7 @@ "chunks": { "type": "array", "items": { - "$ref": "#/components/schemas/ChunkMetadataWithFileData" + "$ref": "#/components/schemas/ChunkMetadata" } }, "group": { @@ -4374,15 +4436,16 @@ "weight": 0.5 } }, - "ChunkMetadataWithFileData": { + "ChunkMetadataWithScore": { "type": "object", "required": [ "id", "content", - "qdrant_point_id", "created_at", "updated_at", - "weight" + "dataset_id", + "weight", + "score" ], "properties": { "chunk_html": { @@ -4396,14 +4459,9 @@ "type": "string", "format": "date-time" }, - "file_id": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "file_name": { + "dataset_id": { "type": "string", - "nullable": true + "format": "uuid" }, "id": { "type": "string", @@ -4418,7 +4476,12 @@ }, "qdrant_point_id": { "type": "string", - "format": "uuid" + "format": "uuid", + "nullable": true + }, + "score": { + "type": "number", + "format": "float" }, "tag_set": { "type": "string", @@ -4446,14 +4509,14 @@ "chunk_html": "

Hello, world!

", "content": "Hello, world!", "created_at": "2021-01-01T00:00:00", - "file_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3", - "file_name": "file.txt", + "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3", "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3", "link": "https://trieve.ai", "metadata": { "key": "value" }, "qdrant_point_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3", + "score": 0.9, "tag_set": "tag1,tag2", "time_stamp": "2021-01-01T00:00:00", "tracking_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3", @@ -4604,13 +4667,13 @@ "CreateChunkGroupData": { "type": "object", "required": [ - "name", - "description" + "name" ], "properties": { "description": { "type": "string", - "description": "Description to assign to the chunk_group. Convenience field for you to avoid having to remember what the group is for." + "description": "Description to assign to the chunk_group. Convenience field for you to avoid having to remember what the group is for.", + "nullable": true }, "metadata": { "description": "Optional metadata to assign to the chunk_group. This is a JSON object that can store any additional information you want to associate with the chunks inside of the chunk_group.", @@ -5265,7 +5328,7 @@ "items": { "type": "string" }, - "description": "The types of events to get. Any combination of file_uploaded, card_uploaded, card_action_failed, or card_updated. Leave undefined to get all events.", + "description": "The types of events to get. Any combination of file_uploaded, chunk_uploaded, chunk_action_failed, or chunk_updated. Leave undefined to get all events.", "nullable": true }, "page": { @@ -5285,7 +5348,7 @@ "page": 1, "page_size": 10, "type": [ - "card_action_failed" + "chunk_action_failed" ] } }, @@ -5323,7 +5386,7 @@ } } }, - "GroupScoreChunkDTO": { + "GroupScoreChunk": { "type": "object", "required": [ "group_id", @@ -5368,7 +5431,7 @@ ] } }, - "GroupSlimChunksDTO": { + "GroupScoreSlimChunks": { "type": "object", "required": [ "group_id", @@ -5664,12 +5727,6 @@ } ] }, - "RecommendChunkMetadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChunkMetadata" - } - }, "RecommendChunksRequest": { "type": "object", "properties": { @@ -5734,32 +5791,6 @@ } } }, - "RecommendChunksResponseTypes": { - "oneOf": [ - { - "$ref": "#/components/schemas/RecommendChunkMetadata" - }, - { - "$ref": "#/components/schemas/RecommendSlimChunkMetadata" - } - ] - }, - "RecommendGroupChunkResponseTypes": { - "oneOf": [ - { - "$ref": "#/components/schemas/RecommendGroupSlimChunksDTO" - }, - { - "$ref": "#/components/schemas/RecommendGroupChunksDTO" - } - ] - }, - "RecommendGroupChunksDTO": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GroupScoreChunkDTO" - } - }, "RecommendGroupChunksRequest": { "type": "object", "properties": { @@ -5831,18 +5862,6 @@ } } }, - "RecommendGroupSlimChunksDTO": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GroupSlimChunksDTO" - } - }, - "RecommendSlimChunkMetadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SlimChunkMetadata" - } - }, "RegenerateMessageData": { "type": "object", "required": [ @@ -5899,7 +5918,7 @@ "metadata": { "type": "array", "items": { - "$ref": "#/components/schemas/ChunkMetadataWithFileData" + "$ref": "#/components/schemas/ChunkMetadata" } }, "score": { @@ -6124,62 +6143,6 @@ } } }, - "SearchChunkResponseTypes": { - "oneOf": [ - { - "$ref": "#/components/schemas/SearchSlimChunkQueryResponseBody" - }, - { - "$ref": "#/components/schemas/SearchChunkQueryResponseBody" - } - ] - }, - "SearchGroupSlimChunksResult": { - "type": "object", - "required": [ - "bookmarks", - "group", - "total_pages" - ], - "properties": { - "bookmarks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScoreSlimChunks" - } - }, - "group": { - "$ref": "#/components/schemas/ChunkGroup" - }, - "total_pages": { - "type": "integer", - "format": "int64" - } - } - }, - "SearchGroupsResult": { - "type": "object", - "required": [ - "bookmarks", - "group", - "total_pages" - ], - "properties": { - "bookmarks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ScoreChunkDTO" - } - }, - "group": { - "$ref": "#/components/schemas/ChunkGroup" - }, - "total_pages": { - "type": "integer", - "format": "int64" - } - } - }, "SearchOverGroupsData": { "type": "object", "required": [ @@ -6255,7 +6218,7 @@ } } }, - "SearchOverGroupsResponseBody": { + "SearchOverGroupsResults": { "type": "object", "required": [ "group_chunks", @@ -6265,7 +6228,7 @@ "group_chunks": { "type": "array", "items": { - "$ref": "#/components/schemas/GroupScoreChunkDTO" + "$ref": "#/components/schemas/GroupScoreChunk" } }, "total_chunk_pages": { @@ -6274,17 +6237,7 @@ } } }, - "SearchOverGroupsResponseTypes": { - "oneOf": [ - { - "$ref": "#/components/schemas/SearchOverGroupsResponseBody" - }, - { - "$ref": "#/components/schemas/SearchOverGroupsSlimChunksResponseBody" - } - ] - }, - "SearchOverGroupsSlimChunksResponseBody": { + "SearchOverGroupsSlimResults": { "type": "object", "required": [ "group_chunks", @@ -6294,7 +6247,7 @@ "group_chunks": { "type": "array", "items": { - "$ref": "#/components/schemas/GroupSlimChunksDTO" + "$ref": "#/components/schemas/GroupScoreSlimChunks" } }, "total_chunk_pages": { @@ -6406,15 +6359,51 @@ } } }, - "SearchWithinGroupResponseTypes": { - "oneOf": [ - { - "$ref": "#/components/schemas/SearchGroupsResult" + "SearchWithinGroupResults": { + "type": "object", + "required": [ + "bookmarks", + "group", + "total_pages" + ], + "properties": { + "bookmarks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoreChunkDTO" + } }, - { - "$ref": "#/components/schemas/SearchGroupSlimChunksResult" + "group": { + "$ref": "#/components/schemas/ChunkGroup" + }, + "total_pages": { + "type": "integer", + "format": "int64" } - ] + } + }, + "SearchWithinGroupSlimResults": { + "type": "object", + "required": [ + "bookmarks", + "group", + "total_pages" + ], + "properties": { + "bookmarks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ScoreSlimChunks" + } + }, + "group": { + "$ref": "#/components/schemas/ChunkGroup" + }, + "total_pages": { + "type": "integer", + "format": "int64" + } + } }, "SetUserApiKeyRequest": { "type": "object", @@ -6556,6 +6545,79 @@ "weight": 0.5 } }, + "SlimChunkMetadataWithScore": { + "type": "object", + "required": [ + "id", + "created_at", + "updated_at", + "weight", + "score" + ], + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "link": { + "type": "string", + "nullable": true + }, + "metadata": { + "nullable": true + }, + "qdrant_point_id": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "score": { + "type": "number", + "format": "float" + }, + "tag_set": { + "type": "string", + "nullable": true + }, + "time_stamp": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "tracking_id": { + "type": "string", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "weight": { + "type": "number", + "format": "double" + } + }, + "example": { + "created_at": "2021-01-01T00:00:00", + "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3", + "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3", + "link": "https://trieve.ai", + "metadata": { + "key": "value" + }, + "qdrant_point_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3", + "score": 0.9, + "tag_set": "tag1,tag2", + "time_stamp": "2021-01-01T00:00:00", + "tracking_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3", + "updated_at": "2021-01-01T00:00:00", + "weight": 0.5 + } + }, "SlimGroup": { "type": "object", "required": [ diff --git a/pyproject.toml b/pyproject.toml index 75a9801..fbfd633 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "trieve_py_client" -version = "0.6.0" +version = "0.6.2" description = "Trieve API" authors = ["Trieve Team "] license = "BSL" diff --git a/setup.py b/setup.py index aab6e89..8ff58a8 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -22,7 +22,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "trieve_py_client" -VERSION = "0.6.0" +VERSION = "0.6.2" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0", diff --git a/test/test_chunk_metadata_with_score.py b/test/test_chunk_metadata_with_score.py new file mode 100644 index 0000000..838a63f --- /dev/null +++ b/test/test_chunk_metadata_with_score.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Trieve API + + Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. + + The version of the OpenAPI document: 0.6.2 + Contact: developers@trieve.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from trieve_py_client.models.chunk_metadata_with_score import ChunkMetadataWithScore + +class TestChunkMetadataWithScore(unittest.TestCase): + """ChunkMetadataWithScore unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChunkMetadataWithScore: + """Test ChunkMetadataWithScore + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChunkMetadataWithScore` + """ + model = ChunkMetadataWithScore() + if include_optional: + return ChunkMetadataWithScore( + chunk_html = '', + content = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + dataset_id = '', + id = '', + link = '', + metadata = None, + qdrant_point_id = '', + score = 1.337, + tag_set = '', + time_stamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + tracking_id = '', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + weight = 1.337 + ) + else: + return ChunkMetadataWithScore( + content = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + dataset_id = '', + id = '', + score = 1.337, + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + weight = 1.337, + ) + """ + + def testChunkMetadataWithScore(self): + """Test ChunkMetadataWithScore""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_score_chunk.py b/test/test_group_score_chunk.py new file mode 100644 index 0000000..2248517 --- /dev/null +++ b/test/test_group_score_chunk.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Trieve API + + Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. + + The version of the OpenAPI document: 0.6.2 + Contact: developers@trieve.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from trieve_py_client.models.group_score_chunk import GroupScoreChunk + +class TestGroupScoreChunk(unittest.TestCase): + """GroupScoreChunk unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupScoreChunk: + """Test GroupScoreChunk + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupScoreChunk` + """ + model = GroupScoreChunk() + if include_optional: + return GroupScoreChunk( + group_id = '', + group_tracking_id = '', + metadata = [ + {"metadata":[{"chunk_html":"

Some HTML content

","content":"Some content","id":"d290f1ee-6c54-4b01-90e6-d701748f0851","link":"https://example.com","metadata":{"key1":"value1","key2":"value2"},"time_stamp":"2021-01-01T00:00:00","weight":0.5}],"score":0.5} + ] + ) + else: + return GroupScoreChunk( + group_id = '', + metadata = [ + {"metadata":[{"chunk_html":"

Some HTML content

","content":"Some content","id":"d290f1ee-6c54-4b01-90e6-d701748f0851","link":"https://example.com","metadata":{"key1":"value1","key2":"value2"},"time_stamp":"2021-01-01T00:00:00","weight":0.5}],"score":0.5} + ], + ) + """ + + def testGroupScoreChunk(self): + """Test GroupScoreChunk""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_score_slim_chunks.py b/test/test_group_score_slim_chunks.py new file mode 100644 index 0000000..6e1ed74 --- /dev/null +++ b/test/test_group_score_slim_chunks.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Trieve API + + Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. + + The version of the OpenAPI document: 0.6.2 + Contact: developers@trieve.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from trieve_py_client.models.group_score_slim_chunks import GroupScoreSlimChunks + +class TestGroupScoreSlimChunks(unittest.TestCase): + """GroupScoreSlimChunks unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GroupScoreSlimChunks: + """Test GroupScoreSlimChunks + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GroupScoreSlimChunks` + """ + model = GroupScoreSlimChunks() + if include_optional: + return GroupScoreSlimChunks( + group_id = '', + metadata = [ + {"metadata":[{"created_at":"2021-01-01T00:00:00","id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","link":"https://trieve.ai","metadata":{"key":"value"},"qdrant_point_id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","tag_set":"tag1,tag2","time_stamp":"2021-01-01T00:00:00","tracking_id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","updated_at":"2021-01-01T00:00:00","weight":0.5}],"score":0.5} + ] + ) + else: + return GroupScoreSlimChunks( + group_id = '', + metadata = [ + {"metadata":[{"created_at":"2021-01-01T00:00:00","id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","link":"https://trieve.ai","metadata":{"key":"value"},"qdrant_point_id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","tag_set":"tag1,tag2","time_stamp":"2021-01-01T00:00:00","tracking_id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","updated_at":"2021-01-01T00:00:00","weight":0.5}],"score":0.5} + ], + ) + """ + + def testGroupScoreSlimChunks(self): + """Test GroupScoreSlimChunks""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_over_groups_results.py b/test/test_search_over_groups_results.py new file mode 100644 index 0000000..6a9f975 --- /dev/null +++ b/test/test_search_over_groups_results.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Trieve API + + Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. + + The version of the OpenAPI document: 0.6.2 + Contact: developers@trieve.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from trieve_py_client.models.search_over_groups_results import SearchOverGroupsResults + +class TestSearchOverGroupsResults(unittest.TestCase): + """SearchOverGroupsResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchOverGroupsResults: + """Test SearchOverGroupsResults + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SearchOverGroupsResults` + """ + model = SearchOverGroupsResults() + if include_optional: + return SearchOverGroupsResults( + group_chunks = [ + {"group_id":"e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","metadata":[{"metadata":[{"content":"This is a test content","id":"e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","link":"https://www.google.com","metadata":{"key":"value"},"tag_set":"test","time_stamp":"2021-01-01T00:00:00Z","tracking_id":"e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","weight":1}],"score":0.5}]} + ], + total_chunk_pages = 56 + ) + else: + return SearchOverGroupsResults( + group_chunks = [ + {"group_id":"e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","metadata":[{"metadata":[{"content":"This is a test content","id":"e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","link":"https://www.google.com","metadata":{"key":"value"},"tag_set":"test","time_stamp":"2021-01-01T00:00:00Z","tracking_id":"e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","weight":1}],"score":0.5}]} + ], + total_chunk_pages = 56, + ) + """ + + def testSearchOverGroupsResults(self): + """Test SearchOverGroupsResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_over_groups_slim_results.py b/test/test_search_over_groups_slim_results.py new file mode 100644 index 0000000..fa3c85b --- /dev/null +++ b/test/test_search_over_groups_slim_results.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Trieve API + + Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. + + The version of the OpenAPI document: 0.6.2 + Contact: developers@trieve.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from trieve_py_client.models.search_over_groups_slim_results import SearchOverGroupsSlimResults + +class TestSearchOverGroupsSlimResults(unittest.TestCase): + """SearchOverGroupsSlimResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchOverGroupsSlimResults: + """Test SearchOverGroupsSlimResults + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SearchOverGroupsSlimResults` + """ + model = SearchOverGroupsSlimResults() + if include_optional: + return SearchOverGroupsSlimResults( + group_chunks = [ + {"group_id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","metadata":[{"metadata":[{"created_at":"2021-01-01T00:00:00","id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","link":"https://trieve.ai","metadata":{"key":"value"},"qdrant_point_id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","tag_set":"tag1,tag2","time_stamp":"2021-01-01T00:00:00","tracking_id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","updated_at":"2021-01-01T00:00:00","weight":0.5}],"score":0.5}]} + ], + total_chunk_pages = 56 + ) + else: + return SearchOverGroupsSlimResults( + group_chunks = [ + {"group_id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","metadata":[{"metadata":[{"created_at":"2021-01-01T00:00:00","id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","link":"https://trieve.ai","metadata":{"key":"value"},"qdrant_point_id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","tag_set":"tag1,tag2","time_stamp":"2021-01-01T00:00:00","tracking_id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","updated_at":"2021-01-01T00:00:00","weight":0.5}],"score":0.5}]} + ], + total_chunk_pages = 56, + ) + """ + + def testSearchOverGroupsSlimResults(self): + """Test SearchOverGroupsSlimResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_within_group_results.py b/test/test_search_within_group_results.py new file mode 100644 index 0000000..af9195d --- /dev/null +++ b/test/test_search_within_group_results.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Trieve API + + Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. + + The version of the OpenAPI document: 0.6.2 + Contact: developers@trieve.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from trieve_py_client.models.search_within_group_results import SearchWithinGroupResults + +class TestSearchWithinGroupResults(unittest.TestCase): + """SearchWithinGroupResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchWithinGroupResults: + """Test SearchWithinGroupResults + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SearchWithinGroupResults` + """ + model = SearchWithinGroupResults() + if include_optional: + return SearchWithinGroupResults( + bookmarks = [ + {"metadata":[{"chunk_html":"

Some HTML content

","content":"Some content","id":"d290f1ee-6c54-4b01-90e6-d701748f0851","link":"https://example.com","metadata":{"key1":"value1","key2":"value2"},"time_stamp":"2021-01-01T00:00:00","weight":0.5}],"score":0.5} + ], + group = {"created_at":"2021-01-01T00:00:00","dataset_id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","name":"Trieve","tracking_id":"3","updated_at":"2021-01-01T00:00:00"}, + total_pages = 56 + ) + else: + return SearchWithinGroupResults( + bookmarks = [ + {"metadata":[{"chunk_html":"

Some HTML content

","content":"Some content","id":"d290f1ee-6c54-4b01-90e6-d701748f0851","link":"https://example.com","metadata":{"key1":"value1","key2":"value2"},"time_stamp":"2021-01-01T00:00:00","weight":0.5}],"score":0.5} + ], + group = {"created_at":"2021-01-01T00:00:00","dataset_id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","name":"Trieve","tracking_id":"3","updated_at":"2021-01-01T00:00:00"}, + total_pages = 56, + ) + """ + + def testSearchWithinGroupResults(self): + """Test SearchWithinGroupResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_within_group_slim_results.py b/test/test_search_within_group_slim_results.py new file mode 100644 index 0000000..263f36b --- /dev/null +++ b/test/test_search_within_group_slim_results.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Trieve API + + Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. + + The version of the OpenAPI document: 0.6.2 + Contact: developers@trieve.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from trieve_py_client.models.search_within_group_slim_results import SearchWithinGroupSlimResults + +class TestSearchWithinGroupSlimResults(unittest.TestCase): + """SearchWithinGroupSlimResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SearchWithinGroupSlimResults: + """Test SearchWithinGroupSlimResults + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SearchWithinGroupSlimResults` + """ + model = SearchWithinGroupSlimResults() + if include_optional: + return SearchWithinGroupSlimResults( + bookmarks = [ + {"metadata":[{"created_at":"2021-01-01T00:00:00","id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","link":"https://trieve.ai","metadata":{"key":"value"},"qdrant_point_id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","tag_set":"tag1,tag2","time_stamp":"2021-01-01T00:00:00","tracking_id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","updated_at":"2021-01-01T00:00:00","weight":0.5}],"score":0.5} + ], + group = {"created_at":"2021-01-01T00:00:00","dataset_id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","name":"Trieve","tracking_id":"3","updated_at":"2021-01-01T00:00:00"}, + total_pages = 56 + ) + else: + return SearchWithinGroupSlimResults( + bookmarks = [ + {"metadata":[{"created_at":"2021-01-01T00:00:00","id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","link":"https://trieve.ai","metadata":{"key":"value"},"qdrant_point_id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","tag_set":"tag1,tag2","time_stamp":"2021-01-01T00:00:00","tracking_id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","updated_at":"2021-01-01T00:00:00","weight":0.5}],"score":0.5} + ], + group = {"created_at":"2021-01-01T00:00:00","dataset_id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","id":"e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3","name":"Trieve","tracking_id":"3","updated_at":"2021-01-01T00:00:00"}, + total_pages = 56, + ) + """ + + def testSearchWithinGroupSlimResults(self): + """Test SearchWithinGroupSlimResults""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_slim_chunk_metadata_with_score.py b/test/test_slim_chunk_metadata_with_score.py new file mode 100644 index 0000000..df9364f --- /dev/null +++ b/test/test_slim_chunk_metadata_with_score.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Trieve API + + Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. + + The version of the OpenAPI document: 0.6.2 + Contact: developers@trieve.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from trieve_py_client.models.slim_chunk_metadata_with_score import SlimChunkMetadataWithScore + +class TestSlimChunkMetadataWithScore(unittest.TestCase): + """SlimChunkMetadataWithScore unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SlimChunkMetadataWithScore: + """Test SlimChunkMetadataWithScore + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SlimChunkMetadataWithScore` + """ + model = SlimChunkMetadataWithScore() + if include_optional: + return SlimChunkMetadataWithScore( + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + id = '', + link = '', + metadata = None, + qdrant_point_id = '', + score = 1.337, + tag_set = '', + time_stamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + tracking_id = '', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + weight = 1.337 + ) + else: + return SlimChunkMetadataWithScore( + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + id = '', + score = 1.337, + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + weight = 1.337, + ) + """ + + def testSlimChunkMetadataWithScore(self): + """Test SlimChunkMetadataWithScore""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/trieve_py_client/__init__.py b/trieve_py_client/__init__.py index 319fb4c..86e39eb 100644 --- a/trieve_py_client/__init__.py +++ b/trieve_py_client/__init__.py @@ -7,7 +7,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "0.6.0" +__version__ = "0.6.2" # import apis into sdk package from trieve_py_client.api.auth_api import AuthApi @@ -56,7 +56,7 @@ from trieve_py_client.models.chunk_group import ChunkGroup from trieve_py_client.models.chunk_group_and_file import ChunkGroupAndFile from trieve_py_client.models.chunk_metadata import ChunkMetadata -from trieve_py_client.models.chunk_metadata_with_file_data import ChunkMetadataWithFileData +from trieve_py_client.models.chunk_metadata_with_score import ChunkMetadataWithScore from trieve_py_client.models.client_dataset_configuration import ClientDatasetConfiguration from trieve_py_client.models.create_chunk_data import CreateChunkData from trieve_py_client.models.create_chunk_group_data import CreateChunkGroupData @@ -81,8 +81,8 @@ from trieve_py_client.models.get_events_data import GetEventsData from trieve_py_client.models.get_groups_for_chunks_data import GetGroupsForChunksData from trieve_py_client.models.group_data import GroupData -from trieve_py_client.models.group_score_chunk_dto import GroupScoreChunkDTO -from trieve_py_client.models.group_slim_chunks_dto import GroupSlimChunksDTO +from trieve_py_client.models.group_score_chunk import GroupScoreChunk +from trieve_py_client.models.group_score_slim_chunks import GroupScoreSlimChunks from trieve_py_client.models.invitation_data import InvitationData from trieve_py_client.models.match_condition import MatchCondition from trieve_py_client.models.message import Message @@ -91,8 +91,6 @@ from trieve_py_client.models.range import Range from trieve_py_client.models.range_condition import RangeCondition from trieve_py_client.models.recommend_chunks_request import RecommendChunksRequest -from trieve_py_client.models.recommend_chunks_response_types import RecommendChunksResponseTypes -from trieve_py_client.models.recommend_group_chunk_response_types import RecommendGroupChunkResponseTypes from trieve_py_client.models.recommend_group_chunks_request import RecommendGroupChunksRequest from trieve_py_client.models.regenerate_message_data import RegenerateMessageData from trieve_py_client.models.return_queued_chunk import ReturnQueuedChunk @@ -100,20 +98,18 @@ from trieve_py_client.models.score_slim_chunks import ScoreSlimChunks from trieve_py_client.models.search_chunk_data import SearchChunkData from trieve_py_client.models.search_chunk_query_response_body import SearchChunkQueryResponseBody -from trieve_py_client.models.search_chunk_response_types import SearchChunkResponseTypes -from trieve_py_client.models.search_group_slim_chunks_result import SearchGroupSlimChunksResult -from trieve_py_client.models.search_groups_result import SearchGroupsResult from trieve_py_client.models.search_over_groups_data import SearchOverGroupsData -from trieve_py_client.models.search_over_groups_response_body import SearchOverGroupsResponseBody -from trieve_py_client.models.search_over_groups_response_types import SearchOverGroupsResponseTypes -from trieve_py_client.models.search_over_groups_slim_chunks_response_body import SearchOverGroupsSlimChunksResponseBody +from trieve_py_client.models.search_over_groups_results import SearchOverGroupsResults +from trieve_py_client.models.search_over_groups_slim_results import SearchOverGroupsSlimResults from trieve_py_client.models.search_slim_chunk_query_response_body import SearchSlimChunkQueryResponseBody from trieve_py_client.models.search_within_group_data import SearchWithinGroupData -from trieve_py_client.models.search_within_group_response_types import SearchWithinGroupResponseTypes +from trieve_py_client.models.search_within_group_results import SearchWithinGroupResults +from trieve_py_client.models.search_within_group_slim_results import SearchWithinGroupSlimResults from trieve_py_client.models.set_user_api_key_request import SetUserApiKeyRequest from trieve_py_client.models.set_user_api_key_response import SetUserApiKeyResponse from trieve_py_client.models.single_queued_chunk_response import SingleQueuedChunkResponse from trieve_py_client.models.slim_chunk_metadata import SlimChunkMetadata +from trieve_py_client.models.slim_chunk_metadata_with_score import SlimChunkMetadataWithScore from trieve_py_client.models.slim_group import SlimGroup from trieve_py_client.models.slim_user import SlimUser from trieve_py_client.models.stripe_plan import StripePlan diff --git a/trieve_py_client/api/auth_api.py b/trieve_py_client/api/auth_api.py index ec0ad38..7cd41d1 100644 --- a/trieve_py_client/api/auth_api.py +++ b/trieve_py_client/api/auth_api.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/api/chunk_api.py b/trieve_py_client/api/chunk_api.py index 781e9e3..409311d 100644 --- a/trieve_py_client/api/chunk_api.py +++ b/trieve_py_client/api/chunk_api.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -20,13 +20,13 @@ from pydantic import Field, StrictStr from typing_extensions import Annotated from trieve_py_client.models.chunk_metadata import ChunkMetadata +from trieve_py_client.models.chunk_metadata_with_score import ChunkMetadataWithScore from trieve_py_client.models.create_chunk_data import CreateChunkData from trieve_py_client.models.generate_chunks_request import GenerateChunksRequest from trieve_py_client.models.recommend_chunks_request import RecommendChunksRequest -from trieve_py_client.models.recommend_chunks_response_types import RecommendChunksResponseTypes from trieve_py_client.models.return_queued_chunk import ReturnQueuedChunk from trieve_py_client.models.search_chunk_data import SearchChunkData -from trieve_py_client.models.search_chunk_response_types import SearchChunkResponseTypes +from trieve_py_client.models.search_chunk_query_response_body import SearchChunkQueryResponseBody from trieve_py_client.models.suggested_queries_request import SuggestedQueriesRequest from trieve_py_client.models.suggested_queries_response import SuggestedQueriesResponse from trieve_py_client.models.update_chunk_by_tracking_id_data import UpdateChunkByTrackingIdData @@ -2042,7 +2042,7 @@ def get_recommended_chunks( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RecommendChunksResponseTypes: + ) -> List[ChunkMetadataWithScore]: """Get Recommended Chunks Get Recommended Chunks Get recommendations of chunks similar to the chunks in the request. Think about this as a feature similar to the \"add to playlist\" recommendation feature on Spotify. This request pairs especially well with our groups endpoint. @@ -2083,7 +2083,8 @@ def get_recommended_chunks( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RecommendChunksResponseTypes", + '200': "List[ChunkMetadataWithScore]", + '206': "List[SlimChunkMetadataWithScore]", '400': "ErrorResponseBody", } response_data = self.api_client.call_api( @@ -2114,7 +2115,7 @@ def get_recommended_chunks_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RecommendChunksResponseTypes]: + ) -> ApiResponse[List[ChunkMetadataWithScore]]: """Get Recommended Chunks Get Recommended Chunks Get recommendations of chunks similar to the chunks in the request. Think about this as a feature similar to the \"add to playlist\" recommendation feature on Spotify. This request pairs especially well with our groups endpoint. @@ -2155,7 +2156,8 @@ def get_recommended_chunks_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RecommendChunksResponseTypes", + '200': "List[ChunkMetadataWithScore]", + '206': "List[SlimChunkMetadataWithScore]", '400': "ErrorResponseBody", } response_data = self.api_client.call_api( @@ -2227,7 +2229,8 @@ def get_recommended_chunks_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RecommendChunksResponseTypes", + '200': "List[ChunkMetadataWithScore]", + '206': "List[SlimChunkMetadataWithScore]", '400': "ErrorResponseBody", } response_data = self.api_client.call_api( @@ -2331,7 +2334,7 @@ def search_chunk( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SearchChunkResponseTypes: + ) -> SearchChunkQueryResponseBody: """Search Search This route provides the primary search functionality for the API. It can be used to search for chunks by semantic similarity, full-text similarity, or a combination of both. Results' `chunk_html` values will be modified with `` tags for sub-sentence highlighting. @@ -2372,7 +2375,8 @@ def search_chunk( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SearchChunkResponseTypes", + '200': "SearchChunkQueryResponseBody", + '206': "SearchSlimChunkQueryResponseBody", '400': "ErrorResponseBody", } response_data = self.api_client.call_api( @@ -2403,7 +2407,7 @@ def search_chunk_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SearchChunkResponseTypes]: + ) -> ApiResponse[SearchChunkQueryResponseBody]: """Search Search This route provides the primary search functionality for the API. It can be used to search for chunks by semantic similarity, full-text similarity, or a combination of both. Results' `chunk_html` values will be modified with `` tags for sub-sentence highlighting. @@ -2444,7 +2448,8 @@ def search_chunk_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SearchChunkResponseTypes", + '200': "SearchChunkQueryResponseBody", + '206': "SearchSlimChunkQueryResponseBody", '400': "ErrorResponseBody", } response_data = self.api_client.call_api( @@ -2516,7 +2521,8 @@ def search_chunk_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SearchChunkResponseTypes", + '200': "SearchChunkQueryResponseBody", + '206': "SearchSlimChunkQueryResponseBody", '400': "ErrorResponseBody", } response_data = self.api_client.call_api( diff --git a/trieve_py_client/api/chunk_group_api.py b/trieve_py_client/api/chunk_group_api.py index 8977233..a5d0514 100644 --- a/trieve_py_client/api/chunk_group_api.py +++ b/trieve_py_client/api/chunk_group_api.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,12 +27,12 @@ from trieve_py_client.models.create_chunk_group_data import CreateChunkGroupData from trieve_py_client.models.get_groups_for_chunks_data import GetGroupsForChunksData from trieve_py_client.models.group_data import GroupData -from trieve_py_client.models.recommend_group_chunk_response_types import RecommendGroupChunkResponseTypes +from trieve_py_client.models.group_score_chunk import GroupScoreChunk from trieve_py_client.models.recommend_group_chunks_request import RecommendGroupChunksRequest from trieve_py_client.models.search_over_groups_data import SearchOverGroupsData -from trieve_py_client.models.search_over_groups_response_types import SearchOverGroupsResponseTypes +from trieve_py_client.models.search_over_groups_results import SearchOverGroupsResults from trieve_py_client.models.search_within_group_data import SearchWithinGroupData -from trieve_py_client.models.search_within_group_response_types import SearchWithinGroupResponseTypes +from trieve_py_client.models.search_within_group_results import SearchWithinGroupResults from trieve_py_client.models.update_chunk_group_data import UpdateChunkGroupData from trieve_py_client.models.update_group_by_tracking_id_data import UpdateGroupByTrackingIDData @@ -2963,7 +2963,7 @@ def get_recommended_groups( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RecommendGroupChunkResponseTypes: + ) -> List[GroupScoreChunk]: """Get Recommended Groups Get Recommended Groups Route to get recommended groups. This route will return groups which are similar to the groups in the request body. @@ -3004,7 +3004,8 @@ def get_recommended_groups( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RecommendGroupChunkResponseTypes", + '200': "List[GroupScoreChunk]", + '206': "List[GroupScoreSlimChunks]", '400': "ErrorResponseBody", } response_data = self.api_client.call_api( @@ -3035,7 +3036,7 @@ def get_recommended_groups_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RecommendGroupChunkResponseTypes]: + ) -> ApiResponse[List[GroupScoreChunk]]: """Get Recommended Groups Get Recommended Groups Route to get recommended groups. This route will return groups which are similar to the groups in the request body. @@ -3076,7 +3077,8 @@ def get_recommended_groups_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RecommendGroupChunkResponseTypes", + '200': "List[GroupScoreChunk]", + '206': "List[GroupScoreSlimChunks]", '400': "ErrorResponseBody", } response_data = self.api_client.call_api( @@ -3148,7 +3150,8 @@ def get_recommended_groups_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RecommendGroupChunkResponseTypes", + '200': "List[GroupScoreChunk]", + '206': "List[GroupScoreSlimChunks]", '400': "ErrorResponseBody", } response_data = self.api_client.call_api( @@ -3847,7 +3850,7 @@ def search_over_groups( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SearchOverGroupsResponseTypes: + ) -> SearchOverGroupsResults: """Search Over Groups Search Over Groups This route allows you to get groups as results instead of chunks. Each group returned will have the matching chunks sorted by similarity within the group. This is useful for when you want to get groups of chunks which are similar to the search query. If choosing hybrid search, the results will be re-ranked using BAAI/bge-reranker-large. Compatible with semantic, fulltext, or hybrid search modes. @@ -3888,7 +3891,8 @@ def search_over_groups( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SearchOverGroupsResponseTypes", + '200': "SearchOverGroupsResults", + '206': "SearchOverGroupsSlimResults", '400': "ErrorResponseBody", } response_data = self.api_client.call_api( @@ -3919,7 +3923,7 @@ def search_over_groups_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SearchOverGroupsResponseTypes]: + ) -> ApiResponse[SearchOverGroupsResults]: """Search Over Groups Search Over Groups This route allows you to get groups as results instead of chunks. Each group returned will have the matching chunks sorted by similarity within the group. This is useful for when you want to get groups of chunks which are similar to the search query. If choosing hybrid search, the results will be re-ranked using BAAI/bge-reranker-large. Compatible with semantic, fulltext, or hybrid search modes. @@ -3960,7 +3964,8 @@ def search_over_groups_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SearchOverGroupsResponseTypes", + '200': "SearchOverGroupsResults", + '206': "SearchOverGroupsSlimResults", '400': "ErrorResponseBody", } response_data = self.api_client.call_api( @@ -4032,7 +4037,8 @@ def search_over_groups_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SearchOverGroupsResponseTypes", + '200': "SearchOverGroupsResults", + '206': "SearchOverGroupsSlimResults", '400': "ErrorResponseBody", } response_data = self.api_client.call_api( @@ -4136,7 +4142,7 @@ def search_within_group( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SearchWithinGroupResponseTypes: + ) -> SearchWithinGroupResults: """Search Within Group Search Within Group This route allows you to search only within a group. This is useful for when you only want search results to contain chunks which are members of a specific group. If choosing hybrid search, the results will be re-ranked using BAAI/bge-reranker-large. @@ -4177,7 +4183,8 @@ def search_within_group( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SearchWithinGroupResponseTypes", + '200': "SearchWithinGroupResults", + '206': "SearchWithinGroupSlimResults", '400': "ErrorResponseBody", } response_data = self.api_client.call_api( @@ -4208,7 +4215,7 @@ def search_within_group_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SearchWithinGroupResponseTypes]: + ) -> ApiResponse[SearchWithinGroupResults]: """Search Within Group Search Within Group This route allows you to search only within a group. This is useful for when you only want search results to contain chunks which are members of a specific group. If choosing hybrid search, the results will be re-ranked using BAAI/bge-reranker-large. @@ -4249,7 +4256,8 @@ def search_within_group_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SearchWithinGroupResponseTypes", + '200': "SearchWithinGroupResults", + '206': "SearchWithinGroupSlimResults", '400': "ErrorResponseBody", } response_data = self.api_client.call_api( @@ -4321,7 +4329,8 @@ def search_within_group_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SearchWithinGroupResponseTypes", + '200': "SearchWithinGroupResults", + '206': "SearchWithinGroupSlimResults", '400': "ErrorResponseBody", } response_data = self.api_client.call_api( diff --git a/trieve_py_client/api/dataset_api.py b/trieve_py_client/api/dataset_api.py index c219109..12bc97d 100644 --- a/trieve_py_client/api/dataset_api.py +++ b/trieve_py_client/api/dataset_api.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/api/events_api.py b/trieve_py_client/api/events_api.py index eaf22d8..b91a71b 100644 --- a/trieve_py_client/api/events_api.py +++ b/trieve_py_client/api/events_api.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/api/file_api.py b/trieve_py_client/api/file_api.py index 901a838..58b25d7 100644 --- a/trieve_py_client/api/file_api.py +++ b/trieve_py_client/api/file_api.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/api/health_api.py b/trieve_py_client/api/health_api.py index 53381e4..7dc6794 100644 --- a/trieve_py_client/api/health_api.py +++ b/trieve_py_client/api/health_api.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/api/invitation_api.py b/trieve_py_client/api/invitation_api.py index ad8ecf1..366cad9 100644 --- a/trieve_py_client/api/invitation_api.py +++ b/trieve_py_client/api/invitation_api.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/api/message_api.py b/trieve_py_client/api/message_api.py index 5985e73..10919f8 100644 --- a/trieve_py_client/api/message_api.py +++ b/trieve_py_client/api/message_api.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/api/organization_api.py b/trieve_py_client/api/organization_api.py index cd5ba36..2e34617 100644 --- a/trieve_py_client/api/organization_api.py +++ b/trieve_py_client/api/organization_api.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/api/stripe_api.py b/trieve_py_client/api/stripe_api.py index 4f9e003..a4bf5e4 100644 --- a/trieve_py_client/api/stripe_api.py +++ b/trieve_py_client/api/stripe_api.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/api/topic_api.py b/trieve_py_client/api/topic_api.py index 0d8fd35..cef1e14 100644 --- a/trieve_py_client/api/topic_api.py +++ b/trieve_py_client/api/topic_api.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/api/user_api.py b/trieve_py_client/api/user_api.py index 19ca1fb..c4055b2 100644 --- a/trieve_py_client/api/user_api.py +++ b/trieve_py_client/api/user_api.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -288,7 +288,7 @@ def _delete_user_api_key_serialize( return self.api_client.param_serialize( method='DELETE', - resource_path='/api/user/delete_api_key/{api_key_id}', + resource_path='/api/user/api_key/{api_key_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -562,7 +562,7 @@ def _set_user_api_key_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/api/user/set_api_key', + resource_path='/api/user/api_key', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/trieve_py_client/api_client.py b/trieve_py_client/api_client.py index d0130d4..7d37c2d 100644 --- a/trieve_py_client/api_client.py +++ b/trieve_py_client/api_client.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -88,7 +88,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/0.6.0/python' + self.user_agent = 'OpenAPI-Generator/0.6.2/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/trieve_py_client/configuration.py b/trieve_py_client/configuration.py index f7445e5..c2c60d4 100644 --- a/trieve_py_client/configuration.py +++ b/trieve_py_client/configuration.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -399,8 +399,8 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 0.6.0\n"\ - "SDK Package Version: 0.6.0".\ + "Version of the API: 0.6.2\n"\ + "SDK Package Version: 0.6.2".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/trieve_py_client/exceptions.py b/trieve_py_client/exceptions.py index 86c4c3b..db82d02 100644 --- a/trieve_py_client/exceptions.py +++ b/trieve_py_client/exceptions.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/__init__.py b/trieve_py_client/models/__init__.py index 6c2451b..47e1077 100644 --- a/trieve_py_client/models/__init__.py +++ b/trieve_py_client/models/__init__.py @@ -6,7 +6,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,7 +27,7 @@ from trieve_py_client.models.chunk_group import ChunkGroup from trieve_py_client.models.chunk_group_and_file import ChunkGroupAndFile from trieve_py_client.models.chunk_metadata import ChunkMetadata -from trieve_py_client.models.chunk_metadata_with_file_data import ChunkMetadataWithFileData +from trieve_py_client.models.chunk_metadata_with_score import ChunkMetadataWithScore from trieve_py_client.models.client_dataset_configuration import ClientDatasetConfiguration from trieve_py_client.models.create_chunk_data import CreateChunkData from trieve_py_client.models.create_chunk_group_data import CreateChunkGroupData @@ -52,8 +52,8 @@ from trieve_py_client.models.get_events_data import GetEventsData from trieve_py_client.models.get_groups_for_chunks_data import GetGroupsForChunksData from trieve_py_client.models.group_data import GroupData -from trieve_py_client.models.group_score_chunk_dto import GroupScoreChunkDTO -from trieve_py_client.models.group_slim_chunks_dto import GroupSlimChunksDTO +from trieve_py_client.models.group_score_chunk import GroupScoreChunk +from trieve_py_client.models.group_score_slim_chunks import GroupScoreSlimChunks from trieve_py_client.models.invitation_data import InvitationData from trieve_py_client.models.match_condition import MatchCondition from trieve_py_client.models.message import Message @@ -62,8 +62,6 @@ from trieve_py_client.models.range import Range from trieve_py_client.models.range_condition import RangeCondition from trieve_py_client.models.recommend_chunks_request import RecommendChunksRequest -from trieve_py_client.models.recommend_chunks_response_types import RecommendChunksResponseTypes -from trieve_py_client.models.recommend_group_chunk_response_types import RecommendGroupChunkResponseTypes from trieve_py_client.models.recommend_group_chunks_request import RecommendGroupChunksRequest from trieve_py_client.models.regenerate_message_data import RegenerateMessageData from trieve_py_client.models.return_queued_chunk import ReturnQueuedChunk @@ -71,20 +69,18 @@ from trieve_py_client.models.score_slim_chunks import ScoreSlimChunks from trieve_py_client.models.search_chunk_data import SearchChunkData from trieve_py_client.models.search_chunk_query_response_body import SearchChunkQueryResponseBody -from trieve_py_client.models.search_chunk_response_types import SearchChunkResponseTypes -from trieve_py_client.models.search_group_slim_chunks_result import SearchGroupSlimChunksResult -from trieve_py_client.models.search_groups_result import SearchGroupsResult from trieve_py_client.models.search_over_groups_data import SearchOverGroupsData -from trieve_py_client.models.search_over_groups_response_body import SearchOverGroupsResponseBody -from trieve_py_client.models.search_over_groups_response_types import SearchOverGroupsResponseTypes -from trieve_py_client.models.search_over_groups_slim_chunks_response_body import SearchOverGroupsSlimChunksResponseBody +from trieve_py_client.models.search_over_groups_results import SearchOverGroupsResults +from trieve_py_client.models.search_over_groups_slim_results import SearchOverGroupsSlimResults from trieve_py_client.models.search_slim_chunk_query_response_body import SearchSlimChunkQueryResponseBody from trieve_py_client.models.search_within_group_data import SearchWithinGroupData -from trieve_py_client.models.search_within_group_response_types import SearchWithinGroupResponseTypes +from trieve_py_client.models.search_within_group_results import SearchWithinGroupResults +from trieve_py_client.models.search_within_group_slim_results import SearchWithinGroupSlimResults from trieve_py_client.models.set_user_api_key_request import SetUserApiKeyRequest from trieve_py_client.models.set_user_api_key_response import SetUserApiKeyResponse from trieve_py_client.models.single_queued_chunk_response import SingleQueuedChunkResponse from trieve_py_client.models.slim_chunk_metadata import SlimChunkMetadata +from trieve_py_client.models.slim_chunk_metadata_with_score import SlimChunkMetadataWithScore from trieve_py_client.models.slim_group import SlimGroup from trieve_py_client.models.slim_user import SlimUser from trieve_py_client.models.stripe_plan import StripePlan diff --git a/trieve_py_client/models/add_chunk_to_group_data.py b/trieve_py_client/models/add_chunk_to_group_data.py index 4dd952f..afcd830 100644 --- a/trieve_py_client/models/add_chunk_to_group_data.py +++ b/trieve_py_client/models/add_chunk_to_group_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/api_key_dto.py b/trieve_py_client/models/api_key_dto.py index f752195..b1f7354 100644 --- a/trieve_py_client/models/api_key_dto.py +++ b/trieve_py_client/models/api_key_dto.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/auth_query.py b/trieve_py_client/models/auth_query.py index fbd8ab2..7b88556 100644 --- a/trieve_py_client/models/auth_query.py +++ b/trieve_py_client/models/auth_query.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/batch_queued_chunk_response.py b/trieve_py_client/models/batch_queued_chunk_response.py index 68114c2..7dbce60 100644 --- a/trieve_py_client/models/batch_queued_chunk_response.py +++ b/trieve_py_client/models/batch_queued_chunk_response.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/bookmark_data.py b/trieve_py_client/models/bookmark_data.py index ad93c05..fd98a0e 100644 --- a/trieve_py_client/models/bookmark_data.py +++ b/trieve_py_client/models/bookmark_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict, StrictInt from typing import Any, ClassVar, Dict, List from trieve_py_client.models.chunk_group import ChunkGroup -from trieve_py_client.models.chunk_metadata_with_file_data import ChunkMetadataWithFileData +from trieve_py_client.models.chunk_metadata import ChunkMetadata from typing import Optional, Set from typing_extensions import Self @@ -29,7 +29,7 @@ class BookmarkData(BaseModel): """ BookmarkData """ # noqa: E501 - chunks: List[ChunkMetadataWithFileData] + chunks: List[ChunkMetadata] group: ChunkGroup total_pages: StrictInt __properties: ClassVar[List[str]] = ["chunks", "group", "total_pages"] @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "chunks": [ChunkMetadataWithFileData.from_dict(_item) for _item in obj["chunks"]] if obj.get("chunks") is not None else None, + "chunks": [ChunkMetadata.from_dict(_item) for _item in obj["chunks"]] if obj.get("chunks") is not None else None, "group": ChunkGroup.from_dict(obj["group"]) if obj.get("group") is not None else None, "total_pages": obj.get("total_pages") }) diff --git a/trieve_py_client/models/bookmark_group_result.py b/trieve_py_client/models/bookmark_group_result.py index 5d17989..cf30fd3 100644 --- a/trieve_py_client/models/bookmark_group_result.py +++ b/trieve_py_client/models/bookmark_group_result.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/chat_message_proxy.py b/trieve_py_client/models/chat_message_proxy.py index 72e31a1..4e5fb59 100644 --- a/trieve_py_client/models/chat_message_proxy.py +++ b/trieve_py_client/models/chat_message_proxy.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/chunk_data.py b/trieve_py_client/models/chunk_data.py index 1fee110..b24f791 100644 --- a/trieve_py_client/models/chunk_data.py +++ b/trieve_py_client/models/chunk_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/chunk_filter.py b/trieve_py_client/models/chunk_filter.py index 0834588..5b3fb73 100644 --- a/trieve_py_client/models/chunk_filter.py +++ b/trieve_py_client/models/chunk_filter.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/chunk_group.py b/trieve_py_client/models/chunk_group.py index 6560c86..53b7aae 100644 --- a/trieve_py_client/models/chunk_group.py +++ b/trieve_py_client/models/chunk_group.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/chunk_group_and_file.py b/trieve_py_client/models/chunk_group_and_file.py index 7d215c5..11d0bda 100644 --- a/trieve_py_client/models/chunk_group_and_file.py +++ b/trieve_py_client/models/chunk_group_and_file.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/chunk_metadata.py b/trieve_py_client/models/chunk_metadata.py index 2a2580a..7aa5f5a 100644 --- a/trieve_py_client/models/chunk_metadata.py +++ b/trieve_py_client/models/chunk_metadata.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/chunk_metadata_with_score.py b/trieve_py_client/models/chunk_metadata_with_score.py new file mode 100644 index 0000000..4aac3c1 --- /dev/null +++ b/trieve_py_client/models/chunk_metadata_with_score.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + Trieve API + + Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. + + The version of the OpenAPI document: 0.6.2 + Contact: developers@trieve.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class ChunkMetadataWithScore(BaseModel): + """ + ChunkMetadataWithScore + """ # noqa: E501 + chunk_html: Optional[StrictStr] = None + content: StrictStr + created_at: datetime + dataset_id: StrictStr + id: StrictStr + link: Optional[StrictStr] = None + metadata: Optional[Any] = None + qdrant_point_id: Optional[StrictStr] = None + score: Union[StrictFloat, StrictInt] + tag_set: Optional[StrictStr] = None + time_stamp: Optional[datetime] = None + tracking_id: Optional[StrictStr] = None + updated_at: datetime + weight: Union[StrictFloat, StrictInt] + __properties: ClassVar[List[str]] = ["chunk_html", "content", "created_at", "dataset_id", "id", "link", "metadata", "qdrant_point_id", "score", "tag_set", "time_stamp", "tracking_id", "updated_at", "weight"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChunkMetadataWithScore from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if chunk_html (nullable) is None + # and model_fields_set contains the field + if self.chunk_html is None and "chunk_html" in self.model_fields_set: + _dict['chunk_html'] = None + + # set to None if link (nullable) is None + # and model_fields_set contains the field + if self.link is None and "link" in self.model_fields_set: + _dict['link'] = None + + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + # set to None if qdrant_point_id (nullable) is None + # and model_fields_set contains the field + if self.qdrant_point_id is None and "qdrant_point_id" in self.model_fields_set: + _dict['qdrant_point_id'] = None + + # set to None if tag_set (nullable) is None + # and model_fields_set contains the field + if self.tag_set is None and "tag_set" in self.model_fields_set: + _dict['tag_set'] = None + + # set to None if time_stamp (nullable) is None + # and model_fields_set contains the field + if self.time_stamp is None and "time_stamp" in self.model_fields_set: + _dict['time_stamp'] = None + + # set to None if tracking_id (nullable) is None + # and model_fields_set contains the field + if self.tracking_id is None and "tracking_id" in self.model_fields_set: + _dict['tracking_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChunkMetadataWithScore from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "chunk_html": obj.get("chunk_html"), + "content": obj.get("content"), + "created_at": obj.get("created_at"), + "dataset_id": obj.get("dataset_id"), + "id": obj.get("id"), + "link": obj.get("link"), + "metadata": obj.get("metadata"), + "qdrant_point_id": obj.get("qdrant_point_id"), + "score": obj.get("score"), + "tag_set": obj.get("tag_set"), + "time_stamp": obj.get("time_stamp"), + "tracking_id": obj.get("tracking_id"), + "updated_at": obj.get("updated_at"), + "weight": obj.get("weight") + }) + return _obj + + diff --git a/trieve_py_client/models/client_dataset_configuration.py b/trieve_py_client/models/client_dataset_configuration.py index 7b14382..b5ee5af 100644 --- a/trieve_py_client/models/client_dataset_configuration.py +++ b/trieve_py_client/models/client_dataset_configuration.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/create_chunk_data.py b/trieve_py_client/models/create_chunk_data.py index 8ff71b3..ad55b49 100644 --- a/trieve_py_client/models/create_chunk_data.py +++ b/trieve_py_client/models/create_chunk_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/create_chunk_group_data.py b/trieve_py_client/models/create_chunk_group_data.py index 78c1656..fb65789 100644 --- a/trieve_py_client/models/create_chunk_group_data.py +++ b/trieve_py_client/models/create_chunk_group_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,7 +27,7 @@ class CreateChunkGroupData(BaseModel): """ CreateChunkGroupData """ # noqa: E501 - description: StrictStr = Field(description="Description to assign to the chunk_group. Convenience field for you to avoid having to remember what the group is for.") + description: Optional[StrictStr] = Field(default=None, description="Description to assign to the chunk_group. Convenience field for you to avoid having to remember what the group is for.") metadata: Optional[Any] = Field(default=None, description="Optional metadata to assign to the chunk_group. This is a JSON object that can store any additional information you want to associate with the chunks inside of the chunk_group.") name: StrictStr = Field(description="Name to assign to the chunk_group. Does not need to be unique.") tag_set: Optional[List[StrictStr]] = Field(default=None, description="Optional tags to assign to the chunk_group. This is a list of strings that can be used to categorize the chunks inside the chunk_group.") @@ -73,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if description (nullable) is None + # and model_fields_set contains the field + if self.description is None and "description" in self.model_fields_set: + _dict['description'] = None + # set to None if metadata (nullable) is None # and model_fields_set contains the field if self.metadata is None and "metadata" in self.model_fields_set: diff --git a/trieve_py_client/models/create_dataset_request.py b/trieve_py_client/models/create_dataset_request.py index 8d3002b..2fc441f 100644 --- a/trieve_py_client/models/create_dataset_request.py +++ b/trieve_py_client/models/create_dataset_request.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/create_message_data.py b/trieve_py_client/models/create_message_data.py index d4a1747..2e95898 100644 --- a/trieve_py_client/models/create_message_data.py +++ b/trieve_py_client/models/create_message_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/create_organization_data.py b/trieve_py_client/models/create_organization_data.py index effa3bd..8691612 100644 --- a/trieve_py_client/models/create_organization_data.py +++ b/trieve_py_client/models/create_organization_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/create_topic_data.py b/trieve_py_client/models/create_topic_data.py index ac30226..2290770 100644 --- a/trieve_py_client/models/create_topic_data.py +++ b/trieve_py_client/models/create_topic_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/dataset.py b/trieve_py_client/models/dataset.py index ec9216e..c541bfc 100644 --- a/trieve_py_client/models/dataset.py +++ b/trieve_py_client/models/dataset.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/dataset_and_usage.py b/trieve_py_client/models/dataset_and_usage.py index ed8da7b..b2509e8 100644 --- a/trieve_py_client/models/dataset_and_usage.py +++ b/trieve_py_client/models/dataset_and_usage.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/dataset_dto.py b/trieve_py_client/models/dataset_dto.py index f948c00..5906d10 100644 --- a/trieve_py_client/models/dataset_dto.py +++ b/trieve_py_client/models/dataset_dto.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/dataset_usage_count.py b/trieve_py_client/models/dataset_usage_count.py index b9225e3..3ee2089 100644 --- a/trieve_py_client/models/dataset_usage_count.py +++ b/trieve_py_client/models/dataset_usage_count.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/delete_topic_data.py b/trieve_py_client/models/delete_topic_data.py index 54c2a6f..f1b98a7 100644 --- a/trieve_py_client/models/delete_topic_data.py +++ b/trieve_py_client/models/delete_topic_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/delete_user_api_key_request.py b/trieve_py_client/models/delete_user_api_key_request.py index 774556d..11d4ed9 100644 --- a/trieve_py_client/models/delete_user_api_key_request.py +++ b/trieve_py_client/models/delete_user_api_key_request.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/edit_message_data.py b/trieve_py_client/models/edit_message_data.py index ff358c1..7fc5c48 100644 --- a/trieve_py_client/models/edit_message_data.py +++ b/trieve_py_client/models/edit_message_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/error_response_body.py b/trieve_py_client/models/error_response_body.py index 49558f8..c0c41cf 100644 --- a/trieve_py_client/models/error_response_body.py +++ b/trieve_py_client/models/error_response_body.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/event.py b/trieve_py_client/models/event.py index 757f47a..e830cf1 100644 --- a/trieve_py_client/models/event.py +++ b/trieve_py_client/models/event.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/event_return.py b/trieve_py_client/models/event_return.py index ed43795..1ce6436 100644 --- a/trieve_py_client/models/event_return.py +++ b/trieve_py_client/models/event_return.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/field_condition.py b/trieve_py_client/models/field_condition.py index 1997801..92318f3 100644 --- a/trieve_py_client/models/field_condition.py +++ b/trieve_py_client/models/field_condition.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/file.py b/trieve_py_client/models/file.py index 801366a..10e0613 100644 --- a/trieve_py_client/models/file.py +++ b/trieve_py_client/models/file.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/file_dto.py b/trieve_py_client/models/file_dto.py index c1129ad..8c01e05 100644 --- a/trieve_py_client/models/file_dto.py +++ b/trieve_py_client/models/file_dto.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/generate_chunks_request.py b/trieve_py_client/models/generate_chunks_request.py index 1b169a0..0e78009 100644 --- a/trieve_py_client/models/generate_chunks_request.py +++ b/trieve_py_client/models/generate_chunks_request.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/get_events_data.py b/trieve_py_client/models/get_events_data.py index b25d930..47272f0 100644 --- a/trieve_py_client/models/get_events_data.py +++ b/trieve_py_client/models/get_events_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,7 +27,7 @@ class GetEventsData(BaseModel): """ GetEventsData """ # noqa: E501 - event_types: Optional[List[StrictStr]] = Field(default=None, description="The types of events to get. Any combination of file_uploaded, card_uploaded, card_action_failed, or card_updated. Leave undefined to get all events.") + event_types: Optional[List[StrictStr]] = Field(default=None, description="The types of events to get. Any combination of file_uploaded, chunk_uploaded, chunk_action_failed, or chunk_updated. Leave undefined to get all events.") page: Optional[StrictInt] = Field(default=None, description="The page number to get. Default is 1.") page_size: Optional[StrictInt] = Field(default=None, description="The number of items per page. Default is 10.") __properties: ClassVar[List[str]] = ["event_types", "page", "page_size"] diff --git a/trieve_py_client/models/get_groups_for_chunks_data.py b/trieve_py_client/models/get_groups_for_chunks_data.py index 0474963..937c23f 100644 --- a/trieve_py_client/models/get_groups_for_chunks_data.py +++ b/trieve_py_client/models/get_groups_for_chunks_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/group_data.py b/trieve_py_client/models/group_data.py index 21da1ce..826a344 100644 --- a/trieve_py_client/models/group_data.py +++ b/trieve_py_client/models/group_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/group_score_chunk.py b/trieve_py_client/models/group_score_chunk.py new file mode 100644 index 0000000..ea13d59 --- /dev/null +++ b/trieve_py_client/models/group_score_chunk.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Trieve API + + Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. + + The version of the OpenAPI document: 0.6.2 + Contact: developers@trieve.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from trieve_py_client.models.score_chunk_dto import ScoreChunkDTO +from typing import Optional, Set +from typing_extensions import Self + +class GroupScoreChunk(BaseModel): + """ + GroupScoreChunk + """ # noqa: E501 + group_id: StrictStr + group_tracking_id: Optional[StrictStr] = None + metadata: List[ScoreChunkDTO] + __properties: ClassVar[List[str]] = ["group_id", "group_tracking_id", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupScoreChunk from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in metadata (list) + _items = [] + if self.metadata: + for _item in self.metadata: + if _item: + _items.append(_item.to_dict()) + _dict['metadata'] = _items + # set to None if group_tracking_id (nullable) is None + # and model_fields_set contains the field + if self.group_tracking_id is None and "group_tracking_id" in self.model_fields_set: + _dict['group_tracking_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupScoreChunk from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id"), + "group_tracking_id": obj.get("group_tracking_id"), + "metadata": [ScoreChunkDTO.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None + }) + return _obj + + diff --git a/trieve_py_client/models/group_score_slim_chunks.py b/trieve_py_client/models/group_score_slim_chunks.py new file mode 100644 index 0000000..88e9106 --- /dev/null +++ b/trieve_py_client/models/group_score_slim_chunks.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Trieve API + + Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. + + The version of the OpenAPI document: 0.6.2 + Contact: developers@trieve.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from trieve_py_client.models.score_slim_chunks import ScoreSlimChunks +from typing import Optional, Set +from typing_extensions import Self + +class GroupScoreSlimChunks(BaseModel): + """ + GroupScoreSlimChunks + """ # noqa: E501 + group_id: StrictStr + metadata: List[ScoreSlimChunks] + __properties: ClassVar[List[str]] = ["group_id", "metadata"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GroupScoreSlimChunks from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in metadata (list) + _items = [] + if self.metadata: + for _item in self.metadata: + if _item: + _items.append(_item.to_dict()) + _dict['metadata'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GroupScoreSlimChunks from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_id": obj.get("group_id"), + "metadata": [ScoreSlimChunks.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None + }) + return _obj + + diff --git a/trieve_py_client/models/invitation_data.py b/trieve_py_client/models/invitation_data.py index 617186d..4a0043a 100644 --- a/trieve_py_client/models/invitation_data.py +++ b/trieve_py_client/models/invitation_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/match_condition.py b/trieve_py_client/models/match_condition.py index 671981a..5862a27 100644 --- a/trieve_py_client/models/match_condition.py +++ b/trieve_py_client/models/match_condition.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/message.py b/trieve_py_client/models/message.py index 45c5f01..d4e4de5 100644 --- a/trieve_py_client/models/message.py +++ b/trieve_py_client/models/message.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/organization.py b/trieve_py_client/models/organization.py index 0fb71ca..20f0f0d 100644 --- a/trieve_py_client/models/organization.py +++ b/trieve_py_client/models/organization.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/organization_usage_count.py b/trieve_py_client/models/organization_usage_count.py index 6106ff2..ab45681 100644 --- a/trieve_py_client/models/organization_usage_count.py +++ b/trieve_py_client/models/organization_usage_count.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/range.py b/trieve_py_client/models/range.py index ad73dd3..8c40866 100644 --- a/trieve_py_client/models/range.py +++ b/trieve_py_client/models/range.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/range_condition.py b/trieve_py_client/models/range_condition.py index 6d05bf1..1b670b7 100644 --- a/trieve_py_client/models/range_condition.py +++ b/trieve_py_client/models/range_condition.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/recommend_chunks_request.py b/trieve_py_client/models/recommend_chunks_request.py index 97867f5..33374db 100644 --- a/trieve_py_client/models/recommend_chunks_request.py +++ b/trieve_py_client/models/recommend_chunks_request.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/recommend_group_chunks_request.py b/trieve_py_client/models/recommend_group_chunks_request.py index 83890a7..68b08db 100644 --- a/trieve_py_client/models/recommend_group_chunks_request.py +++ b/trieve_py_client/models/recommend_group_chunks_request.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/regenerate_message_data.py b/trieve_py_client/models/regenerate_message_data.py index 98e138d..a3e2400 100644 --- a/trieve_py_client/models/regenerate_message_data.py +++ b/trieve_py_client/models/regenerate_message_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/return_queued_chunk.py b/trieve_py_client/models/return_queued_chunk.py index c0d7f19..9acd89c 100644 --- a/trieve_py_client/models/return_queued_chunk.py +++ b/trieve_py_client/models/return_queued_chunk.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/score_chunk_dto.py b/trieve_py_client/models/score_chunk_dto.py index 3f4ddc8..3f323bf 100644 --- a/trieve_py_client/models/score_chunk_dto.py +++ b/trieve_py_client/models/score_chunk_dto.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Union -from trieve_py_client.models.chunk_metadata_with_file_data import ChunkMetadataWithFileData +from trieve_py_client.models.chunk_metadata import ChunkMetadata from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class ScoreChunkDTO(BaseModel): """ ScoreChunkDTO """ # noqa: E501 - metadata: List[ChunkMetadataWithFileData] + metadata: List[ChunkMetadata] score: Union[StrictFloat, StrictInt] __properties: ClassVar[List[str]] = ["metadata", "score"] @@ -90,7 +90,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "metadata": [ChunkMetadataWithFileData.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None, + "metadata": [ChunkMetadata.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None, "score": obj.get("score") }) return _obj diff --git a/trieve_py_client/models/score_slim_chunks.py b/trieve_py_client/models/score_slim_chunks.py index 6bc31c8..1d7f882 100644 --- a/trieve_py_client/models/score_slim_chunks.py +++ b/trieve_py_client/models/score_slim_chunks.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/search_chunk_data.py b/trieve_py_client/models/search_chunk_data.py index 06c116e..792fcda 100644 --- a/trieve_py_client/models/search_chunk_data.py +++ b/trieve_py_client/models/search_chunk_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/search_chunk_query_response_body.py b/trieve_py_client/models/search_chunk_query_response_body.py index bdcdc0d..6b52094 100644 --- a/trieve_py_client/models/search_chunk_query_response_body.py +++ b/trieve_py_client/models/search_chunk_query_response_body.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/search_over_groups_data.py b/trieve_py_client/models/search_over_groups_data.py index a0d6e2c..53b82b0 100644 --- a/trieve_py_client/models/search_over_groups_data.py +++ b/trieve_py_client/models/search_over_groups_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/search_over_groups_results.py b/trieve_py_client/models/search_over_groups_results.py new file mode 100644 index 0000000..5ecba66 --- /dev/null +++ b/trieve_py_client/models/search_over_groups_results.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Trieve API + + Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. + + The version of the OpenAPI document: 0.6.2 + Contact: developers@trieve.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from trieve_py_client.models.group_score_chunk import GroupScoreChunk +from typing import Optional, Set +from typing_extensions import Self + +class SearchOverGroupsResults(BaseModel): + """ + SearchOverGroupsResults + """ # noqa: E501 + group_chunks: List[GroupScoreChunk] + total_chunk_pages: StrictInt + __properties: ClassVar[List[str]] = ["group_chunks", "total_chunk_pages"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchOverGroupsResults from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in group_chunks (list) + _items = [] + if self.group_chunks: + for _item in self.group_chunks: + if _item: + _items.append(_item.to_dict()) + _dict['group_chunks'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchOverGroupsResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_chunks": [GroupScoreChunk.from_dict(_item) for _item in obj["group_chunks"]] if obj.get("group_chunks") is not None else None, + "total_chunk_pages": obj.get("total_chunk_pages") + }) + return _obj + + diff --git a/trieve_py_client/models/search_over_groups_slim_results.py b/trieve_py_client/models/search_over_groups_slim_results.py new file mode 100644 index 0000000..21cf77b --- /dev/null +++ b/trieve_py_client/models/search_over_groups_slim_results.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Trieve API + + Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. + + The version of the OpenAPI document: 0.6.2 + Contact: developers@trieve.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from trieve_py_client.models.group_score_slim_chunks import GroupScoreSlimChunks +from typing import Optional, Set +from typing_extensions import Self + +class SearchOverGroupsSlimResults(BaseModel): + """ + SearchOverGroupsSlimResults + """ # noqa: E501 + group_chunks: List[GroupScoreSlimChunks] + total_chunk_pages: StrictInt + __properties: ClassVar[List[str]] = ["group_chunks", "total_chunk_pages"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchOverGroupsSlimResults from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in group_chunks (list) + _items = [] + if self.group_chunks: + for _item in self.group_chunks: + if _item: + _items.append(_item.to_dict()) + _dict['group_chunks'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchOverGroupsSlimResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "group_chunks": [GroupScoreSlimChunks.from_dict(_item) for _item in obj["group_chunks"]] if obj.get("group_chunks") is not None else None, + "total_chunk_pages": obj.get("total_chunk_pages") + }) + return _obj + + diff --git a/trieve_py_client/models/search_slim_chunk_query_response_body.py b/trieve_py_client/models/search_slim_chunk_query_response_body.py index 8282955..ae45a98 100644 --- a/trieve_py_client/models/search_slim_chunk_query_response_body.py +++ b/trieve_py_client/models/search_slim_chunk_query_response_body.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/search_within_group_data.py b/trieve_py_client/models/search_within_group_data.py index 1e1f7f3..0ba39d6 100644 --- a/trieve_py_client/models/search_within_group_data.py +++ b/trieve_py_client/models/search_within_group_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/search_within_group_results.py b/trieve_py_client/models/search_within_group_results.py new file mode 100644 index 0000000..4f791ef --- /dev/null +++ b/trieve_py_client/models/search_within_group_results.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Trieve API + + Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. + + The version of the OpenAPI document: 0.6.2 + Contact: developers@trieve.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from trieve_py_client.models.chunk_group import ChunkGroup +from trieve_py_client.models.score_chunk_dto import ScoreChunkDTO +from typing import Optional, Set +from typing_extensions import Self + +class SearchWithinGroupResults(BaseModel): + """ + SearchWithinGroupResults + """ # noqa: E501 + bookmarks: List[ScoreChunkDTO] + group: ChunkGroup + total_pages: StrictInt + __properties: ClassVar[List[str]] = ["bookmarks", "group", "total_pages"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchWithinGroupResults from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in bookmarks (list) + _items = [] + if self.bookmarks: + for _item in self.bookmarks: + if _item: + _items.append(_item.to_dict()) + _dict['bookmarks'] = _items + # override the default output from pydantic by calling `to_dict()` of group + if self.group: + _dict['group'] = self.group.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchWithinGroupResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bookmarks": [ScoreChunkDTO.from_dict(_item) for _item in obj["bookmarks"]] if obj.get("bookmarks") is not None else None, + "group": ChunkGroup.from_dict(obj["group"]) if obj.get("group") is not None else None, + "total_pages": obj.get("total_pages") + }) + return _obj + + diff --git a/trieve_py_client/models/search_within_group_slim_results.py b/trieve_py_client/models/search_within_group_slim_results.py new file mode 100644 index 0000000..38fd87b --- /dev/null +++ b/trieve_py_client/models/search_within_group_slim_results.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Trieve API + + Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. + + The version of the OpenAPI document: 0.6.2 + Contact: developers@trieve.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from trieve_py_client.models.chunk_group import ChunkGroup +from trieve_py_client.models.score_slim_chunks import ScoreSlimChunks +from typing import Optional, Set +from typing_extensions import Self + +class SearchWithinGroupSlimResults(BaseModel): + """ + SearchWithinGroupSlimResults + """ # noqa: E501 + bookmarks: List[ScoreSlimChunks] + group: ChunkGroup + total_pages: StrictInt + __properties: ClassVar[List[str]] = ["bookmarks", "group", "total_pages"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchWithinGroupSlimResults from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in bookmarks (list) + _items = [] + if self.bookmarks: + for _item in self.bookmarks: + if _item: + _items.append(_item.to_dict()) + _dict['bookmarks'] = _items + # override the default output from pydantic by calling `to_dict()` of group + if self.group: + _dict['group'] = self.group.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchWithinGroupSlimResults from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bookmarks": [ScoreSlimChunks.from_dict(_item) for _item in obj["bookmarks"]] if obj.get("bookmarks") is not None else None, + "group": ChunkGroup.from_dict(obj["group"]) if obj.get("group") is not None else None, + "total_pages": obj.get("total_pages") + }) + return _obj + + diff --git a/trieve_py_client/models/set_user_api_key_request.py b/trieve_py_client/models/set_user_api_key_request.py index d1bb01f..6b57200 100644 --- a/trieve_py_client/models/set_user_api_key_request.py +++ b/trieve_py_client/models/set_user_api_key_request.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/set_user_api_key_response.py b/trieve_py_client/models/set_user_api_key_response.py index f064f66..386064a 100644 --- a/trieve_py_client/models/set_user_api_key_response.py +++ b/trieve_py_client/models/set_user_api_key_response.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/single_queued_chunk_response.py b/trieve_py_client/models/single_queued_chunk_response.py index a297b65..d0abd80 100644 --- a/trieve_py_client/models/single_queued_chunk_response.py +++ b/trieve_py_client/models/single_queued_chunk_response.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/slim_chunk_metadata.py b/trieve_py_client/models/slim_chunk_metadata.py index 45bc53d..ed39797 100644 --- a/trieve_py_client/models/slim_chunk_metadata.py +++ b/trieve_py_client/models/slim_chunk_metadata.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/slim_chunk_metadata_with_score.py b/trieve_py_client/models/slim_chunk_metadata_with_score.py new file mode 100644 index 0000000..2cf3686 --- /dev/null +++ b/trieve_py_client/models/slim_chunk_metadata_with_score.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + Trieve API + + Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. + + The version of the OpenAPI document: 0.6.2 + Contact: developers@trieve.ai + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class SlimChunkMetadataWithScore(BaseModel): + """ + SlimChunkMetadataWithScore + """ # noqa: E501 + created_at: datetime + id: StrictStr + link: Optional[StrictStr] = None + metadata: Optional[Any] = None + qdrant_point_id: Optional[StrictStr] = None + score: Union[StrictFloat, StrictInt] + tag_set: Optional[StrictStr] = None + time_stamp: Optional[datetime] = None + tracking_id: Optional[StrictStr] = None + updated_at: datetime + weight: Union[StrictFloat, StrictInt] + __properties: ClassVar[List[str]] = ["created_at", "id", "link", "metadata", "qdrant_point_id", "score", "tag_set", "time_stamp", "tracking_id", "updated_at", "weight"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SlimChunkMetadataWithScore from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if link (nullable) is None + # and model_fields_set contains the field + if self.link is None and "link" in self.model_fields_set: + _dict['link'] = None + + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + # set to None if qdrant_point_id (nullable) is None + # and model_fields_set contains the field + if self.qdrant_point_id is None and "qdrant_point_id" in self.model_fields_set: + _dict['qdrant_point_id'] = None + + # set to None if tag_set (nullable) is None + # and model_fields_set contains the field + if self.tag_set is None and "tag_set" in self.model_fields_set: + _dict['tag_set'] = None + + # set to None if time_stamp (nullable) is None + # and model_fields_set contains the field + if self.time_stamp is None and "time_stamp" in self.model_fields_set: + _dict['time_stamp'] = None + + # set to None if tracking_id (nullable) is None + # and model_fields_set contains the field + if self.tracking_id is None and "tracking_id" in self.model_fields_set: + _dict['tracking_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SlimChunkMetadataWithScore from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "created_at": obj.get("created_at"), + "id": obj.get("id"), + "link": obj.get("link"), + "metadata": obj.get("metadata"), + "qdrant_point_id": obj.get("qdrant_point_id"), + "score": obj.get("score"), + "tag_set": obj.get("tag_set"), + "time_stamp": obj.get("time_stamp"), + "tracking_id": obj.get("tracking_id"), + "updated_at": obj.get("updated_at"), + "weight": obj.get("weight") + }) + return _obj + + diff --git a/trieve_py_client/models/slim_group.py b/trieve_py_client/models/slim_group.py index eeebf42..ec51834 100644 --- a/trieve_py_client/models/slim_group.py +++ b/trieve_py_client/models/slim_group.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/slim_user.py b/trieve_py_client/models/slim_user.py index e45fc89..5d0e749 100644 --- a/trieve_py_client/models/slim_user.py +++ b/trieve_py_client/models/slim_user.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/stripe_plan.py b/trieve_py_client/models/stripe_plan.py index e0bfc7d..a00ccbb 100644 --- a/trieve_py_client/models/stripe_plan.py +++ b/trieve_py_client/models/stripe_plan.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/suggested_queries_request.py b/trieve_py_client/models/suggested_queries_request.py index 0a322fb..e56ea7f 100644 --- a/trieve_py_client/models/suggested_queries_request.py +++ b/trieve_py_client/models/suggested_queries_request.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/suggested_queries_response.py b/trieve_py_client/models/suggested_queries_response.py index 6fbb6c1..a676626 100644 --- a/trieve_py_client/models/suggested_queries_response.py +++ b/trieve_py_client/models/suggested_queries_response.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/topic.py b/trieve_py_client/models/topic.py index 2fcf72e..ce38d8b 100644 --- a/trieve_py_client/models/topic.py +++ b/trieve_py_client/models/topic.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/update_chunk_by_tracking_id_data.py b/trieve_py_client/models/update_chunk_by_tracking_id_data.py index 5fed467..45160ea 100644 --- a/trieve_py_client/models/update_chunk_by_tracking_id_data.py +++ b/trieve_py_client/models/update_chunk_by_tracking_id_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/update_chunk_data.py b/trieve_py_client/models/update_chunk_data.py index 1a5509b..9f9b53d 100644 --- a/trieve_py_client/models/update_chunk_data.py +++ b/trieve_py_client/models/update_chunk_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/update_chunk_group_data.py b/trieve_py_client/models/update_chunk_group_data.py index 7f66564..0b5133f 100644 --- a/trieve_py_client/models/update_chunk_group_data.py +++ b/trieve_py_client/models/update_chunk_group_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/update_dataset_request.py b/trieve_py_client/models/update_dataset_request.py index 0d4d8cb..7c64950 100644 --- a/trieve_py_client/models/update_dataset_request.py +++ b/trieve_py_client/models/update_dataset_request.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/update_group_by_tracking_id_data.py b/trieve_py_client/models/update_group_by_tracking_id_data.py index 9b21618..72ba75a 100644 --- a/trieve_py_client/models/update_group_by_tracking_id_data.py +++ b/trieve_py_client/models/update_group_by_tracking_id_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/update_organization_data.py b/trieve_py_client/models/update_organization_data.py index da832c7..dde4a51 100644 --- a/trieve_py_client/models/update_organization_data.py +++ b/trieve_py_client/models/update_organization_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/update_topic_data.py b/trieve_py_client/models/update_topic_data.py index 07f1d90..141ee6d 100644 --- a/trieve_py_client/models/update_topic_data.py +++ b/trieve_py_client/models/update_topic_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/update_user_data.py b/trieve_py_client/models/update_user_data.py index d23fd97..9c7341f 100644 --- a/trieve_py_client/models/update_user_data.py +++ b/trieve_py_client/models/update_user_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/upload_file_data.py b/trieve_py_client/models/upload_file_data.py index 10edee3..5d46aab 100644 --- a/trieve_py_client/models/upload_file_data.py +++ b/trieve_py_client/models/upload_file_data.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/upload_file_result.py b/trieve_py_client/models/upload_file_result.py index 4620e70..cc593ff 100644 --- a/trieve_py_client/models/upload_file_result.py +++ b/trieve_py_client/models/upload_file_result.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/models/user_organization.py b/trieve_py_client/models/user_organization.py index cc40c70..8f74c31 100644 --- a/trieve_py_client/models/user_organization.py +++ b/trieve_py_client/models/user_organization.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/trieve_py_client/rest.py b/trieve_py_client/rest.py index af49967..25a2f82 100644 --- a/trieve_py_client/rest.py +++ b/trieve_py_client/rest.py @@ -5,7 +5,7 @@ Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API. - The version of the OpenAPI document: 0.6.0 + The version of the OpenAPI document: 0.6.2 Contact: developers@trieve.ai Generated by OpenAPI Generator (https://openapi-generator.tech)