trieve_ruby_client 0.6.9 → 0.7.6

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.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -8
  3. data/docs/ChunkApi.md +158 -10
  4. data/docs/ChunkData.md +2 -2
  5. data/docs/ChunkMetadata.md +2 -0
  6. data/docs/ClientDatasetConfiguration.md +2 -0
  7. data/docs/CreateMessageData.md +0 -2
  8. data/docs/CreateTopicData.md +3 -3
  9. data/docs/EditMessageData.md +0 -2
  10. data/docs/FieldCondition.md +6 -0
  11. data/docs/FileApi.md +4 -6
  12. data/docs/GenerateChunksRequest.md +0 -2
  13. data/docs/GeoInfo.md +20 -0
  14. data/docs/GeoTypes.md +49 -0
  15. data/docs/GetChunksData.md +18 -0
  16. data/docs/GetEventsData.md +1 -1
  17. data/docs/GetTrackingChunksData.md +18 -0
  18. data/docs/LocationBoundingBox.md +20 -0
  19. data/docs/LocationPolygon.md +20 -0
  20. data/docs/LocationRadius.md +20 -0
  21. data/docs/RangeCondition.md +2 -0
  22. data/docs/RegenerateMessageData.md +0 -2
  23. data/docs/SlimChunkMetadata.md +4 -0
  24. data/docs/Topic.md +3 -3
  25. data/docs/TopicApi.md +17 -17
  26. data/docs/UpdateChunkData.md +2 -0
  27. data/docs/UpdateUserOrgRoleData.md +22 -0
  28. data/docs/UserApi.md +9 -10
  29. data/lib/trieve_ruby_client/api/auth_api.rb +1 -1
  30. data/lib/trieve_ruby_client/api/chunk_api.rb +161 -11
  31. data/lib/trieve_ruby_client/api/chunk_group_api.rb +1 -1
  32. data/lib/trieve_ruby_client/api/dataset_api.rb +1 -1
  33. data/lib/trieve_ruby_client/api/events_api.rb +1 -1
  34. data/lib/trieve_ruby_client/api/file_api.rb +4 -11
  35. data/lib/trieve_ruby_client/api/health_api.rb +1 -1
  36. data/lib/trieve_ruby_client/api/invitation_api.rb +1 -1
  37. data/lib/trieve_ruby_client/api/message_api.rb +1 -1
  38. data/lib/trieve_ruby_client/api/organization_api.rb +1 -1
  39. data/lib/trieve_ruby_client/api/stripe_api.rb +1 -1
  40. data/lib/trieve_ruby_client/api/topic_api.rb +20 -20
  41. data/lib/trieve_ruby_client/api/user_api.rb +14 -14
  42. data/lib/trieve_ruby_client/api_client.rb +1 -1
  43. data/lib/trieve_ruby_client/api_error.rb +1 -1
  44. data/lib/trieve_ruby_client/configuration.rb +1 -1
  45. data/lib/trieve_ruby_client/models/add_chunk_to_group_data.rb +1 -1
  46. data/lib/trieve_ruby_client/models/api_key_dto.rb +1 -1
  47. data/lib/trieve_ruby_client/models/auth_query.rb +1 -1
  48. data/lib/trieve_ruby_client/models/batch_queued_chunk_response.rb +1 -1
  49. data/lib/trieve_ruby_client/models/bookmark_data.rb +1 -1
  50. data/lib/trieve_ruby_client/models/bookmark_group_result.rb +1 -1
  51. data/lib/trieve_ruby_client/models/chat_message_proxy.rb +1 -1
  52. data/lib/trieve_ruby_client/models/chunk_data.rb +12 -13
  53. data/lib/trieve_ruby_client/models/chunk_filter.rb +1 -1
  54. data/lib/trieve_ruby_client/models/chunk_group.rb +1 -1
  55. data/lib/trieve_ruby_client/models/chunk_group_and_file.rb +1 -1
  56. data/lib/trieve_ruby_client/models/chunk_metadata.rb +12 -2
  57. data/lib/trieve_ruby_client/models/chunk_metadata_with_score.rb +1 -1
  58. data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +18 -2
  59. data/lib/trieve_ruby_client/models/create_chunk_data.rb +1 -1
  60. data/lib/trieve_ruby_client/models/create_chunk_group_data.rb +1 -1
  61. data/lib/trieve_ruby_client/models/create_dataset_request.rb +1 -1
  62. data/lib/trieve_ruby_client/models/create_message_data.rb +2 -13
  63. data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
  64. data/lib/trieve_ruby_client/models/create_topic_data.rb +23 -17
  65. data/lib/trieve_ruby_client/models/dataset.rb +1 -1
  66. data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
  67. data/lib/trieve_ruby_client/models/dataset_dto.rb +1 -1
  68. data/lib/trieve_ruby_client/models/dataset_usage_count.rb +1 -1
  69. data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
  70. data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
  71. data/lib/trieve_ruby_client/models/edit_message_data.rb +2 -13
  72. data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
  73. data/lib/trieve_ruby_client/models/event.rb +1 -1
  74. data/lib/trieve_ruby_client/models/event_return.rb +1 -1
  75. data/lib/trieve_ruby_client/models/field_condition.rb +32 -2
  76. data/lib/trieve_ruby_client/models/file.rb +1 -1
  77. data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
  78. data/lib/trieve_ruby_client/models/generate_chunks_request.rb +2 -13
  79. data/lib/trieve_ruby_client/models/geo_info.rb +237 -0
  80. data/lib/trieve_ruby_client/models/geo_types.rb +105 -0
  81. data/lib/trieve_ruby_client/models/get_chunks_data.rb +223 -0
  82. data/lib/trieve_ruby_client/models/get_events_data.rb +2 -2
  83. data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
  84. data/lib/trieve_ruby_client/models/get_tracking_chunks_data.rb +223 -0
  85. data/lib/trieve_ruby_client/models/group_data.rb +1 -1
  86. data/lib/trieve_ruby_client/models/group_score_chunk.rb +1 -1
  87. data/lib/trieve_ruby_client/models/group_score_slim_chunks.rb +1 -1
  88. data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
  89. data/lib/trieve_ruby_client/models/location_bounding_box.rb +237 -0
  90. data/lib/trieve_ruby_client/models/location_polygon.rb +235 -0
  91. data/lib/trieve_ruby_client/models/location_radius.rb +237 -0
  92. data/lib/trieve_ruby_client/models/match_condition.rb +1 -1
  93. data/lib/trieve_ruby_client/models/message.rb +1 -1
  94. data/lib/trieve_ruby_client/models/organization.rb +1 -1
  95. data/lib/trieve_ruby_client/models/organization_usage_count.rb +1 -1
  96. data/lib/trieve_ruby_client/models/range.rb +1 -1
  97. data/lib/trieve_ruby_client/models/range_condition.rb +2 -1
  98. data/lib/trieve_ruby_client/models/recommend_chunks_request.rb +1 -1
  99. data/lib/trieve_ruby_client/models/recommend_group_chunks_request.rb +1 -1
  100. data/lib/trieve_ruby_client/models/regenerate_message_data.rb +2 -13
  101. data/lib/trieve_ruby_client/models/return_queued_chunk.rb +1 -1
  102. data/lib/trieve_ruby_client/models/score_chunk_dto.rb +1 -1
  103. data/lib/trieve_ruby_client/models/score_slim_chunks.rb +1 -1
  104. data/lib/trieve_ruby_client/models/search_chunk_data.rb +1 -1
  105. data/lib/trieve_ruby_client/models/search_chunk_query_response_body.rb +1 -1
  106. data/lib/trieve_ruby_client/models/search_over_groups_data.rb +1 -1
  107. data/lib/trieve_ruby_client/models/search_over_groups_results.rb +1 -1
  108. data/lib/trieve_ruby_client/models/search_over_groups_slim_results.rb +1 -1
  109. data/lib/trieve_ruby_client/models/search_slim_chunk_query_response_body.rb +1 -1
  110. data/lib/trieve_ruby_client/models/search_within_group_data.rb +1 -1
  111. data/lib/trieve_ruby_client/models/search_within_group_results.rb +1 -1
  112. data/lib/trieve_ruby_client/models/search_within_group_slim_results.rb +1 -1
  113. data/lib/trieve_ruby_client/models/set_user_api_key_request.rb +1 -1
  114. data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
  115. data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +1 -1
  116. data/lib/trieve_ruby_client/models/slim_chunk_metadata.rb +28 -2
  117. data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_score.rb +1 -1
  118. data/lib/trieve_ruby_client/models/slim_group.rb +1 -1
  119. data/lib/trieve_ruby_client/models/slim_user.rb +1 -1
  120. data/lib/trieve_ruby_client/models/stripe_plan.rb +1 -1
  121. data/lib/trieve_ruby_client/models/suggested_queries_request.rb +1 -1
  122. data/lib/trieve_ruby_client/models/suggested_queries_response.rb +1 -1
  123. data/lib/trieve_ruby_client/models/topic.rb +21 -21
  124. data/lib/trieve_ruby_client/models/update_chunk_by_tracking_id_data.rb +1 -1
  125. data/lib/trieve_ruby_client/models/update_chunk_data.rb +12 -2
  126. data/lib/trieve_ruby_client/models/update_chunk_group_data.rb +1 -1
  127. data/lib/trieve_ruby_client/models/update_dataset_request.rb +1 -1
  128. data/lib/trieve_ruby_client/models/update_group_by_tracking_id_data.rb +1 -1
  129. data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
  130. data/lib/trieve_ruby_client/models/update_topic_data.rb +1 -1
  131. data/lib/trieve_ruby_client/models/update_user_org_role_data.rb +250 -0
  132. data/lib/trieve_ruby_client/models/upload_file_data.rb +1 -1
  133. data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
  134. data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
  135. data/lib/trieve_ruby_client/version.rb +2 -2
  136. data/lib/trieve_ruby_client.rb +9 -2
  137. data/openapi-generator.yaml +1 -1
  138. data/openapi.json +360 -83
  139. data/spec/models/geo_info_spec.rb +42 -0
  140. data/spec/models/geo_types_spec.rb +32 -0
  141. data/spec/models/get_chunks_data_spec.rb +36 -0
  142. data/spec/models/get_tracking_chunks_data_spec.rb +36 -0
  143. data/spec/models/location_bounding_box_spec.rb +42 -0
  144. data/spec/models/location_polygon_spec.rb +42 -0
  145. data/spec/models/location_radius_spec.rb +42 -0
  146. data/spec/models/update_user_org_role_data_spec.rb +48 -0
  147. data/spec/spec_helper.rb +1 -1
  148. data/trieve_ruby_client-0.6.9.gem +0 -0
  149. data/trieve_ruby_client-0.7.2.gem +0 -0
  150. data/trieve_ruby_client.gemspec +1 -1
  151. metadata +36 -2
