trieve_ruby_client 0.5.7 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +16 -20
- data/docs/AddChunkToGroupData.md +4 -2
- data/docs/AuthApi.md +12 -6
- data/docs/BookmarkData.md +1 -1
- data/docs/ChunkApi.md +8 -8
- data/docs/ChunkGroup.md +4 -0
- data/docs/ChunkGroupApi.md +25 -25
- data/docs/ChunkMetadataWithScore.md +44 -0
- data/docs/CreateChunkGroupData.md +5 -1
- data/docs/DatasetApi.md +6 -6
- data/docs/EventsApi.md +1 -1
- data/docs/FileApi.md +2 -2
- data/docs/GetEventsData.md +1 -1
- data/docs/GroupScoreChunk.md +22 -0
- data/docs/GroupScoreSlimChunks.md +20 -0
- data/docs/RecommendChunksRequest.md +3 -1
- data/docs/RecommendGroupChunksRequest.md +34 -0
- data/docs/ScoreChunkDTO.md +1 -1
- data/docs/SearchChunkData.md +1 -3
- data/docs/SearchOverGroupsData.md +3 -5
- data/docs/SearchOverGroupsResults.md +20 -0
- data/docs/SearchOverGroupsSlimResults.md +20 -0
- data/docs/SearchWithinGroupData.md +1 -3
- data/docs/SearchWithinGroupResults.md +22 -0
- data/docs/SearchWithinGroupSlimResults.md +22 -0
- data/docs/SlimChunkMetadataWithScore.md +38 -0
- data/docs/UpdateChunkGroupData.md +4 -0
- data/docs/UpdateGroupByTrackingIDData.md +4 -0
- data/docs/UserApi.md +2 -2
- data/lib/trieve_ruby_client/api/auth_api.rb +13 -11
- data/lib/trieve_ruby_client/api/chunk_api.rb +7 -7
- data/lib/trieve_ruby_client/api/chunk_group_api.rb +27 -27
- data/lib/trieve_ruby_client/api/dataset_api.rb +10 -10
- data/lib/trieve_ruby_client/api/events_api.rb +3 -3
- data/lib/trieve_ruby_client/api/file_api.rb +5 -5
- data/lib/trieve_ruby_client/api/health_api.rb +1 -1
- data/lib/trieve_ruby_client/api/invitation_api.rb +1 -1
- data/lib/trieve_ruby_client/api/message_api.rb +1 -1
- data/lib/trieve_ruby_client/api/organization_api.rb +1 -1
- data/lib/trieve_ruby_client/api/stripe_api.rb +1 -1
- data/lib/trieve_ruby_client/api/topic_api.rb +1 -1
- data/lib/trieve_ruby_client/api/user_api.rb +3 -3
- data/lib/trieve_ruby_client/api_client.rb +1 -1
- data/lib/trieve_ruby_client/api_error.rb +1 -1
- data/lib/trieve_ruby_client/configuration.rb +1 -1
- data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +17 -12
- data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/auth_query.rb +1 -1
- data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +1 -1
- data/lib/trieve_ruby_client/models/bookmark_data.rb +2 -2
- data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
- data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_data.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_filter.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_group.rb +22 -2
- data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_metadata.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_metadata_with_file_data.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_metadata_with_score.rb +387 -0
- data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +1 -1
- data/lib/trieve_ruby_client/models/create_chunk_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +27 -9
- data/lib/trieve_ruby_client/models/create_dataset_request.rb +1 -1
- data/lib/trieve_ruby_client/models/create_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
- data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
- data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/event.rb +1 -1
- data/lib/trieve_ruby_client/models/event_return.rb +1 -1
- data/lib/trieve_ruby_client/models/field_condition.rb +1 -1
- data/lib/trieve_ruby_client/models/file.rb +1 -1
- data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/generate_chunks_request.rb +1 -1
- data/lib/trieve_ruby_client/models/get_events_data.rb +2 -2
- data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
- data/lib/trieve_ruby_client/models/group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/group_score_chunk.rb +249 -0
- data/lib/trieve_ruby_client/models/group_score_chunk_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/group_score_slim_chunks.rb +239 -0
- data/lib/trieve_ruby_client/models/group_slim_chunks_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
- data/lib/trieve_ruby_client/models/match_condition.rb +1 -1
- data/lib/trieve_ruby_client/models/message.rb +1 -1
- data/lib/trieve_ruby_client/models/organization.rb +1 -1
- data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
- data/lib/trieve_ruby_client/models/range.rb +1 -1
- data/lib/trieve_ruby_client/models/range_condition.rb +1 -1
- data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +17 -6
- data/lib/trieve_ruby_client/models/recommend_chunks_response_types.rb +1 -1
- data/lib/trieve_ruby_client/models/recommend_group_chunk_response_types.rb +1 -1
- data/lib/trieve_ruby_client/models/recommend_group_chunks_request.rb +341 -0
- data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/return_queued_chunk.rb +1 -1
- data/lib/trieve_ruby_client/models/score_chunk_dto.rb +2 -2
- data/lib/trieve_ruby_client/models/score_slim_chunks.rb +1 -1
- data/lib/trieve_ruby_client/models/search_chunk_data.rb +3 -14
- data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_chunk_response_types.rb +1 -1
- data/lib/trieve_ruby_client/models/search_group_slim_chunks_result.rb +1 -1
- data/lib/trieve_ruby_client/models/search_groups_result.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_data.rb +5 -15
- data/lib/trieve_ruby_client/models/search_over_groups_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_response_types.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_results.rb +239 -0
- data/lib/trieve_ruby_client/models/search_over_groups_slim_chunks_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_slim_results.rb +239 -0
- data/lib/trieve_ruby_client/models/search_slim_chunk_query_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_within_group_data.rb +3 -14
- data/lib/trieve_ruby_client/models/search_within_group_response_types.rb +1 -1
- data/lib/trieve_ruby_client/models/search_within_group_results.rb +255 -0
- data/lib/trieve_ruby_client/models/search_within_group_slim_results.rb +255 -0
- data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +1 -1
- data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
- data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_chunk_metadata.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_score.rb +345 -0
- data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
- data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
- data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
- data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
- data/lib/trieve_ruby_client/models/topic.rb +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +26 -2
- data/lib/trieve_ruby_client/models/update_dataset_request.rb +1 -1
- data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +26 -2
- data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_user_data.rb +1 -1
- data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
- data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
- data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
- data/lib/trieve_ruby_client/version.rb +2 -2
- data/lib/trieve_ruby_client.rb +10 -14
- data/openapi-generator.yaml +1 -1
- data/openapi.json +386 -325
- data/spec/models/chunk_metadata_with_score_spec.rb +114 -0
- data/spec/models/group_score_chunk_spec.rb +48 -0
- data/spec/models/group_score_slim_chunks_spec.rb +42 -0
- data/spec/models/recommend_group_chunks_request_spec.rb +84 -0
- data/spec/models/search_over_groups_results_spec.rb +42 -0
- data/spec/models/search_over_groups_slim_results_spec.rb +42 -0
- data/spec/models/search_within_group_results_spec.rb +48 -0
- data/spec/models/search_within_group_slim_results_spec.rb +48 -0
- data/spec/models/slim_chunk_metadata_with_score_spec.rb +96 -0
- data/spec/spec_helper.rb +1 -1
- data/trieve_ruby_client-0.5.7.gem +0 -0
- data/trieve_ruby_client-0.6.0.gem +0 -0
- data/trieve_ruby_client.gemspec +1 -1
- metadata +40 -2
@@ -0,0 +1,22 @@
|
|
1
|
+
# TrieveRubyClient::GroupScoreChunk
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **group_id** | **String** | | |
|
8
|
+
| **group_tracking_id** | **String** | | [optional] |
|
9
|
+
| **metadata** | [**Array<ScoreChunkDTO>**](ScoreChunkDTO.md) | | |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'trieve_ruby_client'
|
15
|
+
|
16
|
+
instance = TrieveRubyClient::GroupScoreChunk.new(
|
17
|
+
group_id: null,
|
18
|
+
group_tracking_id: null,
|
19
|
+
metadata: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TrieveRubyClient::GroupScoreSlimChunks
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **group_id** | **String** | | |
|
8
|
+
| **metadata** | [**Array<ScoreSlimChunks>**](ScoreSlimChunks.md) | | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'trieve_ruby_client'
|
14
|
+
|
15
|
+
instance = TrieveRubyClient::GroupScoreSlimChunks.new(
|
16
|
+
group_id: null,
|
17
|
+
metadata: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -11,6 +11,7 @@
|
|
11
11
|
| **positive_chunk_ids** | **Array<String>** | 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] |
|
12
12
|
| **positive_tracking_ids** | **Array<String>** | 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] |
|
13
13
|
| **slim_chunks** | **Boolean** | 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] |
|
14
|
+
| **strategy** | **String** | 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] |
|
14
15
|
|
15
16
|
## Example
|
16
17
|
|
@@ -24,7 +25,8 @@ instance = TrieveRubyClient::RecommendChunksRequest.new(
|
|
24
25
|
negative_tracking_ids: null,
|
25
26
|
positive_chunk_ids: null,
|
26
27
|
positive_tracking_ids: null,
|
27
|
-
slim_chunks: null
|
28
|
+
slim_chunks: null,
|
29
|
+
strategy: null
|
28
30
|
)
|
29
31
|
```
|
30
32
|
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# TrieveRubyClient::RecommendGroupChunksRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **filters** | [**ChunkFilter**](ChunkFilter.md) | | [optional] |
|
8
|
+
| **group_size** | **Integer** | The number of chunks to fetch for each group. This is the number of chunks which will be returned in the response for each group. The default is 3. If this is set to a large number, we recommend setting slim_chunks to true to avoid returning the content and chunk_html of the chunks so as to reduce latency due to content download and serialization. | [optional] |
|
9
|
+
| **limit** | **Integer** | The number of groups to return. This is the number of groups which will be returned in the response. The default is 10. | [optional] |
|
10
|
+
| **negative_group_ids** | **Array<String>** | The ids of the groups to be used as negative examples for the recommendation. The groups in this array will be used to filter out similar groups. | [optional] |
|
11
|
+
| **negative_group_tracking_ids** | **Array<String>** | The ids of the groups to be used as negative examples for the recommendation. The groups in this array will be used to filter out similar groups. | [optional] |
|
12
|
+
| **positive_group_ids** | **Array<String>** | The ids of the groups to be used as positive examples for the recommendation. The groups in this array will be used to find similar groups. | [optional] |
|
13
|
+
| **positive_group_tracking_ids** | **Array<String>** | The ids of the groups to be used as positive examples for the recommendation. The groups in this array will be used to find similar groups. | [optional] |
|
14
|
+
| **slim_chunks** | **Boolean** | 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] |
|
15
|
+
| **strategy** | **String** | 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] |
|
16
|
+
|
17
|
+
## Example
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
require 'trieve_ruby_client'
|
21
|
+
|
22
|
+
instance = TrieveRubyClient::RecommendGroupChunksRequest.new(
|
23
|
+
filters: null,
|
24
|
+
group_size: null,
|
25
|
+
limit: null,
|
26
|
+
negative_group_ids: null,
|
27
|
+
negative_group_tracking_ids: null,
|
28
|
+
positive_group_ids: null,
|
29
|
+
positive_group_tracking_ids: null,
|
30
|
+
slim_chunks: null,
|
31
|
+
strategy: null
|
32
|
+
)
|
33
|
+
```
|
34
|
+
|
data/docs/ScoreChunkDTO.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **metadata** | [**Array<
|
7
|
+
| **metadata** | [**Array<ChunkMetadata>**](ChunkMetadata.md) | | |
|
8
8
|
| **score** | **Float** | | |
|
9
9
|
|
10
10
|
## Example
|
data/docs/SearchChunkData.md
CHANGED
@@ -9,10 +9,9 @@
|
|
9
9
|
| **get_collisions** | **Boolean** | Set get_collisions to true to get the collisions for each chunk. This will only apply if environment variable COLLISIONS_ENABLED is set to true. | [optional] |
|
10
10
|
| **highlight_delimiters** | **Array<String>** | Set highlight_delimiters to a list of strings to use as delimiters for highlighting. If not specified, this defaults to [\"?\", \",\", \".\", \"!\"]. | [optional] |
|
11
11
|
| **highlight_results** | **Boolean** | Set highlight_results to true to highlight the results. If not specified, this defaults to true. | [optional] |
|
12
|
-
| **page** | **Integer** | Page of chunks to fetch.
|
12
|
+
| **page** | **Integer** | Page of chunks to fetch. Page is 1-indexed. | [optional] |
|
13
13
|
| **page_size** | **Integer** | Page size is the number of chunks to fetch. This can be used to fetch more than 10 chunks at a time. | [optional] |
|
14
14
|
| **query** | **String** | Query is the search query. This can be any string. The query will be used to create an embedding vector and/or SPLADE vector which will be used to find the result set. | |
|
15
|
-
| **quote_negated_words** | **Boolean** | Turn on quote words and negated words to search for exact phrases and exclude words from the search results. Default is false. | [optional] |
|
16
15
|
| **score_threshold** | **Float** | Set score_threshold to a float to filter out chunks with a score below the threshold. | [optional] |
|
17
16
|
| **search_type** | **String** | Can be either \"semantic\", \"fulltext\", or \"hybrid\". \"hybrid\" will pull in one page (10 chunks) of both semantic and full-text results then re-rank them using BAAI/bge-reranker-large. \"semantic\" will pull in one page (10 chunks) of the nearest cosine distant vectors. \"fulltext\" will pull in one page (10 chunks) of full-text results based on SPLADE. | |
|
18
17
|
| **slim_chunks** | **Boolean** | 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] |
|
@@ -32,7 +31,6 @@ instance = TrieveRubyClient::SearchChunkData.new(
|
|
32
31
|
page: null,
|
33
32
|
page_size: null,
|
34
33
|
query: null,
|
35
|
-
quote_negated_words: null,
|
36
34
|
score_threshold: null,
|
37
35
|
search_type: null,
|
38
36
|
slim_chunks: null,
|
@@ -6,13 +6,12 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **filters** | [**ChunkFilter**](ChunkFilter.md) | | [optional] |
|
8
8
|
| **get_collisions** | **Boolean** | Set get_collisions to true to get the collisions for each chunk. This will only apply if environment variable COLLISIONS_ENABLED is set to true. | [optional] |
|
9
|
-
| **group_size** | **Integer** |
|
9
|
+
| **group_size** | **Integer** | Group_size is the number of chunks to fetch for each group. The default is 3. If a group has less than group_size chunks, all chunks will be returned. If this is set to a large number, we recommend setting slim_chunks to true to avoid returning the content and chunk_html of the chunks so as to lower the amount of time required for content download and serialization. | [optional] |
|
10
10
|
| **highlight_delimiters** | **Array<String>** | Set highlight_delimiters to a list of strings to use as delimiters for highlighting. If not specified, this defaults to [\"?\", \",\", \".\", \"!\"]. | [optional] |
|
11
11
|
| **highlight_results** | **Boolean** | Set highlight_results to true to highlight the results. If not specified, this defaults to true. | [optional] |
|
12
|
-
| **page** | **Integer** | Page of
|
13
|
-
| **page_size** | **Integer** | Page size is the number of
|
12
|
+
| **page** | **Integer** | Page of group results to fetch. Page is 1-indexed. | [optional] |
|
13
|
+
| **page_size** | **Integer** | Page size is the number of group results to fetch. The default is 10. | [optional] |
|
14
14
|
| **query** | **String** | Query is the search query. This can be any string. The query will be used to create an embedding vector and/or SPLADE vector which will be used to find the result set. | |
|
15
|
-
| **quote_negated_words** | **Boolean** | Turn on quote words and negated words to search for exact phrases and exclude words from the search results. Default is false. | [optional] |
|
16
15
|
| **score_threshold** | **Float** | Set score_threshold to a float to filter out chunks with a score below the threshold. | [optional] |
|
17
16
|
| **search_type** | **String** | Can be either \"semantic\", \"fulltext\", or \"hybrid\". \"hybrid\" will pull in one page (10 chunks) of both semantic and full-text results then re-rank them using BAAI/bge-reranker-large. \"semantic\" will pull in one page (10 chunks) of the nearest cosine distant vectors. \"fulltext\" will pull in one page (10 chunks) of full-text results based on SPLADE. | |
|
18
17
|
| **slim_chunks** | **Boolean** | 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] |
|
@@ -31,7 +30,6 @@ instance = TrieveRubyClient::SearchOverGroupsData.new(
|
|
31
30
|
page: null,
|
32
31
|
page_size: null,
|
33
32
|
query: null,
|
34
|
-
quote_negated_words: null,
|
35
33
|
score_threshold: null,
|
36
34
|
search_type: null,
|
37
35
|
slim_chunks: null
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TrieveRubyClient::SearchOverGroupsResults
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **group_chunks** | [**Array<GroupScoreChunk>**](GroupScoreChunk.md) | | |
|
8
|
+
| **total_chunk_pages** | **Integer** | | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'trieve_ruby_client'
|
14
|
+
|
15
|
+
instance = TrieveRubyClient::SearchOverGroupsResults.new(
|
16
|
+
group_chunks: null,
|
17
|
+
total_chunk_pages: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TrieveRubyClient::SearchOverGroupsSlimResults
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **group_chunks** | [**Array<GroupScoreSlimChunks>**](GroupScoreSlimChunks.md) | | |
|
8
|
+
| **total_chunk_pages** | **Integer** | | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'trieve_ruby_client'
|
14
|
+
|
15
|
+
instance = TrieveRubyClient::SearchOverGroupsSlimResults.new(
|
16
|
+
group_chunks: null,
|
17
|
+
total_chunk_pages: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -10,10 +10,9 @@
|
|
10
10
|
| **group_tracking_id** | **String** | Group_tracking_id specifies the group to search within by tracking id. Results will only consist of chunks which are bookmarks within the specified group. If both group_id and group_tracking_id are provided, group_id will be used. | [optional] |
|
11
11
|
| **highlight_delimiters** | **Array<String>** | Set highlight_delimiters to a list of strings to use as delimiters for highlighting. If not specified, this defaults to [\"?\", \",\", \".\", \"!\"]. | [optional] |
|
12
12
|
| **highlight_results** | **Boolean** | Set highlight_results to true to highlight the results. If not specified, this defaults to true. | [optional] |
|
13
|
-
| **page** | **Integer** | The page of chunks to fetch.
|
13
|
+
| **page** | **Integer** | The page of chunks to fetch. Page is 1-indexed. | [optional] |
|
14
14
|
| **page_size** | **Integer** | The page size is the number of chunks to fetch. This can be used to fetch more than 10 chunks at a time. | [optional] |
|
15
15
|
| **query** | **String** | The query is the search query. This can be any string. The query will be used to create an embedding vector and/or SPLADE vector which will be used to find the result set. | |
|
16
|
-
| **quote_negated_words** | **Boolean** | Turn on quote words and negated words to search for exact phrases and exclude words from the search results. Default is false. | [optional] |
|
17
16
|
| **score_threshold** | **Float** | Set score_threshold to a float to filter out chunks with a score below the threshold. | [optional] |
|
18
17
|
| **search_type** | **String** | Search_type can be either \"semantic\", \"fulltext\", or \"hybrid\". \"hybrid\" will pull in one page (10 chunks) of both semantic and full-text results then re-rank them using BAAI/bge-reranker-large. \"semantic\" will pull in one page (10 chunks) of the nearest cosine distant vectors. \"fulltext\" will pull in one page (10 chunks) of full-text results based on SPLADE. | |
|
19
18
|
| **slim_chunks** | **Boolean** | 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] |
|
@@ -34,7 +33,6 @@ instance = TrieveRubyClient::SearchWithinGroupData.new(
|
|
34
33
|
page: null,
|
35
34
|
page_size: null,
|
36
35
|
query: null,
|
37
|
-
quote_negated_words: null,
|
38
36
|
score_threshold: null,
|
39
37
|
search_type: null,
|
40
38
|
slim_chunks: null,
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# TrieveRubyClient::SearchWithinGroupResults
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **bookmarks** | [**Array<ScoreChunkDTO>**](ScoreChunkDTO.md) | | |
|
8
|
+
| **group** | [**ChunkGroup**](ChunkGroup.md) | | |
|
9
|
+
| **total_pages** | **Integer** | | |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'trieve_ruby_client'
|
15
|
+
|
16
|
+
instance = TrieveRubyClient::SearchWithinGroupResults.new(
|
17
|
+
bookmarks: null,
|
18
|
+
group: null,
|
19
|
+
total_pages: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# TrieveRubyClient::SearchWithinGroupSlimResults
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **bookmarks** | [**Array<ScoreSlimChunks>**](ScoreSlimChunks.md) | | |
|
8
|
+
| **group** | [**ChunkGroup**](ChunkGroup.md) | | |
|
9
|
+
| **total_pages** | **Integer** | | |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'trieve_ruby_client'
|
15
|
+
|
16
|
+
instance = TrieveRubyClient::SearchWithinGroupSlimResults.new(
|
17
|
+
bookmarks: null,
|
18
|
+
group: null,
|
19
|
+
total_pages: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# TrieveRubyClient::SlimChunkMetadataWithScore
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **created_at** | **Time** | | |
|
8
|
+
| **id** | **String** | | |
|
9
|
+
| **link** | **String** | | [optional] |
|
10
|
+
| **metadata** | **Object** | | [optional] |
|
11
|
+
| **qdrant_point_id** | **String** | | [optional] |
|
12
|
+
| **score** | **Float** | | |
|
13
|
+
| **tag_set** | **String** | | [optional] |
|
14
|
+
| **time_stamp** | **Time** | | [optional] |
|
15
|
+
| **tracking_id** | **String** | | [optional] |
|
16
|
+
| **updated_at** | **Time** | | |
|
17
|
+
| **weight** | **Float** | | |
|
18
|
+
|
19
|
+
## Example
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'trieve_ruby_client'
|
23
|
+
|
24
|
+
instance = TrieveRubyClient::SlimChunkMetadataWithScore.new(
|
25
|
+
created_at: null,
|
26
|
+
id: null,
|
27
|
+
link: null,
|
28
|
+
metadata: null,
|
29
|
+
qdrant_point_id: null,
|
30
|
+
score: null,
|
31
|
+
tag_set: null,
|
32
|
+
time_stamp: null,
|
33
|
+
tracking_id: null,
|
34
|
+
updated_at: null,
|
35
|
+
weight: null
|
36
|
+
)
|
37
|
+
```
|
38
|
+
|
@@ -6,7 +6,9 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **description** | **String** | Description to assign to the chunk_group. Convenience field for you to avoid having to remember what the group is for. If not provided, the description will not be updated. | [optional] |
|
8
8
|
| **group_id** | **String** | Id of the chunk_group to update. | [optional] |
|
9
|
+
| **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] |
|
9
10
|
| **name** | **String** | Name to assign to the chunk_group. Does not need to be unique. If not provided, the name will not be updated. | [optional] |
|
11
|
+
| **tag_set** | **Array<String>** | 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] |
|
10
12
|
| **tracking_id** | **String** | Tracking Id of the chunk_group to update. | [optional] |
|
11
13
|
|
12
14
|
## Example
|
@@ -17,7 +19,9 @@ require 'trieve_ruby_client'
|
|
17
19
|
instance = TrieveRubyClient::UpdateChunkGroupData.new(
|
18
20
|
description: null,
|
19
21
|
group_id: null,
|
22
|
+
metadata: null,
|
20
23
|
name: null,
|
24
|
+
tag_set: null,
|
21
25
|
tracking_id: null
|
22
26
|
)
|
23
27
|
```
|
@@ -5,7 +5,9 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **description** | **String** | Description to assign to the chunk_group. Convenience field for you to avoid having to remember what the group is for. If not provided, the description will not be updated. | [optional] |
|
8
|
+
| **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] |
|
8
9
|
| **name** | **String** | Name to assign to the chunk_group. Does not need to be unique. If not provided, the name will not be updated. | [optional] |
|
10
|
+
| **tag_set** | **Array<String>** | 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] |
|
9
11
|
| **tracking_id** | **String** | Tracking Id of the chunk_group to update. | |
|
10
12
|
|
11
13
|
## Example
|
@@ -15,7 +17,9 @@ require 'trieve_ruby_client'
|
|
15
17
|
|
16
18
|
instance = TrieveRubyClient::UpdateGroupByTrackingIDData.new(
|
17
19
|
description: null,
|
20
|
+
metadata: null,
|
18
21
|
name: null,
|
22
|
+
tag_set: null,
|
19
23
|
tracking_id: null
|
20
24
|
)
|
21
25
|
```
|
data/docs/UserApi.md
CHANGED
@@ -4,8 +4,8 @@ All URIs are relative to *https://api.trieve.ai*
|
|
4
4
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
|
-
| [**delete_user_api_key**](UserApi.md#delete_user_api_key) | **DELETE** /api/user/
|
8
|
-
| [**set_user_api_key**](UserApi.md#set_user_api_key) | **POST** /api/user/
|
7
|
+
| [**delete_user_api_key**](UserApi.md#delete_user_api_key) | **DELETE** /api/user/api_key/{api_key_id} | Delete User Api Key |
|
8
|
+
| [**set_user_api_key**](UserApi.md#set_user_api_key) | **POST** /api/user/api_key | Set User Api Key |
|
9
9
|
| [**update_user**](UserApi.md#update_user) | **PUT** /api/user | Update User |
|
10
10
|
|
11
11
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.6.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -135,33 +135,35 @@ module TrieveRubyClient
|
|
135
135
|
|
136
136
|
# Login
|
137
137
|
# Login This will redirect you to the OAuth provider for authentication with email/pass, SSO, Google, Github, etc.
|
138
|
-
# @param content [AuthQuery] Query parameters for login to be included as kv pairs after ? on the request URL.
|
139
138
|
# @param [Hash] opts the optional parameters
|
139
|
+
# @option opts [String] :organization_id ID of organization to authenticate into
|
140
|
+
# @option opts [String] :redirect_uri URL to redirect to after successful login
|
141
|
+
# @option opts [String] :inv_code Code sent via email as a result of successful call to send_invitation
|
140
142
|
# @return [nil]
|
141
|
-
def login(
|
142
|
-
login_with_http_info(
|
143
|
+
def login(opts = {})
|
144
|
+
login_with_http_info(opts)
|
143
145
|
nil
|
144
146
|
end
|
145
147
|
|
146
148
|
# Login
|
147
149
|
# Login This will redirect you to the OAuth provider for authentication with email/pass, SSO, Google, Github, etc.
|
148
|
-
# @param content [AuthQuery] Query parameters for login to be included as kv pairs after ? on the request URL.
|
149
150
|
# @param [Hash] opts the optional parameters
|
151
|
+
# @option opts [String] :organization_id ID of organization to authenticate into
|
152
|
+
# @option opts [String] :redirect_uri URL to redirect to after successful login
|
153
|
+
# @option opts [String] :inv_code Code sent via email as a result of successful call to send_invitation
|
150
154
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
151
|
-
def login_with_http_info(
|
155
|
+
def login_with_http_info(opts = {})
|
152
156
|
if @api_client.config.debugging
|
153
157
|
@api_client.config.logger.debug 'Calling API: AuthApi.login ...'
|
154
158
|
end
|
155
|
-
# verify the required parameter 'content' is set
|
156
|
-
if @api_client.config.client_side_validation && content.nil?
|
157
|
-
fail ArgumentError, "Missing the required parameter 'content' when calling AuthApi.login"
|
158
|
-
end
|
159
159
|
# resource path
|
160
160
|
local_var_path = '/api/auth'
|
161
161
|
|
162
162
|
# query parameters
|
163
163
|
query_params = opts[:query_params] || {}
|
164
|
-
query_params[:'
|
164
|
+
query_params[:'organization_id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
|
165
|
+
query_params[:'redirect_uri'] = opts[:'redirect_uri'] if !opts[:'redirect_uri'].nil?
|
166
|
+
query_params[:'inv_code'] = opts[:'inv_code'] if !opts[:'inv_code'].nil?
|
165
167
|
|
166
168
|
# header parameters
|
167
169
|
header_params = opts[:header_params] || {}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.6.2
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -529,7 +529,7 @@ module TrieveRubyClient
|
|
529
529
|
# @param tr_dataset [String] The dataset id to use for the request
|
530
530
|
# @param recommend_chunks_request [RecommendChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
|
531
531
|
# @param [Hash] opts the optional parameters
|
532
|
-
# @return [
|
532
|
+
# @return [Array<ChunkMetadataWithScore>]
|
533
533
|
def get_recommended_chunks(tr_dataset, recommend_chunks_request, opts = {})
|
534
534
|
data, _status_code, _headers = get_recommended_chunks_with_http_info(tr_dataset, recommend_chunks_request, opts)
|
535
535
|
data
|
@@ -540,7 +540,7 @@ module TrieveRubyClient
|
|
540
540
|
# @param tr_dataset [String] The dataset id to use for the request
|
541
541
|
# @param recommend_chunks_request [RecommendChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
|
542
542
|
# @param [Hash] opts the optional parameters
|
543
|
-
# @return [Array<(
|
543
|
+
# @return [Array<(Array<ChunkMetadataWithScore>, Integer, Hash)>] Array<ChunkMetadataWithScore> data, response status code and response headers
|
544
544
|
def get_recommended_chunks_with_http_info(tr_dataset, recommend_chunks_request, opts = {})
|
545
545
|
if @api_client.config.debugging
|
546
546
|
@api_client.config.logger.debug 'Calling API: ChunkApi.get_recommended_chunks ...'
|
@@ -577,7 +577,7 @@ module TrieveRubyClient
|
|
577
577
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(recommend_chunks_request)
|
578
578
|
|
579
579
|
# return_type
|
580
|
-
return_type = opts[:debug_return_type] || '
|
580
|
+
return_type = opts[:debug_return_type] || 'Array<ChunkMetadataWithScore>'
|
581
581
|
|
582
582
|
# auth_names
|
583
583
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
@@ -604,7 +604,7 @@ module TrieveRubyClient
|
|
604
604
|
# @param tr_dataset [String] The dataset id to use for the request
|
605
605
|
# @param search_chunk_data [SearchChunkData] JSON request payload to semantically search for chunks (chunks)
|
606
606
|
# @param [Hash] opts the optional parameters
|
607
|
-
# @return [
|
607
|
+
# @return [SearchChunkQueryResponseBody]
|
608
608
|
def search_chunk(tr_dataset, search_chunk_data, opts = {})
|
609
609
|
data, _status_code, _headers = search_chunk_with_http_info(tr_dataset, search_chunk_data, opts)
|
610
610
|
data
|
@@ -615,7 +615,7 @@ module TrieveRubyClient
|
|
615
615
|
# @param tr_dataset [String] The dataset id to use for the request
|
616
616
|
# @param search_chunk_data [SearchChunkData] JSON request payload to semantically search for chunks (chunks)
|
617
617
|
# @param [Hash] opts the optional parameters
|
618
|
-
# @return [Array<(
|
618
|
+
# @return [Array<(SearchChunkQueryResponseBody, Integer, Hash)>] SearchChunkQueryResponseBody data, response status code and response headers
|
619
619
|
def search_chunk_with_http_info(tr_dataset, search_chunk_data, opts = {})
|
620
620
|
if @api_client.config.debugging
|
621
621
|
@api_client.config.logger.debug 'Calling API: ChunkApi.search_chunk ...'
|
@@ -652,7 +652,7 @@ module TrieveRubyClient
|
|
652
652
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(search_chunk_data)
|
653
653
|
|
654
654
|
# return_type
|
655
|
-
return_type = opts[:debug_return_type] || '
|
655
|
+
return_type = opts[:debug_return_type] || 'SearchChunkQueryResponseBody'
|
656
656
|
|
657
657
|
# auth_names
|
658
658
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|