Skip to content

Commit

Permalink
feature: upgrade to version 0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
skeptrunedev committed Apr 9, 2024
1 parent 02fe433 commit 7e0ec45
Show file tree
Hide file tree
Showing 128 changed files with 815 additions and 549 deletions.
105 changes: 3 additions & 102 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ docs/OrganizationApi.md
docs/OrganizationUsageCount.md
docs/Range.md
docs/RangeCondition.md
docs/ReccomendGroupChunksRequest.md
docs/RecommendChunksRequest.md
docs/RecommendChunksResponseTypes.md
docs/RecommendGroupChunkResponseTypes.md
docs/RecommendGroupChunksRequest.md
docs/RegenerateMessageData.md
docs/ReturnQueuedChunk.md
docs/ScoreChunkDTO.md
Expand Down Expand Up @@ -110,106 +110,7 @@ setup.cfg
setup.py
test-requirements.txt
test/__init__.py
test/test_add_chunk_to_group_data.py
test/test_api_key_dto.py
test/test_auth_api.py
test/test_auth_query.py
test/test_batch_queued_chunk_response.py
test/test_bookmark_data.py
test/test_bookmark_group_result.py
test/test_chat_message_proxy.py
test/test_chunk_api.py
test/test_chunk_data.py
test/test_chunk_filter.py
test/test_chunk_group.py
test/test_chunk_group_and_file.py
test/test_chunk_group_api.py
test/test_chunk_metadata.py
test/test_chunk_metadata_with_file_data.py
test/test_client_dataset_configuration.py
test/test_create_chunk_data.py
test/test_create_chunk_group_data.py
test/test_create_dataset_request.py
test/test_create_message_data.py
test/test_create_organization_data.py
test/test_create_topic_data.py
test/test_dataset.py
test/test_dataset_and_usage.py
test/test_dataset_api.py
test/test_dataset_dto.py
test/test_dataset_usage_count.py
test/test_delete_topic_data.py
test/test_delete_user_api_key_request.py
test/test_edit_message_data.py
test/test_error_response_body.py
test/test_event.py
test/test_event_return.py
test/test_events_api.py
test/test_field_condition.py
test/test_file.py
test/test_file_api.py
test/test_file_dto.py
test/test_generate_chunks_request.py
test/test_get_events_data.py
test/test_get_groups_for_chunks_data.py
test/test_group_data.py
test/test_group_score_chunk_dto.py
test/test_group_slim_chunks_dto.py
test/test_health_api.py
test/test_invitation_api.py
test/test_invitation_data.py
test/test_match_condition.py
test/test_message.py
test/test_message_api.py
test/test_organization.py
test/test_organization_api.py
test/test_organization_usage_count.py
test/test_range.py
test/test_range_condition.py
test/test_reccomend_group_chunks_request.py
test/test_recommend_chunks_request.py
test/test_recommend_chunks_response_types.py
test/test_recommend_group_chunk_response_types.py
test/test_regenerate_message_data.py
test/test_return_queued_chunk.py
test/test_score_chunk_dto.py
test/test_score_slim_chunks.py
test/test_search_chunk_data.py
test/test_search_chunk_query_response_body.py
test/test_search_chunk_response_types.py
test/test_search_group_slim_chunks_result.py
test/test_search_groups_result.py
test/test_search_over_groups_data.py
test/test_search_over_groups_response_body.py
test/test_search_over_groups_response_types.py
test/test_search_over_groups_slim_chunks_response_body.py
test/test_search_slim_chunk_query_response_body.py
test/test_search_within_group_data.py
test/test_search_within_group_response_types.py
test/test_set_user_api_key_request.py
test/test_set_user_api_key_response.py
test/test_single_queued_chunk_response.py
test/test_slim_chunk_metadata.py
test/test_slim_group.py
test/test_slim_user.py
test/test_stripe_api.py
test/test_stripe_plan.py
test/test_suggested_queries_request.py
test/test_suggested_queries_response.py
test/test_topic.py
test/test_topic_api.py
test/test_update_chunk_by_tracking_id_data.py
test/test_update_chunk_data.py
test/test_update_chunk_group_data.py
test/test_update_dataset_request.py
test/test_update_group_by_tracking_id_data.py
test/test_update_organization_data.py
test/test_update_topic_data.py
test/test_update_user_data.py
test/test_upload_file_data.py
test/test_upload_file_result.py
test/test_user_api.py
test/test_user_organization.py
test/test_recommend_group_chunks_request.py
tox.ini
trieve_py_client/__init__.py
trieve_py_client/api/__init__.py
Expand Down Expand Up @@ -277,10 +178,10 @@ trieve_py_client/models/organization.py
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/reccomend_group_chunks_request.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
trieve_py_client/models/score_chunk_dto.py
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.5.7
- Package version: 0.5.7
- API version: 0.6.0
- Package version: 0.6.0
- Generator version: 7.4.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://trieve.ai](https://trieve.ai)
Expand Down Expand Up @@ -201,10 +201,10 @@ Class | Method | HTTP request | Description
- [OrganizationUsageCount](docs/OrganizationUsageCount.md)
- [Range](docs/Range.md)
- [RangeCondition](docs/RangeCondition.md)
- [ReccomendGroupChunksRequest](docs/ReccomendGroupChunksRequest.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)
- [ScoreChunkDTO](docs/ScoreChunkDTO.md)
Expand Down
3 changes: 2 additions & 1 deletion docs/AddChunkToGroupData.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**chunk_id** | **str** | Id of the chunk to make a member of the group. |
**chunk_id** | **str** | Id of the chunk to make a member of the group. | [optional]
**tracking_id** | **str** | Tracking Id of the chunk to make a member of the group. | [optional]