data/openapi.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "name": "BSL",
13
13
  "url": "https://github.com/devflowinc/trieve/blob/main/LICENSE.txt"
14
14
  },
15
- "version": "0.6.9"
15
+ "version": "0.7.6"
16
16
  },
17
17
  "servers": [
18
18
  {
@@ -174,7 +174,7 @@
174
174
  "chunk"
175
175
  ],
176
176
  "summary": "Create or Upsert Chunk or Chunks",
177
- "description": "Create or Upsert Chunk or Chunks\n\nCreate a new chunk. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint.",
177
+ "description": "Create or Upsert Chunk or Chunks\n\nCreate a new chunk. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint.\nIf uploading in bulk, the maximum amount of chunks that can be uploaded at once is 120 chunks.",
178
178
  "operationId": "create_chunk",
179
179
  "parameters": [
180
180
  {
@@ -497,7 +497,7 @@
497
497
  ],
498
498
  "summary": "Search",
499
499
  "description": "Search\n\nThis route provides the primary search functionality for the API. It can be used to search for chunks by semantic similarity, full-text similarity, or a combination of both. Results' `chunk_html` values will be modified with `<b><mark>` tags for sub-sentence highlighting.",
500
- "operationId": "search_chunk",
500
+ "operationId": "search_chunks",
501
501
  "parameters": [
502
502
  {
503
503
  "name": "TR-Dataset",
@@ -664,6 +664,9 @@
664
664
  }
665
665
  }
666
666
  }
667
+ },
668
+ "404": {
669
+ "description": "Chunk not found"
667
670
  }
