trieve_ruby_client 0.8.0 → 0.10.7
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 +39 -30
- data/docs/ApiKeyRespBody.md +32 -0
- data/docs/AutocompleteData.md +42 -0
- data/docs/AutocompleteReqPayload.md +50 -0
- data/docs/BoostPhrase.md +20 -0
- data/docs/ChunkApi.md +140 -66
- data/docs/ChunkData.md +2 -0
- data/docs/ChunkFilter.md +3 -3
- data/docs/ChunkGroup.md +1 -1
- data/docs/ChunkGroupApi.md +35 -33
- data/docs/ChunkMetadata.md +5 -3
- data/docs/ChunkMetadataStringTagSet.md +46 -0
- data/docs/ChunkMetadataTypes.md +51 -0
- data/docs/ChunkMetadataWithScore.md +0 -2
- data/docs/ChunkReqPayload.md +50 -0
- data/docs/ClientDatasetConfiguration.md +0 -2
- data/docs/ConditionType.md +49 -0
- data/docs/ContentChunkMetadata.md +32 -0
- data/docs/CreateChunkGroupReqPayload.md +28 -0
- data/docs/CreateChunkReqPayloadEnum.md +49 -0
- data/docs/CreateDatasetRequest.md +2 -2
- data/docs/CreateMessageData.md +2 -2
- data/docs/CreateMessageReqPayload.md +42 -0
- data/docs/CreateTopicReqPayload.md +22 -0
- data/docs/Dataset.md +2 -0
- data/docs/DatasetApi.md +236 -12
- data/docs/DateRange.md +24 -0
- data/docs/EditMessageReqPayload.md +44 -0
- data/docs/FieldCondition.md +2 -0
- data/docs/File.md +1 -1
- data/docs/FileApi.md +7 -7
- data/docs/GenerateChunksRequest.md +2 -0
- data/docs/GetDatasetsPagination.md +20 -0
- data/docs/GroupScoreSlimChunks.md +4 -0
- data/docs/HasIDCondition.md +20 -0
- data/docs/InvitationApi.md +1 -1
- data/docs/MatchCondition.md +3 -1
- data/docs/MessageApi.md +42 -42
- data/docs/Organization.md +2 -0
- data/docs/OrganizationApi.md +24 -25
- data/docs/RangeCondition.md +1 -3
- data/docs/RecommendChunksRequest.md +1 -1
- data/docs/RecommendGroupChunksRequest.md +1 -1
- data/docs/RegenerateMessageReqPayload.md +40 -0
- data/docs/RemoveChunkFromGroupReqPayload.md +18 -0
- data/docs/ScoreChunkDTO.md +3 -1
- data/docs/SearchChunkData.md +12 -6
- data/docs/SearchChunksReqPayload.md +54 -0
- data/docs/SearchOverGroupsData.md +12 -4
- data/docs/SearchWithinGroupData.md +16 -6
- data/docs/SetUserApiKeyRequest.md +4 -0
- data/docs/SlimChunkMetadata.md +4 -0
- data/docs/SuggestedQueriesReqPayload.md +18 -0
- data/docs/TopicApi.md +16 -16
- data/docs/UpdateChunkData.md +2 -0
- data/docs/UpdateChunkReqPayload.md +46 -0
- data/docs/UpdateDatasetRequest.md +2 -0
- data/docs/UpdateGroupByTrackingIDReqPayload.md +26 -0
- data/docs/UpdateTopicReqPayload.md +20 -0
- data/docs/UpdateUserOrgRoleData.md +1 -1
- data/docs/UploadFileReqPayload.md +40 -0
- data/docs/UserApi.md +7 -8
- data/lib/trieve_ruby_client/api/auth_api.rb +1 -1
- data/lib/trieve_ruby_client/api/chunk_api.rb +158 -83
- data/lib/trieve_ruby_client/api/chunk_group_api.rb +58 -51
- data/lib/trieve_ruby_client/api/dataset_api.rb +224 -15
- data/lib/trieve_ruby_client/api/events_api.rb +1 -1
- data/lib/trieve_ruby_client/api/file_api.rb +12 -12
- data/lib/trieve_ruby_client/api/health_api.rb +1 -1
- data/lib/trieve_ruby_client/api/invitation_api.rb +3 -3
- data/lib/trieve_ruby_client/api/message_api.rb +50 -50
- data/lib/trieve_ruby_client/api/organization_api.rb +27 -27
- data/lib/trieve_ruby_client/api/stripe_api.rb +1 -1
- data/lib/trieve_ruby_client/api/topic_api.rb +27 -27
- data/lib/trieve_ruby_client/api/user_api.rb +8 -8
- 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 +1 -1
- data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/api_key_resp_body.rb +325 -0
- data/lib/trieve_ruby_client/models/auth_query.rb +1 -1
- data/lib/trieve_ruby_client/models/autocomplete_data.rb +378 -0
- data/lib/trieve_ruby_client/models/autocomplete_req_payload.rb +467 -0
- 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/boost_phrase.rb +240 -0
- data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_data.rb +15 -2
- data/lib/trieve_ruby_client/models/chunk_filter.rb +4 -4
- data/lib/trieve_ruby_client/models/chunk_group.rb +5 -3
- data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_metadata.rb +28 -20
- data/lib/trieve_ruby_client/models/chunk_metadata_string_tag_set.rb +387 -0
- data/lib/trieve_ruby_client/models/chunk_metadata_types.rb +106 -0
- data/lib/trieve_ruby_client/models/chunk_metadata_with_score.rb +2 -18
- data/lib/trieve_ruby_client/models/chunk_req_payload.rb +400 -0
- data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +2 -18
- data/lib/trieve_ruby_client/models/condition_type.rb +105 -0
- data/lib/trieve_ruby_client/models/content_chunk_metadata.rb +299 -0
- data/lib/trieve_ruby_client/models/create_chunk_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_chunk_group_req_payload.rb +273 -0
- data/lib/trieve_ruby_client/models/create_chunk_req_payload_enum.rb +105 -0
- data/lib/trieve_ruby_client/models/create_dataset_request.rb +3 -3
- data/lib/trieve_ruby_client/models/create_message_data.rb +13 -13
- data/lib/trieve_ruby_client/models/create_message_req_payload.rb +378 -0
- 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/create_topic_req_payload.rb +244 -0
- data/lib/trieve_ruby_client/models/dataset.rb +18 -2
- 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/date_range.rb +245 -0
- 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/edit_message_req_payload.rb +395 -0
- 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 +12 -2
- data/lib/trieve_ruby_client/models/file.rb +5 -3
- data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/generate_chunks_request.rb +13 -2
- data/lib/trieve_ruby_client/models/geo_info.rb +1 -1
- data/lib/trieve_ruby_client/models/geo_types.rb +1 -1
- data/lib/trieve_ruby_client/models/get_chunks_data.rb +1 -1
- data/lib/trieve_ruby_client/models/get_datasets_pagination.rb +225 -0
- 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/get_tracking_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 +1 -1
- data/lib/trieve_ruby_client/models/group_score_slim_chunks.rb +22 -2
- data/lib/trieve_ruby_client/models/has_id_condition.rb +229 -0
- data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
- data/lib/trieve_ruby_client/models/location_bounding_box.rb +1 -1
- data/lib/trieve_ruby_client/models/location_polygon.rb +1 -1
- data/lib/trieve_ruby_client/models/location_radius.rb +1 -1
- data/lib/trieve_ruby_client/models/match_condition.rb +2 -1
- data/lib/trieve_ruby_client/models/message.rb +1 -1
- data/lib/trieve_ruby_client/models/organization.rb +18 -2
- 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 +2 -3
- data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +2 -2
- data/lib/trieve_ruby_client/models/recommend_group_chunks_request.rb +2 -2
- data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/regenerate_message_req_payload.rb +361 -0
- data/lib/trieve_ruby_client/models/remove_chunk_from_group_req_payload.rb +222 -0
- data/lib/trieve_ruby_client/models/return_queued_chunk.rb +1 -1
- data/lib/trieve_ruby_client/models/score_chunk_dto.rb +15 -3
- data/lib/trieve_ruby_client/models/score_slim_chunks.rb +1 -1
- data/lib/trieve_ruby_client/models/search_chunk_data.rb +49 -14
- data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_chunks_req_payload.rb +504 -0
- data/lib/trieve_ruby_client/models/search_over_groups_data.rb +95 -6
- data/lib/trieve_ruby_client/models/search_over_groups_results.rb +1 -1
- data/lib/trieve_ruby_client/models/search_over_groups_slim_results.rb +1 -1
- 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 +119 -17
- data/lib/trieve_ruby_client/models/search_within_group_results.rb +1 -1
- data/lib/trieve_ruby_client/models/search_within_group_slim_results.rb +1 -1
- data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +28 -2
- 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 +24 -2
- data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_score.rb +1 -1
- 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_req_payload.rb +222 -0
- 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 +1 -1
- data/lib/trieve_ruby_client/models/update_chunk_req_payload.rb +376 -0
- data/lib/trieve_ruby_client/models/update_dataset_request.rb +13 -2
- data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_group_by_tracking_id_req_payload.rb +268 -0
- 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_topic_req_payload.rb +239 -0
- data/lib/trieve_ruby_client/models/update_user_org_role_data.rb +2 -2
- data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
- data/lib/trieve_ruby_client/models/upload_file_req_payload.rb +368 -0
- 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 +25 -20
- data/openapi-generator.yaml +1 -1
- data/openapi.json +1 -7784
- data/spec/models/api_key_resp_body_spec.rb +78 -0
- data/spec/models/autocomplete_data_spec.rb +108 -0
- data/spec/models/autocomplete_req_payload_spec.rb +132 -0
- data/spec/models/boost_phrase_spec.rb +42 -0
- data/spec/models/chunk_metadata_string_tag_set_spec.rb +120 -0
- data/spec/models/chunk_metadata_types_spec.rb +32 -0
- data/spec/models/chunk_req_payload_spec.rb +132 -0
- data/spec/models/condition_type_spec.rb +32 -0
- data/spec/models/content_chunk_metadata_spec.rb +72 -0
- data/spec/models/create_chunk_group_req_payload_spec.rb +66 -0
- data/spec/models/create_chunk_req_payload_enum_spec.rb +32 -0
- data/spec/models/create_message_req_payload_spec.rb +108 -0
- data/spec/models/create_topic_req_payload_spec.rb +48 -0
- data/spec/models/date_range_spec.rb +54 -0
- data/spec/models/edit_message_req_payload_spec.rb +114 -0
- data/spec/models/get_datasets_pagination_spec.rb +42 -0
- data/spec/models/has_id_condition_spec.rb +42 -0
- data/spec/models/regenerate_message_req_payload_spec.rb +102 -0
- data/spec/models/remove_chunk_from_group_req_payload_spec.rb +36 -0
- data/spec/models/search_chunks_req_payload_spec.rb +144 -0
- data/spec/models/suggested_queries_req_payload_spec.rb +36 -0
- data/spec/models/update_chunk_req_payload_spec.rb +120 -0
- data/spec/models/update_group_by_tracking_id_req_payload_spec.rb +60 -0
- data/spec/models/update_topic_req_payload_spec.rb +42 -0
- data/spec/models/upload_file_req_payload_spec.rb +102 -0
- data/spec/spec_helper.rb +1 -1
- data/trieve_ruby_client-0.8.0.gem +0 -0
- data/trieve_ruby_client-0.8.2.gem +0 -0
- data/trieve_ruby_client-0.8.5.gem +0 -0
- data/trieve_ruby_client.gemspec +1 -1
- metadata +105 -2
data/docs/InvitationApi.md
CHANGED
@@ -13,7 +13,7 @@ All URIs are relative to *https://api.trieve.ai*
|
|
13
13
|
|
14
14
|
Send Invitation
|
15
15
|
|
16
|
-
Send Invitation Invitations act as a way to invite users to join an organization. After a user is invited, they will automatically be added to the organization with the role specified in the invitation once they set their.
|
16
|
+
Send Invitation Invitations act as a way to invite users to join an organization. After a user is invited, they will automatically be added to the organization with the role specified in the invitation once they set their. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
17
17
|
|
18
18
|
### Examples
|
19
19
|
|
data/docs/MatchCondition.md
CHANGED
@@ -14,6 +14,7 @@ require 'trieve_ruby_client'
|
|
14
14
|
TrieveRubyClient::MatchCondition.openapi_one_of
|
15
15
|
# =>
|
16
16
|
# [
|
17
|
+
# :'Float',
|
17
18
|
# :'Integer',
|
18
19
|
# :'String'
|
19
20
|
# ]
|
@@ -29,7 +30,7 @@ Find the appropriate object from the `openapi_one_of` list and casts the data in
|
|
29
30
|
require 'trieve_ruby_client'
|
30
31
|
|
31
32
|
TrieveRubyClient::MatchCondition.build(data)
|
32
|
-
# => #<
|
33
|
+
# => #<Float:0x00007fdd4aab02a0>
|
33
34
|
|
34
35
|
TrieveRubyClient::MatchCondition.build(data_that_doesnt_match)
|
35
36
|
# => nil
|
@@ -43,6 +44,7 @@ TrieveRubyClient::MatchCondition.build(data_that_doesnt_match)
|
|
43
44
|
|
44
45
|
#### Return type
|
45
46
|
|
47
|
+
- `Float`
|
46
48
|
- `Integer`
|
47
49
|
- `String`
|
48
50
|
- `nil` (if no type matches)
|
data/docs/MessageApi.md
CHANGED
@@ -4,19 +4,19 @@ All URIs are relative to *https://api.trieve.ai*
|
|
4
4
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
|
-
| [**
|
8
|
-
| [**
|
7
|
+
| [**create_message**](MessageApi.md#create_message) | **POST** /api/message | Create message |
|
8
|
+
| [**edit_message**](MessageApi.md#edit_message) | **PUT** /api/message | Edit message |
|
9
9
|
| [**get_all_topic_messages**](MessageApi.md#get_all_topic_messages) | **GET** /api/messages/{messages_topic_id} | Get all messages for a given topic |
|
10
|
-
| [**
|
10
|
+
| [**regenerate_message**](MessageApi.md#regenerate_message) | **DELETE** /api/message | Regenerate message |
|
11
11
|
|
12
12
|
|
13
|
-
##
|
13
|
+
## create_message
|
14
14
|
|
15
|
-
> String
|
15
|
+
> String create_message(tr_dataset, create_message_req_payload)
|
16
16
|
|
17
|
-
Create
|
17
|
+
Create message
|
18
18
|
|
19
|
-
Create
|
19
|
+
Create message Create message. Messages are attached to topics in order to coordinate memory of gen-AI chat sessions. We are considering refactoring this resource of the API soon. Currently, you can only send user messages. If the topic is a RAG topic then the response will include Chunks first on the stream. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
20
20
|
|
21
21
|
### Examples
|
22
22
|
|
@@ -33,32 +33,32 @@ end
|
|
33
33
|
|
34
34
|
api_instance = TrieveRubyClient::MessageApi.new
|
35
35
|
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
36
|
-
|
36
|
+
create_message_req_payload = TrieveRubyClient::CreateMessageReqPayload.new({new_message_content: 'new_message_content_example', topic_id: 'topic_id_example'}) # CreateMessageReqPayload | JSON request payload to create a message completion
|
37
37
|
|
38
38
|
begin
|
39
|
-
# Create
|
40
|
-
result = api_instance.
|
39
|
+
# Create message
|
40
|
+
result = api_instance.create_message(tr_dataset, create_message_req_payload)
|
41
41
|
p result
|
42
42
|
rescue TrieveRubyClient::ApiError => e
|
43
|
-
puts "Error when calling MessageApi->
|
43
|
+
puts "Error when calling MessageApi->create_message: #{e}"
|
44
44
|
end
|
45
45
|
```
|
46
46
|
|
47
|
-
#### Using the
|
47
|
+
#### Using the create_message_with_http_info variant
|
48
48
|
|
49
49
|
This returns an Array which contains the response data, status code and headers.
|
50
50
|
|
51
|
-
> <Array(String, Integer, Hash)>
|
51
|
+
> <Array(String, Integer, Hash)> create_message_with_http_info(tr_dataset, create_message_req_payload)
|
52
52
|
|
53
53
|
```ruby
|
54
54
|
begin
|
55
|
-
# Create
|
56
|
-
data, status_code, headers = api_instance.
|
55
|
+
# Create message
|
56
|
+
data, status_code, headers = api_instance.create_message_with_http_info(tr_dataset, create_message_req_payload)
|
57
57
|
p status_code # => 2xx
|
58
58
|
p headers # => { ... }
|
59
59
|
p data # => String
|
60
60
|
rescue TrieveRubyClient::ApiError => e
|
61
|
-
puts "Error when calling MessageApi->
|
61
|
+
puts "Error when calling MessageApi->create_message_with_http_info: #{e}"
|
62
62
|
end
|
63
63
|
```
|
64
64
|
|
@@ -67,7 +67,7 @@ end
|
|
67
67
|
| Name | Type | Description | Notes |
|
68
68
|
| ---- | ---- | ----------- | ----- |
|
69
69
|
| **tr_dataset** | **String** | The dataset id to use for the request | |
|
70
|
-
| **
|
70
|
+
| **create_message_req_payload** | [**CreateMessageReqPayload**](CreateMessageReqPayload.md) | JSON request payload to create a message completion | |
|
71
71
|
|
72
72
|
### Return type
|
73
73
|
|
@@ -83,13 +83,13 @@ end
|
|
83
83
|
- **Accept**: text/plain, application/json
|
84
84
|
|
85
85
|
|
86
|
-
##
|
86
|
+
## edit_message
|
87
87
|
|
88
|
-
>
|
88
|
+
> edit_message(tr_dataset, edit_message_req_payload)
|
89
89
|
|
90
|
-
Edit
|
90
|
+
Edit message
|
91
91
|
|
92
|
-
Edit
|
92
|
+
Edit message Edit message which exists within the topic's chat history. This will delete the message and replace it with a new message. The new message will be generated by the AI based on the new content provided in the request body. The response will include Chunks first on the stream if the topic is using RAG. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
93
93
|
|
94
94
|
### Examples
|
95
95
|
|
@@ -106,31 +106,31 @@ end
|
|
106
106
|
|
107
107
|
api_instance = TrieveRubyClient::MessageApi.new
|
108
108
|
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
109
|
-
|
109
|
+
edit_message_req_payload = TrieveRubyClient::EditMessageReqPayload.new({message_sort_order: 37, new_message_content: 'new_message_content_example', topic_id: 'topic_id_example'}) # EditMessageReqPayload | JSON request payload to edit a message and get a new stream
|
110
110
|
|
111
111
|
begin
|
112
|
-
# Edit
|
113
|
-
api_instance.
|
112
|
+
# Edit message
|
113
|
+
api_instance.edit_message(tr_dataset, edit_message_req_payload)
|
114
114
|
rescue TrieveRubyClient::ApiError => e
|
115
|
-
puts "Error when calling MessageApi->
|
115
|
+
puts "Error when calling MessageApi->edit_message: #{e}"
|
116
116
|
end
|
117
117
|
```
|
118
118
|
|
119
|
-
#### Using the
|
119
|
+
#### Using the edit_message_with_http_info variant
|
120
120
|
|
121
121
|
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
122
122
|
|
123
|
-
> <Array(nil, Integer, Hash)>
|
123
|
+
> <Array(nil, Integer, Hash)> edit_message_with_http_info(tr_dataset, edit_message_req_payload)
|
124
124
|
|
125
125
|
```ruby
|
126
126
|
begin
|
127
|
-
# Edit
|
128
|
-
data, status_code, headers = api_instance.
|
127
|
+
# Edit message
|
128
|
+
data, status_code, headers = api_instance.edit_message_with_http_info(tr_dataset, edit_message_req_payload)
|
129
129
|
p status_code # => 2xx
|
130
130
|
p headers # => { ... }
|
131
131
|
p data # => nil
|
132
132
|
rescue TrieveRubyClient::ApiError => e
|
133
|
-
puts "Error when calling MessageApi->
|
133
|
+
puts "Error when calling MessageApi->edit_message_with_http_info: #{e}"
|
134
134
|
end
|
135
135
|
```
|
136
136
|
|
@@ -139,7 +139,7 @@ end
|
|
139
139
|
| Name | Type | Description | Notes |
|
140
140
|
| ---- | ---- | ----------- | ----- |
|
141
141
|
| **tr_dataset** | **String** | The dataset id to use for the request | |
|
142
|
-
| **
|
142
|
+
| **edit_message_req_payload** | [**EditMessageReqPayload**](EditMessageReqPayload.md) | JSON request payload to edit a message and get a new stream | |
|
143
143
|
|
144
144
|
### Return type
|
145
145
|
|
@@ -228,13 +228,13 @@ end
|
|
228
228
|
- **Accept**: application/json
|
229
229
|
|
230
230
|
|
231
|
-
##
|
231
|
+
## regenerate_message
|
232
232
|
|
233
|
-
> String
|
233
|
+
> String regenerate_message(tr_dataset, regenerate_message_req_payload)
|
234
234
|
|
235
235
|
Regenerate message
|
236
236
|
|
237
|
-
Regenerate message Regenerate the assistant response to the last user message of a topic. This will delete the last message and replace it with a new message. The response will include Chunks first on the stream if the topic is using RAG. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.
|
237
|
+
Regenerate message Regenerate the assistant response to the last user message of a topic. This will delete the last message and replace it with a new message. The response will include Chunks first on the stream if the topic is using RAG. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
238
238
|
|
239
239
|
### Examples
|
240
240
|
|
@@ -251,32 +251,32 @@ end
|
|
251
251
|
|
252
252
|
api_instance = TrieveRubyClient::MessageApi.new
|
253
253
|
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
254
|
-
|
254
|
+
regenerate_message_req_payload = TrieveRubyClient::RegenerateMessageReqPayload.new({topic_id: 'topic_id_example'}) # RegenerateMessageReqPayload | JSON request payload to delete an agent message then regenerate it in a strem
|
255
255
|
|
256
256
|
begin
|
257
257
|
# Regenerate message
|
258
|
-
result = api_instance.
|
258
|
+
result = api_instance.regenerate_message(tr_dataset, regenerate_message_req_payload)
|
259
259
|
p result
|
260
260
|
rescue TrieveRubyClient::ApiError => e
|
261
|
-
puts "Error when calling MessageApi->
|
261
|
+
puts "Error when calling MessageApi->regenerate_message: #{e}"
|
262
262
|
end
|
263
263
|
```
|
264
264
|
|
265
|
-
#### Using the
|
265
|
+
#### Using the regenerate_message_with_http_info variant
|
266
266
|
|
267
267
|
This returns an Array which contains the response data, status code and headers.
|
268
268
|
|
269
|
-
> <Array(String, Integer, Hash)>
|
269
|
+
> <Array(String, Integer, Hash)> regenerate_message_with_http_info(tr_dataset, regenerate_message_req_payload)
|
270
270
|
|
271
271
|
```ruby
|
272
272
|
begin
|
273
273
|
# Regenerate message
|
274
|
-
data, status_code, headers = api_instance.
|
274
|
+
data, status_code, headers = api_instance.regenerate_message_with_http_info(tr_dataset, regenerate_message_req_payload)
|
275
275
|
p status_code # => 2xx
|
276
276
|
p headers # => { ... }
|
277
277
|
p data # => String
|
278
278
|
rescue TrieveRubyClient::ApiError => e
|
279
|
-
puts "Error when calling MessageApi->
|
279
|
+
puts "Error when calling MessageApi->regenerate_message_with_http_info: #{e}"
|
280
280
|
end
|
281
281
|
```
|
282
282
|
|
@@ -285,7 +285,7 @@ end
|
|
285
285
|
| Name | Type | Description | Notes |
|
286
286
|
| ---- | ---- | ----------- | ----- |
|
287
287
|
| **tr_dataset** | **String** | The dataset id to use for the request | |
|
288
|
-
| **
|
288
|
+
| **regenerate_message_req_payload** | [**RegenerateMessageReqPayload**](RegenerateMessageReqPayload.md) | JSON request payload to delete an agent message then regenerate it in a strem | |
|
289
289
|
|
290
290
|
### Return type
|
291
291
|
|
data/docs/Organization.md
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **created_at** | **Time** | | |
|
8
|
+
| **deleted** | **Integer** | | |
|
8
9
|
| **id** | **String** | | |
|
9
10
|
| **name** | **String** | | |
|
10
11
|
| **registerable** | **Boolean** | | [optional] |
|
@@ -17,6 +18,7 @@ require 'trieve_ruby_client'
|
|
17
18
|
|
18
19
|
instance = TrieveRubyClient::Organization.new(
|
19
20
|
created_at: null,
|
21
|
+
deleted: null,
|
20
22
|
id: null,
|
21
23
|
name: null,
|
22
24
|
registerable: null,
|
data/docs/OrganizationApi.md
CHANGED
@@ -5,8 +5,8 @@ All URIs are relative to *https://api.trieve.ai*
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
7
|
| [**create_organization**](OrganizationApi.md#create_organization) | **POST** /api/organization | Create Organization |
|
8
|
-
| [**
|
9
|
-
| [**
|
8
|
+
| [**delete_organization**](OrganizationApi.md#delete_organization) | **DELETE** /api/organization/{organization_id} | Delete Organization |
|
9
|
+
| [**get_organization**](OrganizationApi.md#get_organization) | **GET** /api/organization/{organization_id} | Get Organization |
|
10
10
|
| [**get_organization_usage**](OrganizationApi.md#get_organization_usage) | **GET** /api/organization/usage/{organization_id} | Get Organization Usage |
|
11
11
|
| [**get_organization_users**](OrganizationApi.md#get_organization_users) | **GET** /api/organization/users/{organization_id} | Get Organization Users |
|
12
12
|
| [**update_organization**](OrganizationApi.md#update_organization) | **PUT** /api/organization | Update Organization |
|
@@ -83,9 +83,9 @@ end
|
|
83
83
|
- **Accept**: application/json
|
84
84
|
|
85
85
|
|
86
|
-
##
|
86
|
+
## delete_organization
|
87
87
|
|
88
|
-
>
|
88
|
+
> delete_organization(tr_organization, organization_id)
|
89
89
|
|
90
90
|
Delete Organization
|
91
91
|
|
@@ -110,28 +110,27 @@ organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of th
|
|
110
110
|
|
111
111
|
begin
|
112
112
|
# Delete Organization
|
113
|
-
|
114
|
-
p result
|
113
|
+
api_instance.delete_organization(tr_organization, organization_id)
|
115
114
|
rescue TrieveRubyClient::ApiError => e
|
116
|
-
puts "Error when calling OrganizationApi->
|
115
|
+
puts "Error when calling OrganizationApi->delete_organization: #{e}"
|
117
116
|
end
|
118
117
|
```
|
119
118
|
|
120
|
-
#### Using the
|
119
|
+
#### Using the delete_organization_with_http_info variant
|
121
120
|
|
122
|
-
This returns an Array which contains the response data, status code and headers.
|
121
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
123
122
|
|
124
|
-
> <Array(
|
123
|
+
> <Array(nil, Integer, Hash)> delete_organization_with_http_info(tr_organization, organization_id)
|
125
124
|
|
126
125
|
```ruby
|
127
126
|
begin
|
128
127
|
# Delete Organization
|
129
|
-
data, status_code, headers = api_instance.
|
128
|
+
data, status_code, headers = api_instance.delete_organization_with_http_info(tr_organization, organization_id)
|
130
129
|
p status_code # => 2xx
|
131
130
|
p headers # => { ... }
|
132
|
-
p data # =>
|
131
|
+
p data # => nil
|
133
132
|
rescue TrieveRubyClient::ApiError => e
|
134
|
-
puts "Error when calling OrganizationApi->
|
133
|
+
puts "Error when calling OrganizationApi->delete_organization_with_http_info: #{e}"
|
135
134
|
end
|
136
135
|
```
|
137
136
|
|
@@ -144,7 +143,7 @@ end
|
|
144
143
|
|
145
144
|
### Return type
|
146
145
|
|
147
|
-
|
146
|
+
nil (empty response body)
|
148
147
|
|
149
148
|
### Authorization
|
150
149
|
|
@@ -156,13 +155,13 @@ end
|
|
156
155
|
- **Accept**: application/json
|
157
156
|
|
158
157
|
|
159
|
-
##
|
158
|
+
## get_organization
|
160
159
|
|
161
|
-
> <Organization>
|
160
|
+
> <Organization> get_organization(tr_organization, organization_id)
|
162
161
|
|
163
162
|
Get Organization
|
164
163
|
|
165
|
-
Get Organization Fetch the details of an organization by its id.
|
164
|
+
Get Organization Fetch the details of an organization by its id. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
166
165
|
|
167
166
|
### Examples
|
168
167
|
|
@@ -183,28 +182,28 @@ organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of th
|
|
183
182
|
|
184
183
|
begin
|
185
184
|
# Get Organization
|
186
|
-
result = api_instance.
|
185
|
+
result = api_instance.get_organization(tr_organization, organization_id)
|
187
186
|
p result
|
188
187
|
rescue TrieveRubyClient::ApiError => e
|
189
|
-
puts "Error when calling OrganizationApi->
|
188
|
+
puts "Error when calling OrganizationApi->get_organization: #{e}"
|
190
189
|
end
|
191
190
|
```
|
192
191
|
|
193
|
-
#### Using the
|
192
|
+
#### Using the get_organization_with_http_info variant
|
194
193
|
|
195
194
|
This returns an Array which contains the response data, status code and headers.
|
196
195
|
|
197
|
-
> <Array(<Organization>, Integer, Hash)>
|
196
|
+
> <Array(<Organization>, Integer, Hash)> get_organization_with_http_info(tr_organization, organization_id)
|
198
197
|
|
199
198
|
```ruby
|
200
199
|
begin
|
201
200
|
# Get Organization
|
202
|
-
data, status_code, headers = api_instance.
|
201
|
+
data, status_code, headers = api_instance.get_organization_with_http_info(tr_organization, organization_id)
|
203
202
|
p status_code # => 2xx
|
204
203
|
p headers # => { ... }
|
205
204
|
p data # => <Organization>
|
206
205
|
rescue TrieveRubyClient::ApiError => e
|
207
|
-
puts "Error when calling OrganizationApi->
|
206
|
+
puts "Error when calling OrganizationApi->get_organization_with_http_info: #{e}"
|
208
207
|
end
|
209
208
|
```
|
210
209
|
|
@@ -235,7 +234,7 @@ end
|
|
235
234
|
|
236
235
|
Get Organization Usage
|
237
236
|
|
238
|
-
Get Organization Usage Fetch the current usage specification of an organization by its id.
|
237
|
+
Get Organization Usage Fetch the current usage specification of an organization by its id. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
239
238
|
|
240
239
|
### Examples
|
241
240
|
|
@@ -308,7 +307,7 @@ end
|
|
308
307
|
|
309
308
|
Get Organization Users
|
310
309
|
|
311
|
-
Get Organization Users Fetch the users of an organization by its id.
|
310
|
+
Get Organization Users Fetch the users of an organization by its id. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
312
311
|
|
313
312
|
### Examples
|
314
313
|
|
data/docs/RangeCondition.md
CHANGED
@@ -15,8 +15,7 @@ TrieveRubyClient::RangeCondition.openapi_one_of
|
|
15
15
|
# =>
|
16
16
|
# [
|
17
17
|
# :'Float',
|
18
|
-
# :'Integer'
|
19
|
-
# :'String'
|
18
|
+
# :'Integer'
|
20
19
|
# ]
|
21
20
|
```
|
22
21
|
|
@@ -46,6 +45,5 @@ TrieveRubyClient::RangeCondition.build(data_that_doesnt_match)
|
|
46
45
|
|
47
46
|
- `Float`
|
48
47
|
- `Integer`
|
49
|
-
- `String`
|
50
48
|
- `nil` (if no type matches)
|
51
49
|
|
@@ -11,7 +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
|
| **recommend_type** | **String** | The type of recommendation to make. This lets you choose whether to recommend based off of `semantic` or `fulltext` similarity. The default is `semantic`. | [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
|
+
| **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 (typicall 10-50ms). Default is false. | [optional] |
|
15
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
16
|
|
17
17
|
## Example
|
@@ -12,7 +12,7 @@
|
|
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
14
|
| **recommend_type** | **String** | The type of recommendation to make. This lets you choose whether to recommend based off of `semantic` or `fulltext` similarity. The default is `semantic`. | [optional] |
|
15
|
-
| **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
|
+
| **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 (typicall 10-50ms). Default is false. | [optional] |
|
16
16
|
| **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] |
|
17
17
|
|
18
18
|
## Example
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# TrieveRubyClient::RegenerateMessageReqPayload
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **completion_first** | **Boolean** | Completion first decides whether the stream should contain the stream of the completion response or the chunks first. Default is false. Keep in mind that || is used to separate the chunks from the completion response. If || is in the completion then you may want to split on ||{ instead. | [optional] |
|
8
|
+
| **filters** | [**ChunkFilter**](ChunkFilter.md) | | [optional] |
|
9
|
+
| **frequency_penalty** | **Float** | Frequency penalty is a number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. Default is 0.7. | [optional] |
|
10
|
+
| **highlight_citations** | **Boolean** | Whether or not to highlight the citations in the response. If this is set to true or not included, the citations will be highlighted. If this is set to false, the citations will not be highlighted. Default is true. | [optional] |
|
11
|
+
| **highlight_delimiters** | **Array<String>** | The delimiters to use for highlighting the citations. If this is not included, the default delimiters will be used. Default is `[\".\", \"!\", \"?\", \"\\n\", \"\\t\", \",\"]`. | [optional] |
|
12
|
+
| **max_tokens** | **Integer** | The maximum number of tokens to generate in the chat completion. | [optional] |
|
13
|
+
| **presence_penalty** | **Float** | Presence penalty is a number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. | [optional] |
|
14
|
+
| **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. | [optional] |
|
15
|
+
| **stop_tokens** | **Array<String>** | Stop tokens are up to 4 sequences where the API will stop generating further tokens. | [optional] |
|
16
|
+
| **stream_response** | **Boolean** | Whether or not to stream the response. If this is set to true or not included, the response will be a stream. If this is set to false, the response will be a normal JSON response. Default is true. | [optional] |
|
17
|
+
| **temperature** | **Float** | What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. Default is 0.7. | [optional] |
|
18
|
+
| **topic_id** | **String** | The id of the topic to regenerate the last message for. | |
|
19
|
+
|
20
|
+
## Example
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
require 'trieve_ruby_client'
|
24
|
+
|
25
|
+
instance = TrieveRubyClient::RegenerateMessageReqPayload.new(
|
26
|
+
completion_first: null,
|
27
|
+
filters: null,
|
28
|
+
frequency_penalty: null,
|
29
|
+
highlight_citations: null,
|
30
|
+
highlight_delimiters: null,
|
31
|
+
max_tokens: null,
|
32
|
+
presence_penalty: null,
|
33
|
+
search_type: null,
|
34
|
+
stop_tokens: null,
|
35
|
+
stream_response: null,
|
36
|
+
temperature: null,
|
37
|
+
topic_id: null
|
38
|
+
)
|
39
|
+
```
|
40
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# TrieveRubyClient::RemoveChunkFromGroupReqPayload
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **chunk_id** | **String** | Id of the chunk to remove from the group. | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'trieve_ruby_client'
|
13
|
+
|
14
|
+
instance = TrieveRubyClient::RemoveChunkFromGroupReqPayload.new(
|
15
|
+
chunk_id: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
data/docs/ScoreChunkDTO.md
CHANGED
@@ -4,7 +4,8 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **
|
7
|
+
| **highlights** | **Array<String>** | | [optional] |
|
8
|
+
| **metadata** | [**Array<ChunkMetadataTypes>**](ChunkMetadataTypes.md) | | |
|
8
9
|
| **score** | **Float** | | |
|
9
10
|
|
10
11
|
## Example
|
@@ -13,6 +14,7 @@
|
|
13
14
|
require 'trieve_ruby_client'
|
14
15
|
|
15
16
|
instance = TrieveRubyClient::ScoreChunkDTO.new(
|
17
|
+
highlights: null,
|
16
18
|
metadata: null,
|
17
19
|
score: null
|
18
20
|
)
|
data/docs/SearchChunkData.md
CHANGED
@@ -4,18 +4,21 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **
|
7
|
+
| **content_only** | **Boolean** | Set content_only to true to only returning the chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement (typically 10-50ms). Default is false. | [optional] |
|
8
8
|
| **filters** | [**ChunkFilter**](ChunkFilter.md) | | [optional] |
|
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
|
-
| **get_total_pages** | **Boolean** | Get total page count for the query accounting for the applied filters. Defaults to
|
10
|
+
| **get_total_pages** | **Boolean** | Get total page count for the query accounting for the applied filters. Defaults to false, but can be set to true when the latency penalty is acceptable (typically 50-200ms). | [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
|
-
| **highlight_results** | **Boolean** | Set highlight_results to
|
12
|
+
| **highlight_results** | **Boolean** | Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add `<b><mark>` tags to the chunk_html of the chunks to highlight matching sub-sentences. | [optional] |
|
13
|
+
| **highlight_threshold** | **Float** | Set highlight_threshold to a lower or higher value to adjust the sensitivity of the highlights applied to the chunk html. If not specified, this defaults to 0.8. The range is 0.0 to 1.0. | [optional] |
|
13
14
|
| **page** | **Integer** | Page of chunks to fetch. Page is 1-indexed. | [optional] |
|
14
15
|
| **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] |
|
15
16
|
| **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. | |
|
17
|
+
| **recency_bias** | **Float** | Recency Bias lets you determine how much of an effect the recency of chunks will have on the search results. If not specified, this defaults to 0.0. We recommend setting this to 1.0 for a gentle reranking of the results, >3.0 for a strong reranking of the results. | [optional] |
|
16
18
|
| **score_threshold** | **Float** | Set score_threshold to a float to filter out chunks with a score below the threshold. | [optional] |
|
17
|
-
| **search_type** | **String** | Can be either \"semantic\", \"fulltext\", or \"hybrid\". \"hybrid\"
|
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] |
|
19
|
+
| **search_type** | **String** | Can be either \"semantic\", \"fulltext\", or \"hybrid\". If specified as \"hybrid\", it 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. | |
|
20
|
+
| **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 (typically 10-50ms). Default is false. | [optional] |
|
21
|
+
| **tag_weights** | **Hash<String, Float>** | Tag weights is a JSON object which can be used to boost the ranking of chunks with certain tags. This is useful for when you want to be able to bias towards chunks with a certain tag on the fly. The keys are the tag names and the values are the weights. | [optional] |
|
19
22
|
| **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] |
|
20
23
|
|
21
24
|
## Example
|
@@ -24,18 +27,21 @@
|
|
24
27
|
require 'trieve_ruby_client'
|
25
28
|
|
26
29
|
instance = TrieveRubyClient::SearchChunkData.new(
|
27
|
-
|
30
|
+
content_only: null,
|
28
31
|
filters: null,
|
29
32
|
get_collisions: null,
|
30
33
|
get_total_pages: null,
|
31
34
|
highlight_delimiters: null,
|
32
35
|
highlight_results: null,
|
36
|
+
highlight_threshold: null,
|
33
37
|
page: null,
|
34
38
|
page_size: null,
|
35
39
|
query: null,
|
40
|
+
recency_bias: null,
|
36
41
|
score_threshold: null,
|
37
42
|
search_type: null,
|
38
43
|
slim_chunks: null,
|
44
|
+
tag_weights: null,
|
39
45
|
use_weights: null
|
40
46
|
)
|
41
47
|
```
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# TrieveRubyClient::SearchChunksReqPayload
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **content_only** | **Boolean** | Set content_only to true to only returning the chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement (typically 10-50ms). Default is false. | [optional] |
|
8
|
+
| **filters** | [**ChunkFilter**](ChunkFilter.md) | | [optional] |
|
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
|
+
| **get_total_pages** | **Boolean** | Get total page count for the query accounting for the applied filters. Defaults to false, but can be set to true when the latency penalty is acceptable (typically 50-200ms). | [optional] |
|
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 [\"?\", \",\", \".\", \"!\"]. These are the characters that will be used to split the chunk_html into splits for highlighting. These are the characters that will be used to split the chunk_html into splits for highlighting. | [optional] |
|
12
|
+
| **highlight_max_length** | **Integer** | Set highlight_max_length to control the maximum number of tokens (typically whitespace separated strings, but sometimes also word stems) which can be present within a single highlight. If not specified, this defaults to 8. This is useful to shorten large splits which may have low scores due to length compared to the query. Set to something very large like 100 to highlight entire splits. | [optional] |
|
13
|
+
| **highlight_max_num** | **Integer** | Set highlight_max_num to control the maximum number of highlights per chunk. If not specified, this defaults to 3. It may be less than 3 if no snippets score above the highlight_threshold. | [optional] |
|
14
|
+
| **highlight_results** | **Boolean** | Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add `<b><mark>` tags to the chunk_html of the chunks to highlight matching splits and return the highlights on each scored chunk in the response. | [optional] |
|
15
|
+
| **highlight_threshold** | **Float** | Set highlight_threshold to a lower or higher value to adjust the sensitivity of the highlights applied to the chunk html. If not specified, this defaults to 0.8. The range is 0.0 to 1.0. | [optional] |
|
16
|
+
| **highlight_window** | **Integer** | Set highlight_window to a number to control the amount of words that are returned around the matched phrases. If not specified, this defaults to 0. This is useful for when you want to show more context around the matched words. When specified, window/2 whitespace separated words are added before and after each highlight in the response's highlights array. If an extended highlight overlaps with another highlight, the overlapping words are only included once. | [optional] |
|
17
|
+
| **page** | **Integer** | Page of chunks to fetch. Page is 1-indexed. | [optional] |
|
18
|
+
| **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] |
|
19
|
+
| **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. | |
|
20
|
+
| **recency_bias** | **Float** | Recency Bias lets you determine how much of an effect the recency of chunks will have on the search results. If not specified, this defaults to 0.0. We recommend setting this to 1.0 for a gentle reranking of the results, >3.0 for a strong reranking of the results. | [optional] |
|
21
|
+
| **score_threshold** | **Float** | Set score_threshold to a float to filter out chunks with a score below the threshold. | [optional] |
|
22
|
+
| **search_type** | **String** | Can be either \"semantic\", \"fulltext\", or \"hybrid\". If specified as \"hybrid\", it 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. | |
|
23
|
+
| **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 (typically 10-50ms). Default is false. | [optional] |
|
24
|
+
| **tag_weights** | **Hash<String, Float>** | Tag weights is a JSON object which can be used to boost the ranking of chunks with certain tags. This is useful for when you want to be able to bias towards chunks with a certain tag on the fly. The keys are the tag names and the values are the weights. | [optional] |
|
25
|
+
| **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] |
|
26
|
+
|
27
|
+
## Example
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
require 'trieve_ruby_client'
|
31
|
+
|
32
|
+
instance = TrieveRubyClient::SearchChunksReqPayload.new(
|
33
|
+
content_only: null,
|
34
|
+
filters: null,
|
35
|
+
get_collisions: null,
|
36
|
+
get_total_pages: null,
|
37
|
+
highlight_delimiters: null,
|
38
|
+
highlight_max_length: null,
|
39
|
+
highlight_max_num: null,
|
40
|
+
highlight_results: null,
|
41
|
+
highlight_threshold: null,
|
42
|
+
highlight_window: null,
|
43
|
+
page: null,
|
44
|
+
page_size: null,
|
45
|
+
query: null,
|
46
|
+
recency_bias: null,
|
47
|
+
score_threshold: null,
|
48
|
+
search_type: null,
|
49
|
+
slim_chunks: null,
|
50
|
+
tag_weights: null,
|
51
|
+
use_weights: null
|
52
|
+
)
|
53
|
+
```
|
54
|
+
|