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
@@ -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
|
@@ -23,8 +23,12 @@ module TrieveRubyClient
|
|
23
23
|
|
24
24
|
attr_accessor :id
|
25
25
|
|
26
|
+
attr_accessor :metadata
|
27
|
+
|
26
28
|
attr_accessor :name
|
27
29
|
|
30
|
+
attr_accessor :tag_set
|
31
|
+
|
28
32
|
attr_accessor :tracking_id
|
29
33
|
|
30
34
|
attr_accessor :updated_at
|
@@ -36,7 +40,9 @@ module TrieveRubyClient
|
|
36
40
|
:'dataset_id' => :'dataset_id',
|
37
41
|
:'description' => :'description',
|
38
42
|
:'id' => :'id',
|
43
|
+
:'metadata' => :'metadata',
|
39
44
|
:'name' => :'name',
|
45
|
+
:'tag_set' => :'tag_set',
|
40
46
|
:'tracking_id' => :'tracking_id',
|
41
47
|
:'updated_at' => :'updated_at'
|
42
48
|
}
|
@@ -54,7 +60,9 @@ module TrieveRubyClient
|
|
54
60
|
:'dataset_id' => :'String',
|
55
61
|
:'description' => :'String',
|
56
62
|
:'id' => :'String',
|
63
|
+
:'metadata' => :'Object',
|
57
64
|
:'name' => :'String',
|
65
|
+
:'tag_set' => :'String',
|
58
66
|
:'tracking_id' => :'String',
|
59
67
|
:'updated_at' => :'Time'
|
60
68
|
}
|
@@ -63,6 +71,8 @@ module TrieveRubyClient
|
|
63
71
|
# List of attributes with nullable: true
|
64
72
|
def self.openapi_nullable
|
65
73
|
Set.new([
|
74
|
+
:'metadata',
|
75
|
+
:'tag_set',
|
66
76
|
:'tracking_id',
|
67
77
|
])
|
68
78
|
end
|
@@ -106,12 +116,20 @@ module TrieveRubyClient
|
|
106
116
|
self.id = nil
|
107
117
|
end
|
108
118
|
|
119
|
+
if attributes.key?(:'metadata')
|
120
|
+
self.metadata = attributes[:'metadata']
|
121
|
+
end
|
122
|
+
|
109
123
|
if attributes.key?(:'name')
|
110
124
|
self.name = attributes[:'name']
|
111
125
|
else
|
112
126
|
self.name = nil
|
113
127
|
end
|
114
128
|
|
129
|
+
if attributes.key?(:'tag_set')
|
130
|
+
self.tag_set = attributes[:'tag_set']
|
131
|
+
end
|
132
|
+
|
115
133
|
if attributes.key?(:'tracking_id')
|
116
134
|
self.tracking_id = attributes[:'tracking_id']
|
117
135
|
end
|
@@ -177,7 +195,9 @@ module TrieveRubyClient
|
|
177
195
|
dataset_id == o.dataset_id &&
|
178
196
|
description == o.description &&
|
179
197
|
id == o.id &&
|
198
|
+
metadata == o.metadata &&
|
180
199
|
name == o.name &&
|
200
|
+
tag_set == o.tag_set &&
|
181
201
|
tracking_id == o.tracking_id &&
|
182
202
|
updated_at == o.updated_at
|
183
203
|
end
|
@@ -191,7 +211,7 @@ module TrieveRubyClient
|
|
191
211
|
# Calculates hash code according to all attributes.
|
192
212
|
# @return [Integer] Hash code
|
193
213
|
def hash
|
194
|
-
[created_at, dataset_id, description, id, name, tracking_id, updated_at].hash
|
214
|
+
[created_at, dataset_id, description, id, metadata, name, tag_set, tracking_id, updated_at].hash
|
195
215
|
end
|
196
216
|
|
197
217
|
# Builds the object from hash
|
@@ -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
|
@@ -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
|
@@ -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.0
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -0,0 +1,387 @@
|
|
1
|
+
=begin
|
2
|
+
#Trieve API
|
3
|
+
|
4
|
+
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.6.2
|
7
|
+
Contact: developers@trieve.ai
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module TrieveRubyClient
|
17
|
+
class ChunkMetadataWithScore
|
18
|
+
attr_accessor :chunk_html
|
19
|
+
|
20
|
+
attr_accessor :content
|
21
|
+
|
22
|
+
attr_accessor :created_at
|
23
|
+
|
24
|
+
attr_accessor :dataset_id
|
25
|
+
|
26
|
+
attr_accessor :id
|
27
|
+
|
28
|
+
attr_accessor :link
|
29
|
+
|
30
|
+
attr_accessor :metadata
|
31
|
+
|
32
|
+
attr_accessor :qdrant_point_id
|
33
|
+
|
34
|
+
attr_accessor :score
|
35
|
+
|
36
|
+
attr_accessor :tag_set
|
37
|
+
|
38
|
+
attr_accessor :time_stamp
|
39
|
+
|
40
|
+
attr_accessor :tracking_id
|
41
|
+
|
42
|
+
attr_accessor :updated_at
|
43
|
+
|
44
|
+
attr_accessor :weight
|
45
|
+
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
47
|
+
def self.attribute_map
|
48
|
+
{
|
49
|
+
:'chunk_html' => :'chunk_html',
|
50
|
+
:'content' => :'content',
|
51
|
+
:'created_at' => :'created_at',
|
52
|
+
:'dataset_id' => :'dataset_id',
|
53
|
+
:'id' => :'id',
|
54
|
+
:'link' => :'link',
|
55
|
+
:'metadata' => :'metadata',
|
56
|
+
:'qdrant_point_id' => :'qdrant_point_id',
|
57
|
+
:'score' => :'score',
|
58
|
+
:'tag_set' => :'tag_set',
|
59
|
+
:'time_stamp' => :'time_stamp',
|
60
|
+
:'tracking_id' => :'tracking_id',
|
61
|
+
:'updated_at' => :'updated_at',
|
62
|
+
:'weight' => :'weight'
|
63
|
+
}
|
64
|
+
end
|
65
|
+
|
66
|
+
# Returns all the JSON keys this model knows about
|
67
|
+
def self.acceptable_attributes
|
68
|
+
attribute_map.values
|
69
|
+
end
|
70
|
+
|
71
|
+
# Attribute type mapping.
|
72
|
+
def self.openapi_types
|
73
|
+
{
|
74
|
+
:'chunk_html' => :'String',
|
75
|
+
:'content' => :'String',
|
76
|
+
:'created_at' => :'Time',
|
77
|
+
:'dataset_id' => :'String',
|
78
|
+
:'id' => :'String',
|
79
|
+
:'link' => :'String',
|
80
|
+
:'metadata' => :'Object',
|
81
|
+
:'qdrant_point_id' => :'String',
|
82
|
+
:'score' => :'Float',
|
83
|
+
:'tag_set' => :'String',
|
84
|
+
:'time_stamp' => :'Time',
|
85
|
+
:'tracking_id' => :'String',
|
86
|
+
:'updated_at' => :'Time',
|
87
|
+
:'weight' => :'Float'
|
88
|
+
}
|
89
|
+
end
|
90
|
+
|
91
|
+
# List of attributes with nullable: true
|
92
|
+
def self.openapi_nullable
|
93
|
+
Set.new([
|
94
|
+
:'chunk_html',
|
95
|
+
:'link',
|
96
|
+
:'metadata',
|
97
|
+
:'qdrant_point_id',
|
98
|
+
:'tag_set',
|
99
|
+
:'time_stamp',
|
100
|
+
:'tracking_id',
|
101
|
+
])
|
102
|
+
end
|
103
|
+
|
104
|
+
# Initializes the object
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
106
|
+
def initialize(attributes = {})
|
107
|
+
if (!attributes.is_a?(Hash))
|
108
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrieveRubyClient::ChunkMetadataWithScore` initialize method"
|
109
|
+
end
|
110
|
+
|
111
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
112
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
113
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
114
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrieveRubyClient::ChunkMetadataWithScore`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
115
|
+
end
|
116
|
+
h[k.to_sym] = v
|
117
|
+
}
|
118
|
+
|
119
|
+
if attributes.key?(:'chunk_html')
|
120
|
+
self.chunk_html = attributes[:'chunk_html']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.key?(:'content')
|
124
|
+
self.content = attributes[:'content']
|
125
|
+
else
|
126
|
+
self.content = nil
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.key?(:'created_at')
|
130
|
+
self.created_at = attributes[:'created_at']
|
131
|
+
else
|
132
|
+
self.created_at = nil
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.key?(:'dataset_id')
|
136
|
+
self.dataset_id = attributes[:'dataset_id']
|
137
|
+
else
|
138
|
+
self.dataset_id = nil
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.key?(:'id')
|
142
|
+
self.id = attributes[:'id']
|
143
|
+
else
|
144
|
+
self.id = nil
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.key?(:'link')
|
148
|
+
self.link = attributes[:'link']
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.key?(:'metadata')
|
152
|
+
self.metadata = attributes[:'metadata']
|
153
|
+
end
|
154
|
+
|
155
|
+
if attributes.key?(:'qdrant_point_id')
|
156
|
+
self.qdrant_point_id = attributes[:'qdrant_point_id']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.key?(:'score')
|
160
|
+
self.score = attributes[:'score']
|
161
|
+
else
|
162
|
+
self.score = nil
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes.key?(:'tag_set')
|
166
|
+
self.tag_set = attributes[:'tag_set']
|
167
|
+
end
|
168
|
+
|
169
|
+
if attributes.key?(:'time_stamp')
|
170
|
+
self.time_stamp = attributes[:'time_stamp']
|
171
|
+
end
|
172
|
+
|
173
|
+
if attributes.key?(:'tracking_id')
|
174
|
+
self.tracking_id = attributes[:'tracking_id']
|
175
|
+
end
|
176
|
+
|
177
|
+
if attributes.key?(:'updated_at')
|
178
|
+
self.updated_at = attributes[:'updated_at']
|
179
|
+
else
|
180
|
+
self.updated_at = nil
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.key?(:'weight')
|
184
|
+
self.weight = attributes[:'weight']
|
185
|
+
else
|
186
|
+
self.weight = nil
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
191
|
+
# @return Array for valid properties with the reasons
|
192
|
+
def list_invalid_properties
|
193
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
194
|
+
invalid_properties = Array.new
|
195
|
+
if @content.nil?
|
196
|
+
invalid_properties.push('invalid value for "content", content cannot be nil.')
|
197
|
+
end
|
198
|
+
|
199
|
+
if @created_at.nil?
|
200
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
201
|
+
end
|
202
|
+
|
203
|
+
if @dataset_id.nil?
|
204
|
+
invalid_properties.push('invalid value for "dataset_id", dataset_id cannot be nil.')
|
205
|
+
end
|
206
|
+
|
207
|
+
if @id.nil?
|
208
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
209
|
+
end
|
210
|
+
|
211
|
+
if @score.nil?
|
212
|
+
invalid_properties.push('invalid value for "score", score cannot be nil.')
|
213
|
+
end
|
214
|
+
|
215
|
+
if @updated_at.nil?
|
216
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
217
|
+
end
|
218
|
+
|
219
|
+
if @weight.nil?
|
220
|
+
invalid_properties.push('invalid value for "weight", weight cannot be nil.')
|
221
|
+
end
|
222
|
+
|
223
|
+
invalid_properties
|
224
|
+
end
|
225
|
+
|
226
|
+
# Check to see if the all the properties in the model are valid
|
227
|
+
# @return true if the model is valid
|
228
|
+
def valid?
|
229
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
230
|
+
return false if @content.nil?
|
231
|
+
return false if @created_at.nil?
|
232
|
+
return false if @dataset_id.nil?
|
233
|
+
return false if @id.nil?
|
234
|
+
return false if @score.nil?
|
235
|
+
return false if @updated_at.nil?
|
236
|
+
return false if @weight.nil?
|
237
|
+
true
|
238
|
+
end
|
239
|
+
|
240
|
+
# Checks equality by comparing each attribute.
|
241
|
+
# @param [Object] Object to be compared
|
242
|
+
def ==(o)
|
243
|
+
return true if self.equal?(o)
|
244
|
+
self.class == o.class &&
|
245
|
+
chunk_html == o.chunk_html &&
|
246
|
+
content == o.content &&
|
247
|
+
created_at == o.created_at &&
|
248
|
+
dataset_id == o.dataset_id &&
|
249
|
+
id == o.id &&
|
250
|
+
link == o.link &&
|
251
|
+
metadata == o.metadata &&
|
252
|
+
qdrant_point_id == o.qdrant_point_id &&
|
253
|
+
score == o.score &&
|
254
|
+
tag_set == o.tag_set &&
|
255
|
+
time_stamp == o.time_stamp &&
|
256
|
+
tracking_id == o.tracking_id &&
|
257
|
+
updated_at == o.updated_at &&
|
258
|
+
weight == o.weight
|
259
|
+
end
|
260
|
+
|
261
|
+
# @see the `==` method
|
262
|
+
# @param [Object] Object to be compared
|
263
|
+
def eql?(o)
|
264
|
+
self == o
|
265
|
+
end
|
266
|
+
|
267
|
+
# Calculates hash code according to all attributes.
|
268
|
+
# @return [Integer] Hash code
|
269
|
+
def hash
|
270
|
+
[chunk_html, content, created_at, dataset_id, id, link, metadata, qdrant_point_id, score, tag_set, time_stamp, tracking_id, updated_at, weight].hash
|
271
|
+
end
|
272
|
+
|
273
|
+
# Builds the object from hash
|
274
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
275
|
+
# @return [Object] Returns the model itself
|
276
|
+
def self.build_from_hash(attributes)
|
277
|
+
return nil unless attributes.is_a?(Hash)
|
278
|
+
attributes = attributes.transform_keys(&:to_sym)
|
279
|
+
transformed_hash = {}
|
280
|
+
openapi_types.each_pair do |key, type|
|
281
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
282
|
+
transformed_hash["#{key}"] = nil
|
283
|
+
elsif type =~ /\AArray<(.*)>/i
|
284
|
+
# check to ensure the input is an array given that the attribute
|
285
|
+
# is documented as an array but the input is not
|
286
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
287
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
288
|
+
end
|
289
|
+
elsif !attributes[attribute_map[key]].nil?
|
290
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
291
|
+
end
|
292
|
+
end
|
293
|
+
new(transformed_hash)
|
294
|
+
end
|
295
|
+
|
296
|
+
# Deserializes the data based on type
|
297
|
+
# @param string type Data type
|
298
|
+
# @param string value Value to be deserialized
|
299
|
+
# @return [Object] Deserialized data
|
300
|
+
def self._deserialize(type, value)
|
301
|
+
case type.to_sym
|
302
|
+
when :Time
|
303
|
+
Time.parse(value)
|
304
|
+
when :Date
|
305
|
+
Date.parse(value)
|
306
|
+
when :String
|
307
|
+
value.to_s
|
308
|
+
when :Integer
|
309
|
+
value.to_i
|
310
|
+
when :Float
|
311
|
+
value.to_f
|
312
|
+
when :Boolean
|
313
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
314
|
+
true
|
315
|
+
else
|
316
|
+
false
|
317
|
+
end
|
318
|
+
when :Object
|
319
|
+
# generic object (usually a Hash), return directly
|
320
|
+
value
|
321
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
322
|
+
inner_type = Regexp.last_match[:inner_type]
|
323
|
+
value.map { |v| _deserialize(inner_type, v) }
|
324
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
325
|
+
k_type = Regexp.last_match[:k_type]
|
326
|
+
v_type = Regexp.last_match[:v_type]
|
327
|
+
{}.tap do |hash|
|
328
|
+
value.each do |k, v|
|
329
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
330
|
+
end
|
331
|
+
end
|
332
|
+
else # model
|
333
|
+
# models (e.g. Pet) or oneOf
|
334
|
+
klass = TrieveRubyClient.const_get(type)
|
335
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
336
|
+
end
|
337
|
+
end
|
338
|
+
|
339
|
+
# Returns the string representation of the object
|
340
|
+
# @return [String] String presentation of the object
|
341
|
+
def to_s
|
342
|
+
to_hash.to_s
|
343
|
+
end
|
344
|
+
|
345
|
+
# to_body is an alias to to_hash (backward compatibility)
|
346
|
+
# @return [Hash] Returns the object in the form of hash
|
347
|
+
def to_body
|
348
|
+
to_hash
|
349
|
+
end
|
350
|
+
|
351
|
+
# Returns the object in the form of hash
|
352
|
+
# @return [Hash] Returns the object in the form of hash
|
353
|
+
def to_hash
|
354
|
+
hash = {}
|
355
|
+
self.class.attribute_map.each_pair do |attr, param|
|
356
|
+
value = self.send(attr)
|
357
|
+
if value.nil?
|
358
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
359
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
360
|
+
end
|
361
|
+
|
362
|
+
hash[param] = _to_hash(value)
|
363
|
+
end
|
364
|
+
hash
|
365
|
+
end
|
366
|
+
|
367
|
+
# Outputs non-array value in the form of hash
|
368
|
+
# For object, use to_hash. Otherwise, just return the value
|
369
|
+
# @param [Object] value Any valid value
|
370
|
+
# @return [Hash] Returns the value in the form of hash
|
371
|
+
def _to_hash(value)
|
372
|
+
if value.is_a?(Array)
|
373
|
+
value.compact.map { |v| _to_hash(v) }
|
374
|
+
elsif value.is_a?(Hash)
|
375
|
+
{}.tap do |hash|
|
376
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
377
|
+
end
|
378
|
+
elsif value.respond_to? :to_hash
|
379
|
+
value.to_hash
|
380
|
+
else
|
381
|
+
value
|
382
|
+
end
|
383
|
+
end
|
384
|
+
|
385
|
+
end
|
386
|
+
|
387
|
+
end
|
@@ -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
|
@@ -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
|
@@ -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
|
@@ -18,9 +18,15 @@ module TrieveRubyClient
|
|
18
18
|
# Description to assign to the chunk_group. Convenience field for you to avoid having to remember what the group is for.
|
19
19
|
attr_accessor :description
|
20
20
|
|
21
|
+
# 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.
|
22
|
+
attr_accessor :metadata
|
23
|
+
|
21
24
|
# Name to assign to the chunk_group. Does not need to be unique.
|
22
25
|
attr_accessor :name
|
23
26
|
|
27
|
+
# 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.
|
28
|
+
attr_accessor :tag_set
|
29
|
+
|
24
30
|
# Optional tracking id to assign to the chunk_group. This is a unique identifier for the chunk_group.
|
25
31
|
attr_accessor :tracking_id
|
26
32
|
|
@@ -28,7 +34,9 @@ module TrieveRubyClient
|
|
28
34
|
def self.attribute_map
|
29
35
|
{
|
30
36
|
:'description' => :'description',
|
37
|
+
:'metadata' => :'metadata',
|
31
38
|
:'name' => :'name',
|
39
|
+
:'tag_set' => :'tag_set',
|
32
40
|
:'tracking_id' => :'tracking_id'
|
33
41
|
}
|
34
42
|
end
|
@@ -42,7 +50,9 @@ module TrieveRubyClient
|
|
42
50
|
def self.openapi_types
|
43
51
|
{
|
44
52
|
:'description' => :'String',
|
53
|
+
:'metadata' => :'Object',
|
45
54
|
:'name' => :'String',
|
55
|
+
:'tag_set' => :'Array<String>',
|
46
56
|
:'tracking_id' => :'String'
|
47
57
|
}
|
48
58
|
end
|
@@ -50,6 +60,9 @@ module TrieveRubyClient
|
|
50
60
|
# List of attributes with nullable: true
|
51
61
|
def self.openapi_nullable
|
52
62
|
Set.new([
|
63
|
+
:'description',
|
64
|
+
:'metadata',
|
65
|
+
:'tag_set',
|
53
66
|
:'tracking_id'
|
54
67
|
])
|
55
68
|
end
|
@@ -71,8 +84,10 @@ module TrieveRubyClient
|
|
71
84
|
|
72
85
|
if attributes.key?(:'description')
|
73
86
|
self.description = attributes[:'description']
|
74
|
-
|
75
|
-
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'metadata')
|
90
|
+
self.metadata = attributes[:'metadata']
|
76
91
|
end
|
77
92
|
|
78
93
|
if attributes.key?(:'name')
|
@@ -81,6 +96,12 @@ module TrieveRubyClient
|
|
81
96
|
self.name = nil
|
82
97
|
end
|
83
98
|
|
99
|
+
if attributes.key?(:'tag_set')
|
100
|
+
if (value = attributes[:'tag_set']).is_a?(Array)
|
101
|
+
self.tag_set = value
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
84
105
|
if attributes.key?(:'tracking_id')
|
85
106
|
self.tracking_id = attributes[:'tracking_id']
|
86
107
|
end
|
@@ -91,10 +112,6 @@ module TrieveRubyClient
|
|
91
112
|
def list_invalid_properties
|
92
113
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
93
114
|
invalid_properties = Array.new
|
94
|
-
if @description.nil?
|
95
|
-
invalid_properties.push('invalid value for "description", description cannot be nil.')
|
96
|
-
end
|
97
|
-
|
98
115
|
if @name.nil?
|
99
116
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
100
117
|
end
|
@@ -106,7 +123,6 @@ module TrieveRubyClient
|
|
106
123
|
# @return true if the model is valid
|
107
124
|
def valid?
|
108
125
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
109
|
-
return false if @description.nil?
|
110
126
|
return false if @name.nil?
|
111
127
|
true
|
112
128
|
end
|
@@ -117,7 +133,9 @@ module TrieveRubyClient
|
|
117
133
|
return true if self.equal?(o)
|
118
134
|
self.class == o.class &&
|
119
135
|
description == o.description &&
|
136
|
+
metadata == o.metadata &&
|
120
137
|
name == o.name &&
|
138
|
+
tag_set == o.tag_set &&
|
121
139
|
tracking_id == o.tracking_id
|
122
140
|
end
|
123
141
|
|
@@ -130,7 +148,7 @@ module TrieveRubyClient
|
|
130
148
|
# Calculates hash code according to all attributes.
|
131
149
|
# @return [Integer] Hash code
|
132
150
|
def hash
|
133
|
-
[description, name, tracking_id].hash
|
151
|
+
[description, metadata, name, tag_set, tracking_id].hash
|
134
152
|
end
|
135
153
|
|
136
154
|
# Builds the object from hash
|
@@ -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
|
@@ -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
|
@@ -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
|
@@ -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
|
@@ -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
|