668
671
  },
669
672
  "security": [
@@ -774,6 +777,9 @@
774
777
  }
775
778
  }
776
779
  }
780
+ },
781
+ "404": {
782
+ "description": "Chunk not found"
777
783
  }
778
784
  },
779
785
  "security": [
@@ -1417,6 +1423,9 @@
1417
1423
  }
1418
1424
  }
1419
1425
  }
1426
+ },
1427
+ "404": {
1428
+ "description": "Group not found"
1420
1429
  }
1421
1430
  },
1422
1431
  "security": [
@@ -1476,6 +1485,9 @@
1476
1485
  }
1477
1486
  }
1478
1487
  }
1488
+ },
1489
+ "404": {
1490
+ "description": "Group not found"
1479
1491
  }
1480
1492
  },
1481
1493
  "security": [
@@ -1711,6 +1723,9 @@
1711
1723
  }
1712
1724
  }
1713
1725
  }
1726
+ },
1727
+ "404": {
1728
+ "description": "Group not found"
1714
1729
  }
1715
1730
  },
1716
1731
  "security": [
@@ -1843,6 +1858,134 @@
1843
1858
  }
1844
1859
  }
1845
1860
  }
1861
+ },
1862
+ "404": {
1863
+ "description": "Group not found"
1864
+ }
1865
+ },
1866
+ "security": [
1867
+ {
1868
+ "ApiKey": [
1869
+ "readonly"
1870
+ ]
1871
+ }
1872
+ ]
1873
+ }
1874
+ },
1875
+ "/api/chunks": {
1876
+ "post": {
1877
+ "tags": [
1878
+ "chunk"
1879
+ ],
1880
+ "summary": "Get Chunks By Ids",
1881
+ "description": "Get Chunks By Ids\n\nGet multiple chunks by multiple ids.",
1882
+ "operationId": "get_chunks_by_ids",
1883
+ "parameters": [
1884
+ {
1885
+ "name": "TR-Dataset",
1886
+ "in": "header",
1887
+ "description": "The dataset id to use for the request",
1888
+ "required": true,
1889
+ "schema": {
1890
+ "type": "string"
1891
+ }
1892
+ }
1893
+ ],
1894
+ "requestBody": {
1895
+ "description": "JSON request payload to get the chunks in the request",
1896
+ "content": {
1897
+ "application/json": {
1898
+ "schema": {
1899
+ "$ref": "#/components/schemas/GetChunksData"
1900
+ }
1901
+ }
1902
+ },
1903
+ "required": true
1904
+ },
1905
+ "responses": {
1906
+ "200": {
1907
+ "description": "chunks with the id that you were searching for",
1908
+ "content": {
1909
+ "application/json": {
1910
+ "schema": {
1911
+ "type": "array",
1912
+ "items": {
1913
+ "$ref": "#/components/schemas/ChunkMetadata"
1914
+ }
1915
+ }
1916
+ }
1917
+ }
1918
+ },
1919
+ "400": {
1920
+ "description": "Service error relating to fidning a chunk by tracking_id",
1921
+ "content": {
1922
+ "application/json": {
1923
+ "schema": {
1924
+ "$ref": "#/components/schemas/ErrorResponseBody"
1925
+ }
1926
+ }
1927
+ }
1928
+ }
1929
+ },
1930
+ "security": [
1931
+ {
1932
+ "ApiKey": [
1933
+ "readonly"
1934
+ ]
1935
+ }
1936
+ ]
1937
+ }
1938
+ },
1939
+ "/api/chunks/tracking": {
1940
+ "post": {
1941
+ "tags": [
1942
+ "chunk"
1943
+ ],
1944
+ "summary": "Get Chunks By TrackingIds",
1945
+ "description": "Get Chunks By TrackingIds\n\nGet multiple chunks by ids.",
1946
+ "operationId": "get_chunks_by_tracking_ids",
1947
+ "parameters": [
1948
+ {
1949
+ "name": "TR-Dataset",
1950
+ "in": "header",
1951
+ "description": "The dataset id to use for the request",
1952
+ "required": true,
1953
+ "schema": {
1954
+ "type": "string"
1955
+ }
1956
+ }
1957
+ ],
1958
+ "requestBody": {
1959
+ "description": "JSON request payload to get the chunks in the request",
1960
+ "content": {
1961
+ "application/json": {
1962
+ "schema": {
1963
+ "$ref": "#/components/schemas/GetTrackingChunksData"
1964
+ }
1965
+ }
1966
+ },
1967
+ "required": true
1968
+ },
1969
+ "responses": {
1970
+ "200": {
1971
+ "description": "chunk with the id that you were searching for",
1972
+ "content": {
1973
+ "application/json": {
1974
+ "schema": {
1975
+ "$ref": "#/components/schemas/ChunkMetadata"
1976
+ }
1977
+ }
1978
+ }
1979
+ },
1980
+ "400": {
1981
+ "description": "Service error relating to fidning a chunk by tracking_id",
1982
+ "content": {
1983
+ "application/json": {
1984
+ "schema": {
1985
+ "$ref": "#/components/schemas/ErrorResponseBody"
1986
+ }
1987
+ }
1988
+ }
1846
1989
  }
1847
1990
  },
1848
1991
  "security": [
@@ -2558,15 +2701,6 @@
2558
2701
  "type": "string",
2559
2702
  "format": "uuid"
2560
2703
  }
2561
- },
2562
- {
2563
- "name": "delete_chunks",
2564
- "in": "query",
2565
- "description": "Whether or not to delete the chunks associated with the file",
2566
- "required": true,
2567
- "schema": {
2568
- "type": "boolean"
2569
- }
2570
2704
  }
2571
2705
  ],