## Example

Expand Down
13 changes: 8 additions & 5 deletions docs/AuthApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ This endpoint does not need any parameter.
[[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)

# **login**
> login(content)
> login(organization_id=organization_id, redirect_uri=redirect_uri, inv_code=inv_code)
Login

Expand All @@ -163,7 +163,6 @@ Login This will redirect you to the OAuth provider for authentication with emai

```python
import trieve_py_client
from trieve_py_client.models.auth_query import AuthQuery
from trieve_py_client.rest import ApiException
from pprint import pprint

Expand All @@ -178,11 +177,13 @@ configuration = trieve_py_client.Configuration(
with trieve_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = trieve_py_client.AuthApi(api_client)
content = trieve_py_client.AuthQuery() # AuthQuery | Query parameters for login to be included as kv pairs after ? on the request URL.
organization_id = 'organization_id_example' # str | ID of organization to authenticate into (optional)
redirect_uri = 'redirect_uri_example' # str | URL to redirect to after successful login (optional)
inv_code = 'inv_code_example' # str | Code sent via email as a result of successful call to send_invitation (optional)

try:
# Login
api_instance.login(content)
api_instance.login(organization_id=organization_id, redirect_uri=redirect_uri, inv_code=inv_code)
except Exception as e:
print("Exception when calling AuthApi->login: %s\n" % e)
```
Expand All @@ -194,7 +195,9 @@ with trieve_py_client.ApiClient(configuration) as api_client:

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**content** | [**AuthQuery**](.md)| Query parameters for login to be included as kv pairs after ? on the request URL. |
**organization_id** | **str**| ID of organization to authenticate into | [optional]
**redirect_uri** | **str**| URL to redirect to after successful login | [optional]
**inv_code** | **str**| Code sent via email as a result of successful call to send_invitation | [optional]

### Return type

Expand Down
2 changes: 2 additions & 0 deletions docs/ChunkGroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ Name | Type | Description | Notes
**dataset_id** | **str** | |
**description** | **str** | |
**id** | **str** | |
**metadata** | **object** | | [optional]
**name** | **str** | |
**tag_set** | **str** | | [optional]
**tracking_id** | **str** | | [optional]
**updated_at** | **datetime** | |

Expand Down
20 changes: 10 additions & 10 deletions docs/ChunkGroupApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Name | Type | Description | Notes
Delete Group

Delete Group This will delete a chunk_group. This will not delete the chunks that are in the group. We will soon support deleting a chunk_group along with its member chunks.
Delete Group This will delete a chunk_group. If you set delete_chunks to true, it will also delete the chunks within the group.

### Example

Expand Down Expand Up @@ -517,7 +517,7 @@ Name | Type | Description | Notes
Get Chunks in Group

Get Chunks in Group Route to get all chunks for a group. The response is paginated, with each page containing 10 chunks. Support for custom page size is coming soon.
Get Chunks in Group Route to get all chunks for a group. The response is paginated, with each page containing 10 chunks. Page is 1-indexed.

### Example

Expand Down Expand Up @@ -601,7 +601,7 @@ Name | Type | Description | Notes
Get Chunks in Group by Tracking ID

Get Chunks in Group by Tracking ID Route to get all chunks for a group. The response is paginated, with each page containing 10 chunks. Support for custom page size is coming soon.
Get Chunks in Group by Tracking ID Route to get all chunks for a group. The response is paginated, with each page containing 10 chunks. Support for custom page size is coming soon. Page is 1-indexed.

### Example

Expand Down Expand Up @@ -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, reccomend_group_chunks_request)
> RecommendGroupChunkResponseTypes get_recommended_groups(tr_dataset, recommend_group_chunks_request)
Get Recommended Groups

