trieve_ruby_client 0.5.0 → 0.6.0
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/GENERATE_COMMAND.txt +1 -0
- data/README.md +22 -11
- data/docs/AddChunkToGroupData.md +4 -2
- data/docs/AuthApi.md +13 -7
- data/docs/ChunkApi.md +9 -9
- data/docs/ChunkGroup.md +4 -0
- data/docs/ChunkGroupApi.md +36 -27
- data/docs/CreateChunkGroupData.md +4 -0
- data/docs/DatasetApi.md +11 -11
- data/docs/EventsApi.md +2 -2
- data/docs/FileApi.md +3 -3
- data/docs/GroupScoreChunkDTO.md +2 -0
- data/docs/GroupSlimChunksDTO.md +20 -0
- data/docs/HealthApi.md +1 -1
- data/docs/InvitationApi.md +1 -1
- data/docs/MessageApi.md +1 -1
- data/docs/OrganizationApi.md +1 -1
- data/docs/Range.md +4 -4
- data/docs/RangeCondition.md +49 -0
- data/docs/ReccomendGroupChunksRequest.md +3 -1
- data/docs/RecommendChunksRequest.md +5 -1
- data/docs/RecommendChunksResponseTypes.md +49 -0
- data/docs/RecommendGroupChunkResponseTypes.md +49 -0
- data/docs/RecommendGroupChunksRequest.md +34 -0
- data/docs/ScoreSlimChunks.md +20 -0
- data/docs/SearchChunkData.md +3 -1
- data/docs/SearchChunkResponseTypes.md +49 -0
- data/docs/SearchGroupSlimChunksResult.md +22 -0
- data/docs/SearchOverGroupsData.md +6 -4
- data/docs/SearchOverGroupsResponseTypes.md +49 -0
- data/docs/SearchOverGroupsSlimChunksResponseBody.md +20 -0
- data/docs/SearchSlimChunkQueryResponseBody.md +20 -0
- data/docs/SearchWithinGroupData.md +3 -1
- data/docs/SearchWithinGroupResponseTypes.md +49 -0
- data/docs/SlimChunkMetadata.md +36 -0
- data/docs/SlimUser.md +1 -7
- data/docs/StripeApi.md +1 -1
- data/docs/TopicApi.md +9 -9
- data/docs/UpdateChunkData.md +2 -0
- data/docs/UpdateChunkGroupData.md +4 -0
- data/docs/UpdateGroupByTrackingIDData.md +4 -0
- data/docs/UpdateUserData.md +1 -7
- data/docs/UserApi.md +9 -9
- 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 +38 -31
- data/lib/trieve_ruby_client/api/dataset_api.rb +17 -22
- 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 +11 -16
- data/lib/trieve_ruby_client/api/user_api.rb +11 -16
- 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 +7 -7
- 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 +1 -1
- 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/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 +26 -2
- 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 +1 -1
- 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_dto.rb +12 -2
- data/lib/trieve_ruby_client/models/group_slim_chunks_dto.rb +239 -0
- 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 +5 -5
- data/lib/trieve_ruby_client/models/range_condition.rb +105 -0
- data/lib/trieve_ruby_client/models/reccomend_group_chunks_request.rb +17 -6
- data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +28 -6
- data/lib/trieve_ruby_client/models/recommend_chunks_response_types.rb +105 -0
- data/lib/trieve_ruby_client/models/recommend_group_chunk_response_types.rb +105 -0
- 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 +1 -1
- data/lib/trieve_ruby_client/models/score_slim_chunks.rb +239 -0
- data/lib/trieve_ruby_client/models/search_chunk_data.rb +14 -3
- 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 +105 -0
- data/lib/trieve_ruby_client/models/search_group_slim_chunks_result.rb +255 -0
- data/lib/trieve_ruby_client/models/search_groups_result.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_data.rb +19 -7
- 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 +105 -0
- data/lib/trieve_ruby_client/models/search_over_groups_slim_chunks_response_body.rb +239 -0
- data/lib/trieve_ruby_client/models/search_slim_chunk_query_response_body.rb +239 -0
- data/lib/trieve_ruby_client/models/search_within_group_data.rb +14 -3
- data/lib/trieve_ruby_client/models/search_within_group_response_types.rb +105 -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 +329 -0
- data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_user.rb +5 -41
- 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 +15 -2
- 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 +6 -39
- 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 +14 -3
- data/openapi-generator.yaml +1 -1
- data/openapi.json +679 -261
- data/spec/models/group_slim_chunks_dto_spec.rb +42 -0
- data/spec/models/range_condition_spec.rb +32 -0
- data/spec/models/recommend_chunks_response_types_spec.rb +32 -0
- data/spec/models/recommend_group_chunk_response_types_spec.rb +32 -0
- data/spec/models/recommend_group_chunks_request_spec.rb +84 -0
- data/spec/models/score_slim_chunks_spec.rb +42 -0
- data/spec/models/search_chunk_response_types_spec.rb +32 -0
- data/spec/models/search_group_slim_chunks_result_spec.rb +48 -0
- data/spec/models/search_over_groups_response_types_spec.rb +32 -0
- data/spec/models/search_over_groups_slim_chunks_response_body_spec.rb +42 -0
- data/spec/models/search_slim_chunk_query_response_body_spec.rb +42 -0
- data/spec/models/search_within_group_response_types_spec.rb +32 -0
- data/spec/models/slim_chunk_metadata_spec.rb +90 -0
- data/spec/spec_helper.rb +1 -1
- data/trieve_ruby_client-0.5.0.gem +0 -0
- data/trieve_ruby_client-0.5.7.gem +0 -0
- data/trieve_ruby_client.gemspec +1 -1
- metadata +57 -4
- data/trieve_ruby_client-0.3.5.gem +0 -0
- data/trieve_ruby_client-0.4.0.gem +0 -0
data/docs/FileApi.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# TrieveRubyClient::FileApi
|
2
2
|
|
3
|
-
All URIs are relative to *
|
3
|
+
All URIs are relative to *https://api.trieve.ai*
|
4
4
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
@@ -16,7 +16,7 @@ All URIs are relative to *http://localhost:8090*
|
|
16
16
|
|
17
17
|
Delete File
|
18
18
|
|
19
|
-
Delete File Delete a file from S3 attached to the server based on its id. This will disassociate chunks from the file, but
|
19
|
+
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.
|
20
20
|
|
21
21
|
### Examples
|
22
22
|
|
@@ -165,7 +165,7 @@ end
|
|
165
165
|
|
166
166
|
Get File
|
167
167
|
|
168
|
-
Get File Download a file
|
168
|
+
Get File Download a file based on its id.
|
169
169
|
|
170
170
|
### Examples
|
171
171
|
|
data/docs/GroupScoreChunkDTO.md
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **group_id** | **String** | | |
|
8
|
+
| **group_tracking_id** | **String** | | [optional] |
|
8
9
|
| **metadata** | [**Array<ScoreChunkDTO>**](ScoreChunkDTO.md) | | |
|
9
10
|
|
10
11
|
## Example
|
@@ -14,6 +15,7 @@ require 'trieve_ruby_client'
|
|
14
15
|
|
15
16
|
instance = TrieveRubyClient::GroupScoreChunkDTO.new(
|
16
17
|
group_id: null,
|
18
|
+
group_tracking_id: null,
|
17
19
|
metadata: null
|
18
20
|
)
|
19
21
|
```
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TrieveRubyClient::GroupSlimChunksDTO
|
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::GroupSlimChunksDTO.new(
|
16
|
+
group_id: null,
|
17
|
+
metadata: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
data/docs/HealthApi.md
CHANGED
data/docs/InvitationApi.md
CHANGED
data/docs/MessageApi.md
CHANGED
data/docs/OrganizationApi.md
CHANGED
data/docs/Range.md
CHANGED
@@ -4,10 +4,10 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **gt** | **
|
8
|
-
| **gte** | **
|
9
|
-
| **lt** | **
|
10
|
-
| **lte** | **
|
7
|
+
| **gt** | [**RangeCondition**](RangeCondition.md) | | [optional] |
|
8
|
+
| **gte** | [**RangeCondition**](RangeCondition.md) | | [optional] |
|
9
|
+
| **lt** | [**RangeCondition**](RangeCondition.md) | | [optional] |
|
10
|
+
| **lte** | [**RangeCondition**](RangeCondition.md) | | [optional] |
|
11
11
|
|
12
12
|
## Example
|
13
13
|
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# TrieveRubyClient::RangeCondition
|
2
|
+
|
3
|
+
## Class instance methods
|
4
|
+
|
5
|
+
### `openapi_one_of`
|
6
|
+
|
7
|
+
Returns the list of classes defined in oneOf.
|
8
|
+
|
9
|
+
#### Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'trieve_ruby_client'
|
13
|
+
|
14
|
+
TrieveRubyClient::RangeCondition.openapi_one_of
|
15
|
+
# =>
|
16
|
+
# [
|
17
|
+
# :'Float',
|
18
|
+
# :'String'
|
19
|
+
# ]
|
20
|
+
```
|
21
|
+
|
22
|
+
### build
|
23
|
+
|
24
|
+
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
|
25
|
+
|
26
|
+
#### Example
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
require 'trieve_ruby_client'
|
30
|
+
|
31
|
+
TrieveRubyClient::RangeCondition.build(data)
|
32
|
+
# => #<Float:0x00007fdd4aab02a0>
|
33
|
+
|
34
|
+
TrieveRubyClient::RangeCondition.build(data_that_doesnt_match)
|
35
|
+
# => nil
|
36
|
+
```
|
37
|
+
|
38
|
+
#### Parameters
|
39
|
+
|
40
|
+
| Name | Type | Description |
|
41
|
+
| ---- | ---- | ----------- |
|
42
|
+
| **data** | **Mixed** | data to be matched against the list of oneOf items |
|
43
|
+
|
44
|
+
#### Return type
|
45
|
+
|
46
|
+
- `Float`
|
47
|
+
- `String`
|
48
|
+
- `nil` (if no type matches)
|
49
|
+
|
@@ -11,6 +11,7 @@
|
|
11
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
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
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] |
|
14
15
|
|
15
16
|
## Example
|
16
17
|
|
@@ -24,7 +25,8 @@ instance = TrieveRubyClient::ReccomendGroupChunksRequest.new(
|
|
24
25
|
negative_group_ids: null,
|
25
26
|
negative_group_tracking_ids: null,
|
26
27
|
positive_group_ids: null,
|
27
|
-
positive_group_tracking_ids: null
|
28
|
+
positive_group_tracking_ids: null,
|
29
|
+
slim_chunks: null
|
28
30
|
)
|
29
31
|
```
|
30
32
|
|
@@ -10,6 +10,8 @@
|
|
10
10
|
| **negative_tracking_ids** | **Array<String>** | The tracking_ids of the chunks to be used as negative examples for the recommendation. The chunks in this array will be used to filter out similar chunks. | [optional] |
|
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
|
+
| **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] |
|
13
15
|
|
14
16
|
## Example
|
15
17
|
|
@@ -22,7 +24,9 @@ instance = TrieveRubyClient::RecommendChunksRequest.new(
|
|
22
24
|
negative_chunk_ids: null,
|
23
25
|
negative_tracking_ids: null,
|
24
26
|
positive_chunk_ids: null,
|
25
|
-
positive_tracking_ids: null
|
27
|
+
positive_tracking_ids: null,
|
28
|
+
slim_chunks: null,
|
29
|
+
strategy: null
|
26
30
|
)
|
27
31
|
```
|
28
32
|
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# TrieveRubyClient::RecommendChunksResponseTypes
|
2
|
+
|
3
|
+
## Class instance methods
|
4
|
+
|
5
|
+
### `openapi_one_of`
|
6
|
+
|
7
|
+
Returns the list of classes defined in oneOf.
|
8
|
+
|
9
|
+
#### Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'trieve_ruby_client'
|
13
|
+
|
14
|
+
TrieveRubyClient::RecommendChunksResponseTypes.openapi_one_of
|
15
|
+
# =>
|
16
|
+
# [
|
17
|
+
# :'Array<ChunkMetadata>',
|
18
|
+
# :'Array<SlimChunkMetadata>'
|
19
|
+
# ]
|
20
|
+
```
|
21
|
+
|
22
|
+
### build
|
23
|
+
|
24
|
+
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
|
25
|
+
|
26
|
+
#### Example
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
require 'trieve_ruby_client'
|
30
|
+
|
31
|
+
TrieveRubyClient::RecommendChunksResponseTypes.build(data)
|
32
|
+
# => #<Array<ChunkMetadata>:0x00007fdd4aab02a0>
|
33
|
+
|
34
|
+
TrieveRubyClient::RecommendChunksResponseTypes.build(data_that_doesnt_match)
|
35
|
+
# => nil
|
36
|
+
```
|
37
|
+
|
38
|
+
#### Parameters
|
39
|
+
|
40
|
+
| Name | Type | Description |
|
41
|
+
| ---- | ---- | ----------- |
|
42
|
+
| **data** | **Mixed** | data to be matched against the list of oneOf items |
|
43
|
+
|
44
|
+
#### Return type
|
45
|
+
|
46
|
+
- `Array<ChunkMetadata>`
|
47
|
+
- `Array<SlimChunkMetadata>`
|
48
|
+
- `nil` (if no type matches)
|
49
|
+
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# TrieveRubyClient::RecommendGroupChunkResponseTypes
|
2
|
+
|
3
|
+
## Class instance methods
|
4
|
+
|
5
|
+
### `openapi_one_of`
|
6
|
+
|
7
|
+
Returns the list of classes defined in oneOf.
|
8
|
+
|
9
|
+
#### Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'trieve_ruby_client'
|
13
|
+
|
14
|
+
TrieveRubyClient::RecommendGroupChunkResponseTypes.openapi_one_of
|
15
|
+
# =>
|
16
|
+
# [
|
17
|
+
# :'Array<GroupScoreChunkDTO>',
|
18
|
+
# :'Array<GroupSlimChunksDTO>'
|
19
|
+
# ]
|
20
|
+
```
|
21
|
+
|
22
|
+
### build
|
23
|
+
|
24
|
+
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
|
25
|
+
|
26
|
+
#### Example
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
require 'trieve_ruby_client'
|
30
|
+
|
31
|
+
TrieveRubyClient::RecommendGroupChunkResponseTypes.build(data)
|
32
|
+
# => #<Array<GroupScoreChunkDTO>:0x00007fdd4aab02a0>
|
33
|
+
|
34
|
+
TrieveRubyClient::RecommendGroupChunkResponseTypes.build(data_that_doesnt_match)
|
35
|
+
# => nil
|
36
|
+
```
|
37
|
+
|
38
|
+
#### Parameters
|
39
|
+
|
40
|
+
| Name | Type | Description |
|
41
|
+
| ---- | ---- | ----------- |
|
42
|
+
| **data** | **Mixed** | data to be matched against the list of oneOf items |
|
43
|
+
|
44
|
+
#### Return type
|
45
|
+
|
46
|
+
- `Array<GroupScoreChunkDTO>`
|
47
|
+
- `Array<GroupSlimChunksDTO>`
|
48
|
+
- `nil` (if no type matches)
|
49
|
+
|
@@ -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
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TrieveRubyClient::ScoreSlimChunks
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **metadata** | [**Array<SlimChunkMetadata>**](SlimChunkMetadata.md) | | |
|
8
|
+
| **score** | **Float** | | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'trieve_ruby_client'
|
14
|
+
|
15
|
+
instance = TrieveRubyClient::ScoreSlimChunks.new(
|
16
|
+
metadata: null,
|
17
|
+
score: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
data/docs/SearchChunkData.md
CHANGED
@@ -9,11 +9,12 @@
|
|
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
15
|
| **score_threshold** | **Float** | Set score_threshold to a float to filter out chunks with a score below the threshold. | [optional] |
|
16
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. | |
|
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] |
|
17
18
|
| **use_weights** | **Boolean** | Set use_weights to true to use the weights of the chunks in the result set in order to sort them. If not specified, this defaults to true. | [optional] |
|
18
19
|
|
19
20
|
## Example
|
@@ -32,6 +33,7 @@ instance = TrieveRubyClient::SearchChunkData.new(
|
|
32
33
|
query: null,
|
33
34
|
score_threshold: null,
|
34
35
|
search_type: null,
|
36
|
+
slim_chunks: null,
|
35
37
|
use_weights: null
|
36
38
|
)
|
37
39
|
```
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# TrieveRubyClient::SearchChunkResponseTypes
|
2
|
+
|
3
|
+
## Class instance methods
|
4
|
+
|
5
|
+
### `openapi_one_of`
|
6
|
+
|
7
|
+
Returns the list of classes defined in oneOf.
|
8
|
+
|
9
|
+
#### Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'trieve_ruby_client'
|
13
|
+
|
14
|
+
TrieveRubyClient::SearchChunkResponseTypes.openapi_one_of
|
15
|
+
# =>
|
16
|
+
# [
|
17
|
+
# :'SearchChunkQueryResponseBody',
|
18
|
+
# :'SearchSlimChunkQueryResponseBody'
|
19
|
+
# ]
|
20
|
+
```
|
21
|
+
|
22
|
+
### build
|
23
|
+
|
24
|
+
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
|
25
|
+
|
26
|
+
#### Example
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
require 'trieve_ruby_client'
|
30
|
+
|
31
|
+
TrieveRubyClient::SearchChunkResponseTypes.build(data)
|
32
|
+
# => #<SearchChunkQueryResponseBody:0x00007fdd4aab02a0>
|
33
|
+
|
34
|
+
TrieveRubyClient::SearchChunkResponseTypes.build(data_that_doesnt_match)
|
35
|
+
# => nil
|
36
|
+
```
|
37
|
+
|
38
|
+
#### Parameters
|
39
|
+
|
40
|
+
| Name | Type | Description |
|
41
|
+
| ---- | ---- | ----------- |
|
42
|
+
| **data** | **Mixed** | data to be matched against the list of oneOf items |
|
43
|
+
|
44
|
+
#### Return type
|
45
|
+
|
46
|
+
- `SearchChunkQueryResponseBody`
|
47
|
+
- `SearchSlimChunkQueryResponseBody`
|
48
|
+
- `nil` (if no type matches)
|
49
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# TrieveRubyClient::SearchGroupSlimChunksResult
|
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::SearchGroupSlimChunksResult.new(
|
17
|
+
bookmarks: null,
|
18
|
+
group: null,
|
19
|
+
total_pages: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -6,14 +6,15 @@
|
|
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
15
|
| **score_threshold** | **Float** | Set score_threshold to a float to filter out chunks with a score below the threshold. | [optional] |
|
16
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. | |
|
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] |
|
17
18
|
|
18
19
|
## Example
|
19
20
|
|
@@ -30,7 +31,8 @@ instance = TrieveRubyClient::SearchOverGroupsData.new(
|
|
30
31
|
page_size: null,
|
31
32
|
query: null,
|
32
33
|
score_threshold: null,
|
33
|
-
search_type: null
|
34
|
+
search_type: null,
|
35
|
+
slim_chunks: null
|
34
36
|
)
|
35
37
|
```
|
36
38
|
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# TrieveRubyClient::SearchOverGroupsResponseTypes
|
2
|
+
|
3
|
+
## Class instance methods
|
4
|
+
|
5
|
+
### `openapi_one_of`
|
6
|
+
|
7
|
+
Returns the list of classes defined in oneOf.
|
8
|
+
|
9
|
+
#### Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'trieve_ruby_client'
|
13
|
+
|
14
|
+
TrieveRubyClient::SearchOverGroupsResponseTypes.openapi_one_of
|
15
|
+
# =>
|
16
|
+
# [
|
17
|
+
# :'SearchOverGroupsResponseBody',
|
18
|
+
# :'SearchOverGroupsSlimChunksResponseBody'
|
19
|
+
# ]
|
20
|
+
```
|
21
|
+
|
22
|
+
### build
|
23
|
+
|
24
|
+
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
|
25
|
+
|
26
|
+
#### Example
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
require 'trieve_ruby_client'
|
30
|
+
|
31
|
+
TrieveRubyClient::SearchOverGroupsResponseTypes.build(data)
|
32
|
+
# => #<SearchOverGroupsResponseBody:0x00007fdd4aab02a0>
|
33
|
+
|
34
|
+
TrieveRubyClient::SearchOverGroupsResponseTypes.build(data_that_doesnt_match)
|
35
|
+
# => nil
|
36
|
+
```
|
37
|
+
|
38
|
+
#### Parameters
|
39
|
+
|
40
|
+
| Name | Type | Description |
|
41
|
+
| ---- | ---- | ----------- |
|
42
|
+
| **data** | **Mixed** | data to be matched against the list of oneOf items |
|
43
|
+
|
44
|
+
#### Return type
|
45
|
+
|
46
|
+
- `SearchOverGroupsResponseBody`
|
47
|
+
- `SearchOverGroupsSlimChunksResponseBody`
|
48
|
+
- `nil` (if no type matches)
|
49
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TrieveRubyClient::SearchOverGroupsSlimChunksResponseBody
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **group_chunks** | [**Array<GroupSlimChunksDTO>**](GroupSlimChunksDTO.md) | | |
|
8
|
+
| **total_chunk_pages** | **Integer** | | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'trieve_ruby_client'
|
14
|
+
|
15
|
+
instance = TrieveRubyClient::SearchOverGroupsSlimChunksResponseBody.new(
|
16
|
+
group_chunks: null,
|
17
|
+
total_chunk_pages: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TrieveRubyClient::SearchSlimChunkQueryResponseBody
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **score_chunks** | [**Array<ScoreSlimChunks>**](ScoreSlimChunks.md) | | |
|
8
|
+
| **total_chunk_pages** | **Integer** | | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'trieve_ruby_client'
|
14
|
+
|
15
|
+
instance = TrieveRubyClient::SearchSlimChunkQueryResponseBody.new(
|
16
|
+
score_chunks: null,
|
17
|
+
total_chunk_pages: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -10,11 +10,12 @@
|
|
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
16
|
| **score_threshold** | **Float** | Set score_threshold to a float to filter out chunks with a score below the threshold. | [optional] |
|
17
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. | |
|
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] |
|
18
19
|
| **use_weights** | **Boolean** | Set use_weights to true to use the weights of the chunks in the result set in order to sort them. If not specified, this defaults to true. | [optional] |
|
19
20
|
|
20
21
|
## Example
|
@@ -34,6 +35,7 @@ instance = TrieveRubyClient::SearchWithinGroupData.new(
|
|
34
35
|
query: null,
|
35
36
|
score_threshold: null,
|
36
37
|
search_type: null,
|
38
|
+
slim_chunks: null,
|
37
39
|
use_weights: null
|
38
40
|
)
|
39
41
|
```
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# TrieveRubyClient::SearchWithinGroupResponseTypes
|
2
|
+
|
3
|
+
## Class instance methods
|
4
|
+
|
5
|
+
### `openapi_one_of`
|
6
|
+
|
7
|
+
Returns the list of classes defined in oneOf.
|
8
|
+
|
9
|
+
#### Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'trieve_ruby_client'
|
13
|
+
|
14
|
+
TrieveRubyClient::SearchWithinGroupResponseTypes.openapi_one_of
|
15
|
+
# =>
|
16
|
+
# [
|
17
|
+
# :'SearchGroupSlimChunksResult',
|
18
|
+
# :'SearchGroupsResult'
|
19
|
+
# ]
|
20
|
+
```
|
21
|
+
|
22
|
+
### build
|
23
|
+
|
24
|
+
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
|
25
|
+
|
26
|
+
#### Example
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
require 'trieve_ruby_client'
|
30
|
+
|
31
|
+
TrieveRubyClient::SearchWithinGroupResponseTypes.build(data)
|
32
|
+
# => #<SearchGroupSlimChunksResult:0x00007fdd4aab02a0>
|
33
|
+
|
34
|
+
TrieveRubyClient::SearchWithinGroupResponseTypes.build(data_that_doesnt_match)
|
35
|
+
# => nil
|
36
|
+
```
|
37
|
+
|
38
|
+
#### Parameters
|
39
|
+
|
40
|
+
| Name | Type | Description |
|
41
|
+
| ---- | ---- | ----------- |
|
42
|
+
| **data** | **Mixed** | data to be matched against the list of oneOf items |
|
43
|
+
|
44
|
+
#### Return type
|
45
|
+
|
46
|
+
- `SearchGroupSlimChunksResult`
|
47
|
+
- `SearchGroupsResult`
|
48
|
+
- `nil` (if no type matches)
|
49
|
+
|