2572
2706
  "responses": {
@@ -3461,7 +3595,7 @@
3461
3595
  "topic"
3462
3596
  ],
3463
3597
  "summary": "Create Topic",
3464
- "description": "Create Topic\n\nCreate a new chat topic. Topics are attached to a user and act as a coordinator for memory of gen-AI chat sessions. We are considering refactoring this resource of the API soon.",
3598
+ "description": "Create Topic\n\nCreate a new chat topic. Topics are attached to a owner_id's and act as a coordinator for conversation message history of gen-AI chat sessions.",
3465
3599
  "operationId": "create_topic",
3466
3600
  "parameters": [
3467
3601
  {
@@ -3568,23 +3702,22 @@
3568
3702
  ]
3569
3703
  }
3570
3704
  },
3571
- "/api/topic/user/{user_id}": {
3705
+ "/api/topic/owner/{owner_id}": {
3572
3706
  "get": {
3573
3707
  "tags": [
3574
3708
  "topic"
3575
3709
  ],
3576
- "summary": "Get All Topics for User",
3577
- "description": "Get All Topics for User\n\nGet all topics belonging to a the auth'ed user. Soon, we plan to allow specification of the user for this route and include pagination.",
3578
- "operationId": "get_all_topics_for_user",
3710
+ "summary": "Get All Topics for Owner ID",
3711
+ "description": "Get All Topics for Owner ID\n\nGet all topics belonging to an arbitary owner_id. This is useful for managing message history and chat sessions. It is common to use a browser fingerprint or your user's id as the owner_id.",
3712
+ "operationId": "get_all_topics_for_owner_id",
3579
3713
  "parameters": [
3580
3714
  {
3581
- "name": "user_id",
3715
+ "name": "owner_id",
3582
3716
  "in": "path",
3583
- "description": "The id of the user to get topics for",
3717
+ "description": "The owner_id to get topics of; A common approach is to use a browser fingerprint or your user's id",
3584
3718
  "required": true,
3585
3719
  "schema": {
3586
- "type": "string",
3587
- "format": "uuid"
3720
+ "type": "string"
3588
3721
  }
3589
3722
  },
3590
3723
  {
@@ -3599,7 +3732,7 @@
3599
3732
  ],
3600
3733
  "responses": {
3601
3734
  "200": {
3602
- "description": "All topics belonging to a given user",
3735
+ "description": "All topics belonging to a given owner_id",
3603
3736
  "content": {
3604
3737
  "application/json": {
3605
3738
  "schema": {
@@ -3612,7 +3745,7 @@
3612
3745
  }
3613
3746
  },
3614
3747
  "400": {
3615
- "description": "Service error relating to topic get",
3748
+ "description": "Service error relating to getting topics for the owner_id",
3616
3749
  "content": {
3617
3750
  "application/json": {
3618
3751
  "schema": {
@@ -3697,22 +3830,15 @@
3697
3830
  "content": {
3698
3831
  "application/json": {
3699
3832
  "schema": {
3700
- "$ref": "#/components/schemas/UpdateUserData"
3833
+ "$ref": "#/components/schemas/UpdateUserOrgRoleData"
3701
3834
  }
3702
3835
  }
3703
3836
  },
3704
3837
  "required": true
3705
3838
  },
3706
3839
  "responses": {
3707
- "200": {
3708
- "description": "JSON body representing the updated user information",
3709
- "content": {
3710
- "application/json": {
3711
- "schema": {
3712
- "$ref": "#/components/schemas/SlimUser"
3713
- }
3714
- }
3715
- }
3840
+ "204": {
3841
+ "description": "Confirmation that the user's role was updated"
3716
3842
  },
3717
3843
  "400": {
3718
3844
  "description": "Service error relating to updating the user",
@@ -4078,12 +4204,6 @@
4078
4204
  "description": "Convert HTML to raw text before processing to avoid adding noise to the vector embeddings. By default this is true. If you are using HTML content that you want to be included in the vector embeddings, set this to false.",
4079
4205
  "nullable": true
4080
4206
  },
4081
- "file_id": {
4082
- "type": "string",
4083
- "format": "uuid",
4084
- "description": "File_uuid is the uuid of the file that the chunk is associated with. This is used to associate chunks with files. This is useful for when you want to delete a file and all of its associated chunks.",
4085
- "nullable": true
4086
- },
4087
4207
  "group_ids": {
4088
4208
  "type": "array",
4089
4209
  "items": {
@@ -4106,6 +4226,14 @@
4106
4226
  "description": "Link to the chunk. This can also be any string. Frequently, this is a link to the source of the chunk. The link value will not affect the embedding creation.",
4107
4227
  "nullable": true
4108
4228
  },
4229
+ "location": {
4230
+ "allOf": [
4231
+ {
4232
+ "$ref": "#/components/schemas/GeoInfo"
4233
+ }
4234
+ ],
4235
+ "nullable": true
4236
+ },
4109
4237
  "metadata": {
4110
4238
  "description": "Metadata is a JSON object which can be used to filter chunks. This is useful for when you want to filter chunks by arbitrary metadata. Unlike with tag filtering, there is a performance hit for filtering on metadata.",
4111
4239
  "nullable": true
@@ -4393,6 +4521,14 @@
4393
4521
  "type": "string",
4394
4522
  "nullable": true
4395
4523
  },
4524
+ "location": {
4525
+ "allOf": [
4526
+ {
4527
+ "$ref": "#/components/schemas/GeoInfo"
4528
+ }
4529
+ ],
4530
+ "nullable": true
4531
+ },
4396
4532
  "metadata": {
4397
4533
  "nullable": true
4398
4534
  },
@@ -4532,7 +4668,8 @@
4532
4668
  "ClientDatasetConfiguration": {
4533
4669
  "type": "object",
4534
4670
  "required": [
4535
- "FILE_NAME_KEY"
4671
+ "FILE_NAME_KEY",
4672
+ "IMAGE_METADATA_KEY"
4536
4673
  ],
4537
4674
  "properties": {
4538
4675
  "CREATE_CHUNK_FEATURE": {
@@ -4557,6 +4694,9 @@
4557
4694
  "type": "string",
4558
4695
  "nullable": true
4559
4696
  },
4697
+ "IMAGE_METADATA_KEY": {
4698
+ "type": "string"
4699
+ },
4560
4700
  "IMAGE_RANGE_END_KEY": {
4561
4701
  "type": "string",
4562
4702
  "nullable": true
@@ -4586,6 +4726,7 @@
4586
4726
  "FILE_NAME_KEY": "file_name_key",
4587
4727
  "FILTER_ITEMS": [],
4588
4728
  "FRONTMATTER_VALS": "frontmatter vals",
4729
+ "IMAGE_METADATA_KEY": ".image_url",
4589
4730
  "IMAGE_RANGE_END_KEY": "image range end key",
4590
4731
  "IMAGE_RANGE_START_KEY": "image range start key",
4591
4732
  "LINES_BEFORE_SHOW_MORE": 10,
@@ -4760,11 +4901,6 @@
4760
4901
  "description": "The delimiters to use for highlighting the citations. If this is not included, the default delimiters will be used. Default is `[\".\", \"!\", \"?\", \"\\n\", \"\\t\", \",\"]`.",
4761
4902
  "nullable": true
4762
4903
  },
4763
- "model": {
4764
- "type": "string",
4765
- "description": "The model to use for the assistant's messages. This can be any model from the openrouter model list. If no model is provided, gpt-3.5-turbo will be used.",
4766
- "nullable": true
4767
- },
4768
4904
  "new_message_content": {
4769
4905
  "type": "string",
4770
4906
  "description": "The content of the user message to attach to the topic and then generate an assistant message in response to."
@@ -4798,21 +4934,23 @@
4798
4934
  },
4799
4935
  "CreateTopicData": {
4800
4936
  "type": "object",
4937
+ "required": [
4938
+ "owner_id"
4939
+ ],
4801
4940
  "properties": {
4802
4941
  "first_user_message": {
4803
4942
  "type": "string",
4804
4943
  "description": "The first message which will belong to the topic. The topic name is generated based on this message similar to how it works in the OpenAI chat UX if a name is not explicitly provided on the name request body key.",
4805
4944
  "nullable": true
4806
4945
  },
4807
- "model": {
4808
- "type": "string",
4809
- "description": "The model to use for the assistant's messages. This can be any model from the openrouter model list. If no model is provided, the gpt-3.5-turbo will be used.",
4810
- "nullable": true
4811
- },
4812
4946
  "name": {
4813
4947
  "type": "string",
4814
4948
  "description": "The name of the topic. If this is not provided, the topic name is generated from the first_user_message.",
4815
4949
  "nullable": true
4950
+ },
4951
+ "owner_id": {
4952
+ "type": "string",
4953
+ "description": "The owner_id of the topic. This is typically a browser fingerprint or your user's id. It is used to group topics together for a user."
4816
4954
  }
4817
4955
  }
4818
4956
  },
@@ -5028,11 +5166,6 @@
5028
5166
  "format": "int32",
5029
5167
  "description": "The sort order of the message to edit."
5030
5168
  },
5031
- "model": {
5032
- "type": "string",
5033
- "description": "The model to use for the assistant generative inferences. This can be any model from the openrouter model list. If no model is provided, the gpt-3.5-turbo will be used.~",
5034
- "nullable": true
5035
- },
5036
5169
  "new_message_content": {
5037
5170
  "type": "string",
5038
5171
  "description": "The new content of the message to replace the old content with."
@@ -5136,6 +5269,30 @@
5136
5269
  "type": "string",
5137
5270
  "description": "Field is the name of the field to filter on. The field value will be used to check for an exact substring match on the metadata values for each existing chunk. This is useful for when you want to filter chunks by arbitrary metadata. To access fields inside of the metadata that you provide with the card, prefix the field name with `metadata.`."
5138
5271
  },
5272
+ "geo_bounding_box": {
5273
+ "allOf": [
5274
+ {
5275
+ "$ref": "#/components/schemas/LocationBoundingBox"
5276
+ }
5277
+ ],
5278
+ "nullable": true
5279
+ },
5280
+ "geo_polygon": {
5281
+ "allOf": [
5282
+ {
5283
+ "$ref": "#/components/schemas/LocationPolygon"
5284
+ }
5285
+ ],
5286
+ "nullable": true
5287
+ },
5288
+ "geo_radius": {
5289
+ "allOf": [
5290
+ {
5291
+ "$ref": "#/components/schemas/LocationRadius"
5292
+ }
5293
+ ],
5294
+ "nullable": true
5295
+ },
5139
5296
  "match": {
5140
5297
  "type": "array",
5141
5298
  "items": {
@@ -5302,11 +5459,6 @@
5302
5459
  },
5303
5460
  "description": "The ids of the chunks to be retrieved and injected into the context window for RAG."
5304
5461
  },
5305
- "model": {
5306
- "type": "string",
5307
- "description": "The model to use for the chat. This can be any model from the openrouter model list. If no model is provided, gpt-3.5-turbo will be used.",
5308
- "nullable": true
5309
- },
5310
5462
  "prev_messages": {
5311
5463
  "type": "array",
5312
5464
  "items": {
@@ -5340,6 +5492,48 @@
5340
5492
  "stream_response": true
5341
5493
  }
5342
5494
  },
5495
+ "GeoInfo": {
5496
+ "type": "object",
5497
+ "required": [
5498
+ "lat",
5499
+ "lon"
5500
+ ],
5501
+ "properties": {
5502
+ "lat": {
5503
+ "$ref": "#/components/schemas/GeoTypes"
5504
+ },
5505
+ "lon": {
5506
+ "$ref": "#/components/schemas/GeoTypes"
5507
+ }
5508
+ }
5509
+ },
5510
+ "GeoTypes": {
5511
+ "oneOf": [
5512
+ {
5513
+ "type": "integer",
5514
+ "format": "int64"
5515
+ },
5516
+ {
5517
+ "type": "number",
5518
+ "format": "double"
5519
+ }
5520
+ ]
5521
+ },
5522
+ "GetChunksData": {
5523
+ "type": "object",
5524
+ "required": [
5525
+ "ids"
5526
+ ],
5527
+ "properties": {
5528
+ "ids": {
5529
+ "type": "array",
5530
+ "items": {
5531
+ "type": "string",
5532
+ "format": "uuid"
5533
+ }
5534
+ }
5535
+ }
5536
+ },
5343
5537
  "GetEventsData": {
5344
5538
  "type": "object",
5345
5539
  "properties": {
@@ -5348,7 +5542,7 @@
5348
5542
  "items": {
5349
5543
  "type": "string"
5350
5544
  },
5351
- "description": "The types of events to get. Any combination of file_uploaded, chunk_uploaded, chunk_action_failed, or chunk_updated. Leave undefined to get all events.",
5545
+ "description": "The types of events to get. Any combination of file_uploaded, chunk_uploaded, chunk_action_failed, chunk_updated, or qdrant_index_failed. Leave undefined to get all events.",
5352
5546
  "nullable": true
5353
5547
  },
5354
5548
  "page": {
@@ -5387,6 +5581,20 @@
5387
5581
  }
5388
5582
  }
5389
5583
  },
5584
+ "GetTrackingChunksData": {
5585
+ "type": "object",
5586
+ "required": [
5587
+ "tracking_ids"
5588
+ ],
5589
+ "properties": {
5590
+ "tracking_ids": {
5591
+ "type": "array",
5592
+ "items": {
5593
+ "type": "string"
5594
+ }
5595
+ }
5596
+ }
5597
+ },
5390
5598
  "GroupData": {
5391
5599
  "type": "object",
5392
5600
  "required": [
@@ -5532,6 +5740,61 @@
5532
5740
  }
5533
5741
  }
5534
5742
  },
5743
+ "LocationBoundingBox": {
5744
+ "type": "object",
5745
+ "required": [
5746
+ "top_left",
5747
+ "bottom_right"
5748
+ ],
5749
+ "properties": {
5750
+ "bottom_right": {
5751
+ "$ref": "#/components/schemas/GeoInfo"
5752
+ },
5753
+ "top_left": {
5754
+ "$ref": "#/components/schemas/GeoInfo"
5755
+ }
5756
+ }
5757
+ },
5758
+ "LocationPolygon": {
5759
+ "type": "object",
5760
+ "required": [
5761
+ "exterior"
5762
+ ],
5763
+ "properties": {
5764
+ "exterior": {
5765
+ "type": "array",
5766
+ "items": {
5767
+ "$ref": "#/components/schemas/GeoInfo"
5768
+ }
5769
+ },
5770
+ "interior": {
5771
+ "type": "array",
5772
+ "items": {
5773
+ "type": "array",
5774
+ "items": {
5775
+ "$ref": "#/components/schemas/GeoInfo"
5776
+ }
5777
+ },
5778
+ "nullable": true
5779
+ }
5780
+ }
5781
+ },
5782
+ "LocationRadius": {
5783
+ "type": "object",
5784
+ "required": [
5785
+ "center",
5786
+ "radius"
5787
+ ],
5788
+ "properties": {
5789
+ "center": {
5790
+ "$ref": "#/components/schemas/GeoInfo"
5791
+ },
5792
+ "radius": {
5793
+ "type": "number",
5794
+ "format": "double"
5795
+ }
5796
+ }
5797
+ },
5535
5798
  "MatchCondition": {
5536
5799
  "oneOf": [
5537
5800
  {
@@ -5748,6 +6011,10 @@
5748
6011
  {
5749
6012
  "type": "number",
5750
6013
  "format": "double"
6014
+ },
6015
+ {
6016
+ "type": "integer",
6017
+ "format": "int64"
5751
6018
  }
5752
6019
  ]
5753
6020
  },
@@ -5915,11 +6182,6 @@
5915
6182
  "description": "The delimiters to use for highlighting the citations. If this is not included, the default delimiters will be used. Default is `[\".\", \"!\", \"?\", \"\\n\", \"\\t\", \",\"]`.",
5916
6183
  "nullable": true
5917
6184
  },
5918
- "model": {
5919
- "type": "string",
5920
- "description": "The model to use for the assistant generative inferences. This can be any model from the openrouter model list. If no model is provided, the gpt-3.5-turbo will be used.~",
5921
- "nullable": true
5922
- },
5923
6185
  "stream_response": {
5924
6186
  "type": "boolean",
5925
6187
  "description": "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.",
@@ -6518,6 +6780,7 @@
6518
6780
  "id",
6519
6781
  "created_at",
6520
6782
  "updated_at",
6783
+ "dataset_id",
6521
6784
  "weight"
6522
6785
  ],
6523
6786
  "properties": {
@@ -6525,6 +6788,10 @@
6525
6788
  "type": "string",
6526
6789
  "format": "date-time"
6527
6790
  },
6791
+ "dataset_id": {
6792
+ "type": "string",
6793
+ "format": "uuid"
6794
+ },
6528
6795
  "id": {
6529
6796
  "type": "string",
6530
6797
  "format": "uuid"
@@ -6533,6 +6800,14 @@
6533
6800
  "type": "string",
6534
6801
  "nullable": true
6535
6802
  },
6803
+ "location": {
6804
+ "allOf": [
6805
+ {
6806
+ "$ref": "#/components/schemas/GeoInfo"
6807
+ }
6808
+ ],
6809
+ "nullable": true
6810
+ },
6536
6811
  "metadata": {
6537
6812
  "nullable": true
6538
6813
  },
@@ -6844,12 +7119,12 @@
6844
7119
  "type": "object",
6845
7120
  "required": [
6846
7121
  "id",
6847
- "user_id",
6848
7122
  "name",
6849
7123
  "deleted",
6850
7124
  "created_at",
6851
7125
  "updated_at",
6852
- "dataset_id"
7126
+ "dataset_id",
7127
+ "owner_id"
6853
7128
  ],
6854
7129
  "properties": {
6855
7130
  "created_at": {
@@ -6870,13 +7145,12 @@
6870
7145
  "name": {
6871
7146
  "type": "string"
6872
7147
  },
7148
+ "owner_id": {
7149
+ "type": "string"
7150
+ },
6873
7151
  "updated_at": {
6874
7152
  "type": "string",
6875
7153
  "format": "date-time"
6876
- },
6877
- "user_id": {
6878
- "type": "string",
6879
- "format": "uuid"
6880
7154
  }
6881
7155
  },
6882
7156
  "example": {
@@ -6885,8 +7159,8 @@
6885
7159
  "deleted": false,
6886
7160
  "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
6887
7161
  "name": "Trieve",
6888
- "updated_at": "2021-01-01T00:00:00",
6889
- "user_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
7162
+ "owner_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
7163
+ "updated_at": "2021-01-01T00:00:00"
6890
7164
  }
6891
7165
  },
6892
7166
  "UpdateChunkByTrackingIdData": {
@@ -6989,6 +7263,14 @@
6989
7263
  "description": "Link of the chunk you want to update. This can also be any string. Frequently, this is a link to the source of the chunk. The link value will not affect the embedding creation. If no link is provided, the existing link will be used.",
6990
7264
  "nullable": true
6991
7265
  },
7266
+ "location": {
7267
+ "allOf": [
7268
+ {
7269
+ "$ref": "#/components/schemas/GeoInfo"
7270
+ }
7271
+ ],
7272
+ "nullable": true
7273
+ },
6992
7274
  "metadata": {
6993
7275
  "description": "The metadata is a JSON object which can be used to filter chunks. This is useful for when you want to filter chunks by arbitrary metadata. Unlike with tag filtering, there is a performance hit for filtering on metadata. If no metadata is provided, the existing metadata will be used.",
6994
7276
  "nullable": true
@@ -7176,17 +7458,13 @@
7176
7458
  }
7177
7459
  }
7178
7460
  },
7179
- "UpdateUserData": {
7461
+ "UpdateUserOrgRoleData": {
7180
7462
  "type": "object",
7181
7463
  "required": [
7182
- "organization_id"
7464
+ "organization_id",
7465
+ "role"
7183
7466
  ],
7184
7467
  "properties": {
7185
- "name": {
7186
- "type": "string",
7187
- "description": "In the sense of a legal name, not a username. The new name to assign to the user, if not provided, the current name will be used.",
7188
- "nullable": true
7189
- },
7190
7468
  "organization_id": {
7191
7469
  "type": "string",
7192
7470
  "format": "uuid",
@@ -7195,8 +7473,7 @@
7195
7473
  "role": {
7196
7474
  "type": "integer",
7197
7475
  "format": "int32",
7198
- "description": "Either 0 (user), 1 (admin), or 2 (owner). If not provided, the current role will be used. The auth'ed user must have a role greater than or equal to the role being assigned.",
7199
- "nullable": true
7476
+ "description": "Either 0 (user), 1 (admin), or 2 (owner). If not provided, the current role will be used. The auth'ed user must have a role greater than or equal to the role being assigned."
7200
7477
  },
7201
7478
  "user_id": {
7202
7479
  "type": "string",