Expand All @@ -858,8 +858,8 @@ Get Recommended Groups Route to get recommended groups. This route will return

```python
import trieve_py_client
from trieve_py_client.models.reccomend_group_chunks_request import ReccomendGroupChunksRequest
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.rest import ApiException
from pprint import pprint

Expand All @@ -885,11 +885,11 @@ with trieve_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = trieve_py_client.ChunkGroupApi(api_client)
tr_dataset = 'tr_dataset_example' # str | The dataset id to use for the request
reccomend_group_chunks_request = trieve_py_client.ReccomendGroupChunksRequest() # ReccomendGroupChunksRequest | JSON request payload to get recommendations of chunks similar to the chunks in the request
recommend_group_chunks_request = trieve_py_client.RecommendGroupChunksRequest() # RecommendGroupChunksRequest | JSON request payload to get recommendations of chunks similar to the chunks in the request

try:
# Get Recommended Groups
api_response = api_instance.get_recommended_groups(tr_dataset, reccomend_group_chunks_request)
api_response = api_instance.get_recommended_groups(tr_dataset, recommend_group_chunks_request)
print("The response of ChunkGroupApi->get_recommended_groups:\n")
pprint(api_response)
except Exception as e:
Expand All @@ -904,7 +904,7 @@ with trieve_py_client.ApiClient(configuration) as api_client:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tr_dataset** | **str**| The dataset id to use for the request |
**reccomend_group_chunks_request** | [**ReccomendGroupChunksRequest**](ReccomendGroupChunksRequest.md)| JSON request payload to get recommendations of chunks similar to the chunks in the request |
**recommend_group_chunks_request** | [**RecommendGroupChunksRequest**](RecommendGroupChunksRequest.md)| JSON request payload to get recommendations of chunks similar to the chunks in the request |

### Return type

Expand Down Expand Up @@ -968,7 +968,7 @@ with trieve_py_client.ApiClient(configuration) as api_client:
api_instance = trieve_py_client.ChunkGroupApi(api_client)
tr_dataset = 'tr_dataset_example' # str | The dataset id to use for the request
dataset_id = 'dataset_id_example' # str | The id of the dataset to fetch groups for.
page = 56 # int | The page of groups to fetch. Each page contains 10 groups. Support for custom page size is coming soon.
page = 56 # int | The page of groups to fetch. Page is 1-indexed.

try:
# Get Groups for Dataset
Expand All @@ -988,7 +988,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tr_dataset** | **str**| The dataset id to use for the request |
**dataset_id** | **str**| The id of the dataset to fetch groups for. |
**page** | **int**| The page of groups to fetch. Each page contains 10 groups. Support for custom page size is coming soon. |
**page** | **int**| The page of groups to fetch. Page is 1-indexed. |

### Return type

Expand Down
2 changes: 2 additions & 0 deletions docs/CreateChunkGroupData.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
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. |
**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]
**tracking_id** | **str** | Optional tracking id to assign to the chunk_group. This is a unique identifier for the chunk_group. | [optional]

## Example
Expand Down
8 changes: 4 additions & 4 deletions docs/DatasetApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,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)

# **delete_dataset**
> delete_dataset(tr_organization, dataset_id)
> delete_dataset(tr_dataset, dataset_id)
Delete Dataset

Expand Down Expand Up @@ -132,12 +132,12 @@ configuration.api_key['ApiKey'] = os.environ["API_KEY"]
with trieve_py_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = trieve_py_client.DatasetApi(api_client)
tr_organization = 'tr_organization_example' # str | The organization id to use for the request
tr_dataset = 'tr_dataset_example' # str | The dataset id to use for the request
dataset_id = 'dataset_id_example' # str | The id of the dataset you want to delete.

try:
# Delete Dataset
api_instance.delete_dataset(tr_organization, dataset_id)
api_instance.delete_dataset(tr_dataset, dataset_id)
except Exception as e:
print("Exception when calling DatasetApi->delete_dataset: %s\n" % e)
```
Expand All @@ -149,7 +149,7 @@ with trieve_py_client.ApiClient(configuration) as api_client:

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tr_organization** | **str**| The organization id to use for the request |
**tr_dataset** | **str**| The dataset id to use for the request |
**dataset_id** | **str**| The id of the dataset you want to delete. |

### Return type
Expand Down
2 changes: 1 addition & 1 deletion docs/EventsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Method | HTTP request | Description
Get events for the dataset

Get events for the dataset Get events for the auth'ed user. Currently, this is only for events belonging to the auth'ed user. Soon, we plan to associate events to datasets instead of users.
Get events for the dataset Get events for the dataset specified by the TR-Dataset header.

### Example

Expand Down
4 changes: 2 additions & 2 deletions docs/FileApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Method | HTTP request | Description
Delete File

Delete File Delete a file from S3 attached to the server based on its id. This will disassociate chunks from the file, but will not delete the chunks. We plan to add support for deleting chunks in a release soon. Auth'ed user must be an admin or owner of the dataset's organization to upload a file.
Delete File Delete a file from S3 attached to the server based on its id. This will disassociate chunks from the file, but only delete them all together if you specify delete_chunks to be true. Auth'ed user must be an admin or owner of the dataset's organization to delete a file.

### Example

Expand Down Expand Up @@ -180,7 +180,7 @@ Name | Type | Description | Notes
Get File

Get File Download a file from S3 attached to the server based on its id. We plan to add support for getting signed S3 URLs to download from S3 directly in a release soon.
Get File Download a file based on its id.

### Example

Expand Down
1 change: 1 addition & 0 deletions docs/RecommendChunksRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Name | Type | Description | Notes
**positive_chunk_ids** | **List[str]** | The ids of the chunks to be used as positive examples for the recommendation. The chunks in this array will be used to find similar chunks. | [optional]
**positive_tracking_ids** | **List[str]** | The tracking_ids of the chunks to be used as positive examples for the recommendation. The chunks in this array will be used to find similar chunks. | [optional]
**slim_chunks** | **bool** | Set slim_chunks to true to avoid returning the content and chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement. Default is false. | [optional]
**strategy** | **str** | Strategy to use for recommendations, either \"average_vector\" or \"best_score\". The default is \"average_vector\". The \"average_vector\" strategy will construct a single average vector from the positive and negative samples then use it to perform a pseudo-search. The \"best_score\" strategy is more advanced and navigates the HNSW with a heuristic of picking edges where the point is closer to the positive samples than it is the negatives. | [optional]

## Example

Expand Down
Loading

0 comments on commit 7e0ec45

Please sign in to comment.