trieve_ruby_client 0.8.2 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/GENERATE_COMMAND.txt +2 -0
- data/README.md +153 -41
- data/docs/APIVersion.md +15 -0
- data/docs/AnalyticsApi.md +303 -0
- data/docs/ApiKeyRespBody.md +32 -0
- data/docs/AuthApi.md +4 -4
- data/docs/AutocompleteData.md +42 -0
- data/docs/AutocompleteReqPayload.md +54 -0
- data/docs/BookmarkGroupResponse.md +49 -0
- data/docs/BookmarkGroupResult.md +1 -1
- data/docs/BoostPhrase.md +20 -0
- data/docs/ChatMessageProxy.md +1 -1
- data/docs/ChunkApi.md +269 -93
- data/docs/ChunkData.md +3 -1
- data/docs/ChunkFilter.md +5 -3
- data/docs/ChunkGroup.md +1 -1
- data/docs/ChunkGroupAndFileId.md +36 -0
- data/docs/ChunkGroupApi.md +136 -114
- data/docs/ChunkMetadata.md +6 -2
- data/docs/ChunkMetadataStringTagSet.md +46 -0
- data/docs/ChunkMetadataTypes.md +51 -0
- data/docs/ChunkMetadataWithScore.md +1 -1
- data/docs/ChunkReqPayload.md +50 -0
- data/docs/ChunkReturnTypes.md +49 -0
- data/docs/ClientDatasetConfiguration.md +0 -2
- data/docs/ClusterAnalytics.md +63 -0
- data/docs/ClusterAnalyticsFilter.md +18 -0
- data/docs/ClusterAnalyticsResponse.md +49 -0
- data/docs/ClusterQueries.md +22 -0
- data/docs/ClusterTopics.md +20 -0
- data/docs/ConditionType.md +49 -0
- data/docs/ContentChunkMetadata.md +32 -0
- data/docs/CountChunkQueryResponseBody.md +18 -0
- data/docs/CountChunksReqPayload.md +26 -0
- data/docs/CountQueries.md +20 -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 +52 -0
- data/docs/CreateSetupCheckoutSessionResPayload.md +18 -0
- data/docs/CreateTopicReqPayload.md +22 -0
- data/docs/Dataset.md +2 -2
- data/docs/DatasetAnalytics.md +28 -0
- data/docs/DatasetApi.md +184 -32
- data/docs/DatasetDTO.md +0 -2
- data/docs/DateRange.md +24 -0
- data/docs/DeprecatedSearchOverGroupsResponseBody.md +20 -0
- data/docs/DistancePhrase.md +20 -0
- data/docs/EditMessageReqPayload.md +54 -0
- data/docs/Event.md +3 -5
- data/docs/EventTypeRequest.md +15 -0
- data/docs/EventsApi.md +1 -1
- data/docs/FieldCondition.md +2 -0
- data/docs/File.md +1 -1
- data/docs/FileApi.md +10 -10
- data/docs/GenerateChunksRequest.md +13 -1
- data/docs/GeoInfoWithBias.md +20 -0
- data/docs/GetChunksForGroupsResponse.md +22 -0
- data/docs/GetDatasetsPagination.md +20 -0
- data/docs/GetEventsData.md +1 -1
- data/docs/Granularity.md +15 -0
- data/docs/GroupData.md +1 -1
- data/docs/GroupScoreChunk.md +14 -0
- data/docs/GroupsBookmarkQueryResult.md +22 -0
- data/docs/HasIDCondition.md +20 -0
- data/docs/HeadQueries.md +20 -0
- data/docs/HeadQueries1.md +22 -0
- data/docs/HeadQueryResponse.md +18 -0
- data/docs/HealthApi.md +1 -1
- data/docs/InvitationApi.md +1 -1
- data/docs/LatencyGraph.md +22 -0
- data/docs/LatencyGraphResponse.md +18 -0
- data/docs/LowConfidenceQueries.md +24 -0
- data/docs/LowConfidenceRecommendations.md +24 -0
- data/docs/MatchCondition.md +3 -1
- data/docs/MessageApi.md +43 -43
- data/docs/MetricsApi.md +76 -0
- data/docs/NewChunkMetadataTypes.md +51 -0
- data/docs/NoResultQueries.md +22 -0
- data/docs/Organization.md +2 -0
- data/docs/OrganizationApi.md +27 -28
- data/docs/QueryCountResponse.md +18 -0
- data/docs/QueryDetails.md +20 -0
- data/docs/RAGAnalytics.md +63 -0
- data/docs/RAGAnalyticsFilter.md +20 -0
- data/docs/RAGAnalyticsResponse.md +49 -0
- data/docs/RAGQueries.md +26 -0
- data/docs/RAGUsage.md +20 -0
- data/docs/RAGUsageResponse.md +18 -0
- data/docs/RPSGraph.md +22 -0
- data/docs/RPSGraphResponse.md +18 -0
- data/docs/RagQueryEvent.md +30 -0
- data/docs/RagQueryResponse.md +18 -0
- data/docs/RagTypes.md +15 -0
- data/docs/RangeCondition.md +1 -3
- data/docs/RecommendChunksRequest.md +2 -2
- data/docs/RecommendChunksResponseBody.md +18 -0
- data/docs/RecommendGroupChunksRequest.md +2 -2
- data/docs/RecommendGroupsResponse.md +49 -0
- data/docs/RecommendGroupsResponseBody.md +18 -0
- data/docs/RecommendResponseTypes.md +49 -0
- data/docs/RecommendType.md +15 -0
- data/docs/RecommendationAnalytics.md +63 -0
- data/docs/RecommendationAnalyticsFilter.md +20 -0
- data/docs/RecommendationAnalyticsResponse.md +47 -0
- data/docs/RecommendationEvent.md +38 -0
- data/docs/RecommendationQueries.md +26 -0
- data/docs/RecommendationStrategy.md +15 -0
- data/docs/RecommendationType.md +15 -0
- data/docs/RecommendationsEventResponse.md +18 -0
- data/docs/RegenerateMessageReqPayload.md +48 -0
- data/docs/RemoveChunkFromGroupReqPayload.md +18 -0
- data/docs/RoleProxy.md +15 -0
- data/docs/ScoreChunk.md +22 -0
- data/docs/ScoreChunkDTO.md +3 -1
- data/docs/SearchAnalytics.md +77 -0
- data/docs/SearchAnalyticsFilter.md +22 -0
- data/docs/SearchAnalyticsResponse.md +59 -0
- data/docs/SearchChunkData.md +9 -3
- data/docs/SearchChunksReqPayload.md +56 -0
- data/docs/SearchClusterResponse.md +18 -0
- data/docs/SearchClusterTopics.md +28 -0
- data/docs/SearchGroupResponseTypes.md +49 -0
- data/docs/SearchLatencyGraph.md +20 -0
- data/docs/SearchMethod.md +15 -0
- data/docs/SearchMetrics.md +20 -0
- data/docs/SearchOverGroupsData.md +12 -6
- data/docs/SearchOverGroupsResponseBody.md +4 -4
- data/docs/SearchOverGroupsResponseTypes.md +4 -4
- data/docs/SearchOverGroupsResults.md +6 -4
- data/docs/SearchQueries.md +26 -0
- data/docs/SearchQueryEvent.md +34 -0
- data/docs/SearchQueryResponse.md +18 -0
- data/docs/SearchRPSGraph.md +20 -0
- data/docs/SearchResponseBody.md +20 -0
- data/docs/SearchResponseTypes.md +49 -0
- data/docs/SearchResultType.md +49 -0
- data/docs/SearchType.md +15 -0
- data/docs/SearchTypeCount.md +22 -0
- data/docs/SearchWithinGroupData.md +18 -4
- data/docs/SearchWithinGroupResponseBody.md +20 -0
- data/docs/SearchWithinGroupResults.md +1 -1
- data/docs/SetUserApiKeyRequest.md +4 -0
- data/docs/SlimChunkMetadata.md +5 -1
- data/docs/SlimChunkMetadataWithArrayTagSet.md +44 -0
- data/docs/SlimChunkMetadataWithScore.md +1 -1
- data/docs/SortBy.md +15 -0
- data/docs/SortOrder.md +15 -0
- data/docs/StripeApi.md +134 -4
- data/docs/StripeInvoice.md +28 -0
- data/docs/SuggestedQueriesReqPayload.md +18 -0
- data/docs/TopicApi.md +16 -16
- data/docs/UpdateChunkData.md +2 -0
- data/docs/UpdateChunkGroupData.md +3 -1
- data/docs/UpdateChunkReqPayload.md +48 -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 +9 -10
- data/lib/trieve_ruby_client/api/analytics_api.rb +322 -0
- data/lib/trieve_ruby_client/api/auth_api.rb +9 -9
- data/lib/trieve_ruby_client/api/chunk_api.rb +274 -103
- data/lib/trieve_ruby_client/api/chunk_group_api.rb +161 -139
- data/lib/trieve_ruby_client/api/dataset_api.rb +183 -38
- data/lib/trieve_ruby_client/api/events_api.rb +3 -3
- data/lib/trieve_ruby_client/api/file_api.rb +18 -18
- data/lib/trieve_ruby_client/api/health_api.rb +3 -3
- data/lib/trieve_ruby_client/api/invitation_api.rb +3 -3
- data/lib/trieve_ruby_client/api/message_api.rb +52 -52
- data/lib/trieve_ruby_client/api/metrics_api.rb +79 -0
- data/lib/trieve_ruby_client/api/organization_api.rb +33 -33
- data/lib/trieve_ruby_client/api/stripe_api.rb +135 -9
- data/lib/trieve_ruby_client/api/topic_api.rb +27 -27
- data/lib/trieve_ruby_client/api/user_api.rb +12 -12
- 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 +8 -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/api_version.rb +40 -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 +509 -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_response.rb +105 -0
- data/lib/trieve_ruby_client/models/bookmark_group_result.rb +2 -2
- data/lib/trieve_ruby_client/models/boost_phrase.rb +240 -0
- data/lib/trieve_ruby_client/models/chat_message_proxy.rb +24 -2
- data/lib/trieve_ruby_client/models/chunk_data.rb +16 -9
- data/lib/trieve_ruby_client/models/chunk_filter.rb +16 -5
- 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_group_and_file_id.rb +343 -0
- data/lib/trieve_ruby_client/models/chunk_metadata.rb +35 -5
- data/lib/trieve_ruby_client/models/chunk_metadata_string_tag_set.rb +393 -0
- data/lib/trieve_ruby_client/models/chunk_metadata_types.rb +106 -0
- data/lib/trieve_ruby_client/models/chunk_metadata_with_score.rb +8 -2
- data/lib/trieve_ruby_client/models/chunk_req_payload.rb +397 -0
- data/lib/trieve_ruby_client/models/chunk_return_types.rb +105 -0
- data/lib/trieve_ruby_client/models/client_dataset_configuration.rb +2 -18
- data/lib/trieve_ruby_client/models/cluster_analytics.rb +43 -0
- data/lib/trieve_ruby_client/models/cluster_analytics_filter.rb +215 -0
- data/lib/trieve_ruby_client/models/cluster_analytics_response.rb +105 -0
- data/lib/trieve_ruby_client/models/cluster_queries.rb +296 -0
- data/lib/trieve_ruby_client/models/cluster_topics.rb +265 -0
- data/lib/trieve_ruby_client/models/condition_type.rb +105 -0
- data/lib/trieve_ruby_client/models/content_chunk_metadata.rb +305 -0
- data/lib/trieve_ruby_client/models/count_chunk_query_response_body.rb +240 -0
- data/lib/trieve_ruby_client/models/count_chunks_req_payload.rb +307 -0
- data/lib/trieve_ruby_client/models/count_queries.rb +265 -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 +469 -0
- data/lib/trieve_ruby_client/models/create_organization_data.rb +1 -1
- data/lib/trieve_ruby_client/models/create_setup_checkout_session_res_payload.rb +221 -0
- 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 -14
- data/lib/trieve_ruby_client/models/dataset_analytics.rb +301 -0
- data/lib/trieve_ruby_client/models/dataset_and_usage.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset_dto.rb +2 -14
- 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/deprecated_search_over_groups_response_body.rb +239 -0
- data/lib/trieve_ruby_client/models/distance_phrase.rb +240 -0
- data/lib/trieve_ruby_client/models/edit_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/edit_message_req_payload.rb +486 -0
- data/lib/trieve_ruby_client/models/error_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/event.rb +12 -24
- data/lib/trieve_ruby_client/models/event_return.rb +1 -1
- data/lib/trieve_ruby_client/models/event_type_request.rb +49 -0
- 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 +89 -6
- data/lib/trieve_ruby_client/models/geo_info.rb +1 -1
- data/lib/trieve_ruby_client/models/geo_info_with_bias.rb +237 -0
- 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_chunks_for_groups_response.rb +274 -0
- data/lib/trieve_ruby_client/models/get_datasets_pagination.rb +225 -0
- 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/get_tracking_chunks_data.rb +1 -1
- data/lib/trieve_ruby_client/models/granularity.rb +42 -0
- data/lib/trieve_ruby_client/models/group_data.rb +2 -2
- data/lib/trieve_ruby_client/models/group_score_chunk.rb +92 -2
- data/lib/trieve_ruby_client/models/groups_bookmark_query_result.rb +274 -0
- data/lib/trieve_ruby_client/models/has_id_condition.rb +229 -0
- data/lib/trieve_ruby_client/models/head_queries.rb +237 -0
- data/lib/trieve_ruby_client/models/head_queries1.rb +290 -0
- data/lib/trieve_ruby_client/models/head_query_response.rb +223 -0
- data/lib/trieve_ruby_client/models/invitation_data.rb +1 -1
- data/lib/trieve_ruby_client/models/latency_graph.rb +275 -0
- data/lib/trieve_ruby_client/models/latency_graph_response.rb +223 -0
- 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/low_confidence_queries.rb +300 -0
- data/lib/trieve_ruby_client/models/low_confidence_recommendations.rb +300 -0
- 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/new_chunk_metadata_types.rb +106 -0
- data/lib/trieve_ruby_client/models/no_result_queries.rb +290 -0
- 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/query_count_response.rb +223 -0
- data/lib/trieve_ruby_client/models/query_details.rb +271 -0
- data/lib/trieve_ruby_client/models/rag_analytics.rb +43 -0
- data/lib/trieve_ruby_client/models/rag_analytics_filter.rb +247 -0
- data/lib/trieve_ruby_client/models/rag_analytics_response.rb +105 -0
- data/lib/trieve_ruby_client/models/rag_queries.rb +310 -0
- data/lib/trieve_ruby_client/models/rag_query_event.rb +319 -0
- data/lib/trieve_ruby_client/models/rag_query_response.rb +223 -0
- data/lib/trieve_ruby_client/models/rag_types.rb +40 -0
- data/lib/trieve_ruby_client/models/rag_usage.rb +265 -0
- data/lib/trieve_ruby_client/models/rag_usage_response.rb +240 -0
- 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 +25 -5
- data/lib/trieve_ruby_client/models/recommend_chunks_response_body.rb +223 -0
- data/lib/trieve_ruby_client/models/recommend_group_chunks_request.rb +25 -5
- data/lib/trieve_ruby_client/models/recommend_groups_response.rb +105 -0
- data/lib/trieve_ruby_client/models/recommend_groups_response_body.rb +223 -0
- data/lib/trieve_ruby_client/models/recommend_response_types.rb +105 -0
- data/lib/trieve_ruby_client/models/recommend_type.rb +40 -0
- data/lib/trieve_ruby_client/models/recommendation_analytics.rb +43 -0
- data/lib/trieve_ruby_client/models/recommendation_analytics_filter.rb +247 -0
- data/lib/trieve_ruby_client/models/recommendation_analytics_response.rb +104 -0
- data/lib/trieve_ruby_client/models/recommendation_event.rb +391 -0
- data/lib/trieve_ruby_client/models/recommendation_queries.rb +310 -0
- data/lib/trieve_ruby_client/models/recommendation_strategy.rb +40 -0
- data/lib/trieve_ruby_client/models/recommendation_type.rb +40 -0
- data/lib/trieve_ruby_client/models/recommendations_event_response.rb +223 -0
- data/lib/trieve_ruby_client/models/regenerate_message_data.rb +1 -1
- data/lib/trieve_ruby_client/models/regenerate_message_req_payload.rb +441 -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/role_proxy.rb +41 -0
- data/lib/trieve_ruby_client/models/rps_graph.rb +275 -0
- data/lib/trieve_ruby_client/models/rps_graph_response.rb +223 -0
- data/lib/trieve_ruby_client/models/score_chunk.rb +249 -0
- data/lib/trieve_ruby_client/models/score_chunk_dto.rb +15 -3
- data/lib/trieve_ruby_client/models/search_analytics.rb +50 -0
- data/lib/trieve_ruby_client/models/search_analytics_filter.rb +257 -0
- data/lib/trieve_ruby_client/models/search_analytics_response.rb +110 -0
- data/lib/trieve_ruby_client/models/search_chunk_data.rb +40 -5
- 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 +535 -0
- data/lib/trieve_ruby_client/models/search_cluster_response.rb +223 -0
- data/lib/trieve_ruby_client/models/search_cluster_topics.rb +301 -0
- data/lib/trieve_ruby_client/models/search_group_response_types.rb +105 -0
- data/lib/trieve_ruby_client/models/search_latency_graph.rb +237 -0
- data/lib/trieve_ruby_client/models/search_method.rb +42 -0
- data/lib/trieve_ruby_client/models/search_metrics.rb +265 -0
- data/lib/trieve_ruby_client/models/search_over_groups_data.rb +117 -18
- data/lib/trieve_ruby_client/models/search_over_groups_response_body.rb +23 -23
- data/lib/trieve_ruby_client/models/search_over_groups_response_types.rb +3 -3
- data/lib/trieve_ruby_client/models/search_over_groups_results.rb +33 -23
- data/lib/trieve_ruby_client/models/search_queries.rb +310 -0
- data/lib/trieve_ruby_client/models/search_query_event.rb +351 -0
- data/lib/trieve_ruby_client/models/search_query_response.rb +223 -0
- data/lib/trieve_ruby_client/models/search_response_body.rb +239 -0
- data/lib/trieve_ruby_client/models/search_response_types.rb +105 -0
- data/lib/trieve_ruby_client/models/search_result_type.rb +105 -0
- data/lib/trieve_ruby_client/models/search_rps_graph.rb +237 -0
- data/lib/trieve_ruby_client/models/search_type.rb +42 -0
- data/lib/trieve_ruby_client/models/search_type_count.rb +253 -0
- data/lib/trieve_ruby_client/models/search_within_group_data.rb +151 -7
- data/lib/trieve_ruby_client/models/search_within_group_response_body.rb +239 -0
- data/lib/trieve_ruby_client/models/search_within_group_results.rb +2 -2
- 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 +31 -3
- data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_array_tag_set.rb +385 -0
- data/lib/trieve_ruby_client/models/slim_chunk_metadata_with_score.rb +8 -2
- 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/sort_by.rb +41 -0
- data/lib/trieve_ruby_client/models/sort_order.rb +40 -0
- data/lib/trieve_ruby_client/models/stripe_invoice.rb +301 -0
- 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 +17 -6
- data/lib/trieve_ruby_client/models/update_chunk_req_payload.rb +386 -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 +110 -24
- data/openapi-generator.yaml +2 -2
- data/openapi.json +4491 -1230
- data/spec/api/analytics_api_spec.rb +87 -0
- data/spec/api/metrics_api_spec.rb +46 -0
- data/spec/models/api_key_resp_body_spec.rb +78 -0
- data/spec/models/api_version_spec.rb +30 -0
- data/spec/models/autocomplete_data_spec.rb +108 -0
- data/spec/models/autocomplete_req_payload_spec.rb +132 -0
- data/spec/models/bookmark_group_response_spec.rb +32 -0
- data/spec/models/boost_phrase_spec.rb +42 -0
- data/spec/models/chunk_group_and_file_id_spec.rb +90 -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/chunk_return_types_spec.rb +32 -0
- data/spec/models/cluster_analytics_filter_spec.rb +36 -0
- data/spec/models/cluster_analytics_response_spec.rb +32 -0
- data/spec/models/cluster_analytics_spec.rb +38 -0
- data/spec/models/cluster_queries_spec.rb +52 -0
- data/spec/models/cluster_topics_spec.rb +46 -0
- data/spec/models/condition_type_spec.rb +32 -0
- data/spec/models/content_chunk_metadata_spec.rb +72 -0
- data/spec/models/count_chunk_query_response_body_spec.rb +36 -0
- data/spec/models/count_chunks_req_payload_spec.rb +60 -0
- data/spec/models/count_queries_spec.rb +46 -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_setup_checkout_session_res_payload_spec.rb +36 -0
- data/spec/models/create_topic_req_payload_spec.rb +48 -0
- data/spec/models/dataset_analytics_spec.rb +66 -0
- data/spec/models/date_range_spec.rb +54 -0
- data/spec/models/deprecated_search_over_groups_response_body_spec.rb +42 -0
- data/spec/models/distance_phrase_spec.rb +42 -0
- data/spec/models/edit_message_req_payload_spec.rb +114 -0
- data/spec/models/event_type_request_spec.rb +30 -0
- data/spec/models/geo_info_with_bias_spec.rb +42 -0
- data/spec/models/get_chunks_for_groups_response_spec.rb +48 -0
- data/spec/models/get_datasets_pagination_spec.rb +42 -0
- data/spec/models/granularity_spec.rb +30 -0
- data/spec/models/groups_bookmark_query_result_spec.rb +48 -0
- data/spec/models/has_id_condition_spec.rb +42 -0
- data/spec/models/head_queries1_spec.rb +52 -0
- data/spec/models/head_queries_spec.rb +42 -0
- data/spec/models/head_query_response_spec.rb +36 -0
- data/spec/models/latency_graph_response_spec.rb +36 -0
- data/spec/models/latency_graph_spec.rb +52 -0
- data/spec/models/low_confidence_queries_spec.rb +58 -0
- data/spec/models/low_confidence_recommendations_spec.rb +58 -0
- data/spec/models/new_chunk_metadata_types_spec.rb +32 -0
- data/spec/models/no_result_queries_spec.rb +52 -0
- data/spec/models/query_count_response_spec.rb +36 -0
- data/spec/models/query_details_spec.rb +46 -0
- data/spec/models/rag_analytics_filter_spec.rb +42 -0
- data/spec/models/rag_analytics_response_spec.rb +32 -0
- data/spec/models/rag_analytics_spec.rb +38 -0
- data/spec/models/rag_queries_spec.rb +64 -0
- data/spec/models/rag_query_event_spec.rb +72 -0
- data/spec/models/rag_query_response_spec.rb +36 -0
- data/spec/models/rag_types_spec.rb +30 -0
- data/spec/models/rag_usage_response_spec.rb +36 -0
- data/spec/models/rag_usage_spec.rb +46 -0
- data/spec/models/recommend_chunks_response_body_spec.rb +36 -0
- data/spec/models/recommend_groups_response_body_spec.rb +36 -0
- data/spec/models/recommend_groups_response_spec.rb +32 -0
- data/spec/models/recommend_response_types_spec.rb +32 -0
- data/spec/models/recommend_type_spec.rb +30 -0
- data/spec/models/recommendation_analytics_filter_spec.rb +42 -0
- data/spec/models/recommendation_analytics_response_spec.rb +32 -0
- data/spec/models/recommendation_analytics_spec.rb +38 -0
- data/spec/models/recommendation_event_spec.rb +96 -0
- data/spec/models/recommendation_queries_spec.rb +64 -0
- data/spec/models/recommendation_strategy_spec.rb +30 -0
- data/spec/models/recommendation_type_spec.rb +30 -0
- data/spec/models/recommendations_event_response_spec.rb +36 -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/role_proxy_spec.rb +30 -0
- data/spec/models/rps_graph_response_spec.rb +36 -0
- data/spec/models/rps_graph_spec.rb +52 -0
- data/spec/models/score_chunk_spec.rb +48 -0
- data/spec/models/search_analytics_filter_spec.rb +48 -0
- data/spec/models/search_analytics_response_spec.rb +32 -0
- data/spec/models/search_analytics_spec.rb +38 -0
- data/spec/models/search_chunks_req_payload_spec.rb +144 -0
- data/spec/models/search_cluster_response_spec.rb +36 -0
- data/spec/models/search_cluster_topics_spec.rb +66 -0
- data/spec/models/search_group_response_types_spec.rb +32 -0
- data/spec/models/search_latency_graph_spec.rb +42 -0
- data/spec/models/search_method_spec.rb +30 -0
- data/spec/models/search_metrics_spec.rb +46 -0
- data/spec/models/search_queries_spec.rb +64 -0
- data/spec/models/search_query_event_spec.rb +84 -0
- data/spec/models/search_query_response_spec.rb +36 -0
- data/spec/models/search_response_body_spec.rb +42 -0
- data/spec/models/search_response_types_spec.rb +32 -0
- data/spec/models/search_result_type_spec.rb +32 -0
- data/spec/models/search_rps_graph_spec.rb +42 -0
- data/spec/models/search_type_count_spec.rb +48 -0
- data/spec/models/search_type_spec.rb +30 -0
- data/spec/models/search_within_group_response_body_spec.rb +42 -0
- data/spec/models/slim_chunk_metadata_with_array_tag_set_spec.rb +114 -0
- data/spec/models/sort_by_spec.rb +30 -0
- data/spec/models/sort_order_spec.rb +30 -0
- data/spec/models/stripe_invoice_spec.rb +66 -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.gemspec +1 -1
- metadata +534 -111
- data/trieve_ruby_client-0.5.0.gem +0 -0
- data/trieve_ruby_client-0.5.7.gem +0 -0
- data/trieve_ruby_client-0.6.0.gem +0 -0
- data/trieve_ruby_client-0.6.2.gem +0 -0
- data/trieve_ruby_client-0.6.7.gem +0 -0
- data/trieve_ruby_client-0.6.9.gem +0 -0
- data/trieve_ruby_client-0.7.2.gem +0 -0
- data/trieve_ruby_client-0.7.6.gem +0 -0
- data/trieve_ruby_client-0.8.0.gem +0 -0
data/docs/ChunkApi.md
CHANGED
@@ -4,28 +4,30 @@ All URIs are relative to *https://api.trieve.ai*
|
|
4
4
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
|
+
| [**autocomplete**](ChunkApi.md#autocomplete) | **POST** /api/chunk/autocomplete | Autocomplete |
|
8
|
+
| [**count_chunks**](ChunkApi.md#count_chunks) | **POST** /api/chunk/count | Count chunks above threshold |
|
7
9
|
| [**create_chunk**](ChunkApi.md#create_chunk) | **POST** /api/chunk | Create or Upsert Chunk or Chunks |
|
8
|
-
| [**create_suggested_queries_handler**](ChunkApi.md#create_suggested_queries_handler) | **POST** /api/chunk/gen_suggestions | Generate suggested queries |
|
9
10
|
| [**delete_chunk**](ChunkApi.md#delete_chunk) | **DELETE** /api/chunk/{chunk_id} | Delete Chunk |
|
10
11
|
| [**delete_chunk_by_tracking_id**](ChunkApi.md#delete_chunk_by_tracking_id) | **DELETE** /api/chunk/tracking_id/{tracking_id} | Delete Chunk By Tracking Id |
|
11
12
|
| [**generate_off_chunks**](ChunkApi.md#generate_off_chunks) | **POST** /api/chunk/generate | RAG on Specified Chunks |
|
12
13
|
| [**get_chunk_by_id**](ChunkApi.md#get_chunk_by_id) | **GET** /api/chunk/{chunk_id} | Get Chunk By Id |
|
13
14
|
| [**get_chunk_by_tracking_id**](ChunkApi.md#get_chunk_by_tracking_id) | **GET** /api/chunk/tracking_id/{tracking_id} | Get Chunk By Tracking Id |
|
14
15
|
| [**get_chunks_by_ids**](ChunkApi.md#get_chunks_by_ids) | **POST** /api/chunks | Get Chunks By Ids |
|
15
|
-
| [**get_chunks_by_tracking_ids**](ChunkApi.md#get_chunks_by_tracking_ids) | **POST** /api/chunks/tracking | Get Chunks By
|
16
|
+
| [**get_chunks_by_tracking_ids**](ChunkApi.md#get_chunks_by_tracking_ids) | **POST** /api/chunks/tracking | Get Chunks By Tracking Ids |
|
16
17
|
| [**get_recommended_chunks**](ChunkApi.md#get_recommended_chunks) | **POST** /api/chunk/recommend | Get Recommended Chunks |
|
18
|
+
| [**get_suggested_queries**](ChunkApi.md#get_suggested_queries) | **POST** /api/chunk/gen_suggestions | Generate suggested queries |
|
17
19
|
| [**search_chunks**](ChunkApi.md#search_chunks) | **POST** /api/chunk/search | Search |
|
18
20
|
| [**update_chunk**](ChunkApi.md#update_chunk) | **PUT** /api/chunk | Update Chunk |
|
19
21
|
| [**update_chunk_by_tracking_id**](ChunkApi.md#update_chunk_by_tracking_id) | **PUT** /api/chunk/tracking_id/update | Update Chunk By Tracking Id |
|
20
22
|
|
21
23
|
|
22
|
-
##
|
24
|
+
## autocomplete
|
23
25
|
|
24
|
-
> <
|
26
|
+
> <SearchResponseTypes> autocomplete(tr_dataset, autocomplete_req_payload, opts)
|
25
27
|
|
26
|
-
|
28
|
+
Autocomplete
|
27
29
|
|
28
|
-
|
30
|
+
This route provides the primary autocomplete functionality for the API. This prioritize prefix matching with semantic or full-text search.
|
29
31
|
|
30
32
|
### Examples
|
31
33
|
|
@@ -42,32 +44,35 @@ end
|
|
42
44
|
|
43
45
|
api_instance = TrieveRubyClient::ChunkApi.new
|
44
46
|
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
45
|
-
|
47
|
+
autocomplete_req_payload = TrieveRubyClient::AutocompleteReqPayload.new({query: 'query_example', search_type: TrieveRubyClient::SearchMethod::FULL_TEXT}) # AutocompleteReqPayload | JSON request payload to semantically search for chunks (chunks)
|
48
|
+
opts = {
|
49
|
+
x_api_version: TrieveRubyClient::APIVersion::V1 # APIVersion | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
50
|
+
}
|
46
51
|
|
47
52
|
begin
|
48
|
-
#
|
49
|
-
result = api_instance.
|
53
|
+
# Autocomplete
|
54
|
+
result = api_instance.autocomplete(tr_dataset, autocomplete_req_payload, opts)
|
50
55
|
p result
|
51
56
|
rescue TrieveRubyClient::ApiError => e
|
52
|
-
puts "Error when calling ChunkApi->
|
57
|
+
puts "Error when calling ChunkApi->autocomplete: #{e}"
|
53
58
|
end
|
54
59
|
```
|
55
60
|
|
56
|
-
#### Using the
|
61
|
+
#### Using the autocomplete_with_http_info variant
|
57
62
|
|
58
63
|
This returns an Array which contains the response data, status code and headers.
|
59
64
|
|
60
|
-
> <Array(<
|
65
|
+
> <Array(<SearchResponseTypes>, Integer, Hash)> autocomplete_with_http_info(tr_dataset, autocomplete_req_payload, opts)
|
61
66
|
|
62
67
|
```ruby
|
63
68
|
begin
|
64
|
-
#
|
65
|
-
data, status_code, headers = api_instance.
|
69
|
+
# Autocomplete
|
70
|
+
data, status_code, headers = api_instance.autocomplete_with_http_info(tr_dataset, autocomplete_req_payload, opts)
|
66
71
|
p status_code # => 2xx
|
67
72
|
p headers # => { ... }
|
68
|
-
p data # => <
|
73
|
+
p data # => <SearchResponseTypes>
|
69
74
|
rescue TrieveRubyClient::ApiError => e
|
70
|
-
puts "Error when calling ChunkApi->
|
75
|
+
puts "Error when calling ChunkApi->autocomplete_with_http_info: #{e}"
|
71
76
|
end
|
72
77
|
```
|
73
78
|
|
@@ -76,11 +81,12 @@ end
|
|
76
81
|
| Name | Type | Description | Notes |
|
77
82
|
| ---- | ---- | ----------- | ----- |
|
78
83
|
| **tr_dataset** | **String** | The dataset id to use for the request | |
|
79
|
-
| **
|
84
|
+
| **autocomplete_req_payload** | [**AutocompleteReqPayload**](AutocompleteReqPayload.md) | JSON request payload to semantically search for chunks (chunks) | |
|
85
|
+
| **x_api_version** | [**APIVersion**](.md) | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise. | [optional] |
|
80
86
|
|
81
87
|
### Return type
|
82
88
|
|
83
|
-
[**
|
89
|
+
[**SearchResponseTypes**](SearchResponseTypes.md)
|
84
90
|
|
85
91
|
### Authorization
|
86
92
|
|
@@ -92,13 +98,13 @@ end
|
|
92
98
|
- **Accept**: application/json
|
93
99
|
|
94
100
|
|
95
|
-
##
|
101
|
+
## count_chunks
|
96
102
|
|
97
|
-
> <
|
103
|
+
> <CountChunkQueryResponseBody> count_chunks(tr_dataset, count_chunks_req_payload)
|
98
104
|
|
99
|
-
|
105
|
+
Count chunks above threshold
|
100
106
|
|
101
|
-
|
107
|
+
This route can be used to determine the number of chunks that match a given search criteria including filters and score threshold. It may be high latency for large datasets. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization. There is a dataset configuration imposed restriction on the maximum limit value (default 10,000) which is used to prevent DDOS attacks.
|
102
108
|
|
103
109
|
### Examples
|
104
110
|
|
@@ -115,32 +121,32 @@ end
|
|
115
121
|
|
116
122
|
api_instance = TrieveRubyClient::ChunkApi.new
|
117
123
|
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
118
|
-
|
124
|
+
count_chunks_req_payload = TrieveRubyClient::CountChunksReqPayload.new({query: 'query_example', search_type: TrieveRubyClient::SearchMethod::FULL_TEXT}) # CountChunksReqPayload |
|
119
125
|
|
120
126
|
begin
|
121
|
-
#
|
122
|
-
result = api_instance.
|
127
|
+
# Count chunks above threshold
|
128
|
+
result = api_instance.count_chunks(tr_dataset, count_chunks_req_payload)
|
123
129
|
p result
|
124
130
|
rescue TrieveRubyClient::ApiError => e
|
125
|
-
puts "Error when calling ChunkApi->
|
131
|
+
puts "Error when calling ChunkApi->count_chunks: #{e}"
|
126
132
|
end
|
127
133
|
```
|
128
134
|
|
129
|
-
#### Using the
|
135
|
+
#### Using the count_chunks_with_http_info variant
|
130
136
|
|
131
137
|
This returns an Array which contains the response data, status code and headers.
|
132
138
|
|
133
|
-
> <Array(<
|
139
|
+
> <Array(<CountChunkQueryResponseBody>, Integer, Hash)> count_chunks_with_http_info(tr_dataset, count_chunks_req_payload)
|
134
140
|
|
135
141
|
```ruby
|
136
142
|
begin
|
137
|
-
#
|
138
|
-
data, status_code, headers = api_instance.
|
143
|
+
# Count chunks above threshold
|
144
|
+
data, status_code, headers = api_instance.count_chunks_with_http_info(tr_dataset, count_chunks_req_payload)
|
139
145
|
p status_code # => 2xx
|
140
146
|
p headers # => { ... }
|
141
|
-
p data # => <
|
147
|
+
p data # => <CountChunkQueryResponseBody>
|
142
148
|
rescue TrieveRubyClient::ApiError => e
|
143
|
-
puts "Error when calling ChunkApi->
|
149
|
+
puts "Error when calling ChunkApi->count_chunks_with_http_info: #{e}"
|
144
150
|
end
|
145
151
|
```
|
146
152
|
|
@@ -149,11 +155,84 @@ end
|
|
149
155
|
| Name | Type | Description | Notes |
|
150
156
|
| ---- | ---- | ----------- | ----- |
|
151
157
|
| **tr_dataset** | **String** | The dataset id to use for the request | |
|
152
|
-
| **
|
158
|
+
| **count_chunks_req_payload** | [**CountChunksReqPayload**](CountChunksReqPayload.md) | | |
|
153
159
|
|
154
160
|
### Return type
|
155
161
|
|
156
|
-
[**
|
162
|
+
[**CountChunkQueryResponseBody**](CountChunkQueryResponseBody.md)
|
163
|
+
|
164
|
+
### Authorization
|
165
|
+
|
166
|
+
[ApiKey](../README.md#ApiKey)
|
167
|
+
|
168
|
+
### HTTP request headers
|
169
|
+
|
170
|
+
- **Content-Type**: application/json
|
171
|
+
- **Accept**: application/json
|
172
|
+
|
173
|
+
|
174
|
+
## create_chunk
|
175
|
+
|
176
|
+
> <ReturnQueuedChunk> create_chunk(tr_dataset, create_chunk_req_payload_enum)
|
177
|
+
|
178
|
+
Create or Upsert Chunk or Chunks
|
179
|
+
|
180
|
+
Create 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. If uploading in bulk, the maximum amount of chunks that can be uploaded at once is 120 chunks. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
181
|
+
|
182
|
+
### Examples
|
183
|
+
|
184
|
+
```ruby
|
185
|
+
require 'time'
|
186
|
+
require 'trieve_ruby_client'
|
187
|
+
# setup authorization
|
188
|
+
TrieveRubyClient.configure do |config|
|
189
|
+
# Configure API key authorization: ApiKey
|
190
|
+
config.api_key['ApiKey'] = 'YOUR API KEY'
|
191
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
192
|
+
# config.api_key_prefix['ApiKey'] = 'Bearer'
|
193
|
+
end
|
194
|
+
|
195
|
+
api_instance = TrieveRubyClient::ChunkApi.new
|
196
|
+
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
197
|
+
create_chunk_req_payload_enum = nil # CreateChunkReqPayloadEnum | JSON request payload to create a new chunk (chunk)
|
198
|
+
|
199
|
+
begin
|
200
|
+
# Create or Upsert Chunk or Chunks
|
201
|
+
result = api_instance.create_chunk(tr_dataset, create_chunk_req_payload_enum)
|
202
|
+
p result
|
203
|
+
rescue TrieveRubyClient::ApiError => e
|
204
|
+
puts "Error when calling ChunkApi->create_chunk: #{e}"
|
205
|
+
end
|
206
|
+
```
|
207
|
+
|
208
|
+
#### Using the create_chunk_with_http_info variant
|
209
|
+
|
210
|
+
This returns an Array which contains the response data, status code and headers.
|
211
|
+
|
212
|
+
> <Array(<ReturnQueuedChunk>, Integer, Hash)> create_chunk_with_http_info(tr_dataset, create_chunk_req_payload_enum)
|
213
|
+
|
214
|
+
```ruby
|
215
|
+
begin
|
216
|
+
# Create or Upsert Chunk or Chunks
|
217
|
+
data, status_code, headers = api_instance.create_chunk_with_http_info(tr_dataset, create_chunk_req_payload_enum)
|
218
|
+
p status_code # => 2xx
|
219
|
+
p headers # => { ... }
|
220
|
+
p data # => <ReturnQueuedChunk>
|
221
|
+
rescue TrieveRubyClient::ApiError => e
|
222
|
+
puts "Error when calling ChunkApi->create_chunk_with_http_info: #{e}"
|
223
|
+
end
|
224
|
+
```
|
225
|
+
|
226
|
+
### Parameters
|
227
|
+
|
228
|
+
| Name | Type | Description | Notes |
|
229
|
+
| ---- | ---- | ----------- | ----- |
|
230
|
+
| **tr_dataset** | **String** | The dataset id to use for the request | |
|
231
|
+
| **create_chunk_req_payload_enum** | [**CreateChunkReqPayloadEnum**](CreateChunkReqPayloadEnum.md) | JSON request payload to create a new chunk (chunk) | |
|
232
|
+
|
233
|
+
### Return type
|
234
|
+
|
235
|
+
[**ReturnQueuedChunk**](ReturnQueuedChunk.md)
|
157
236
|
|
158
237
|
### Authorization
|
159
238
|
|
@@ -171,7 +250,7 @@ end
|
|
171
250
|
|
172
251
|
Delete Chunk
|
173
252
|
|
174
|
-
Delete
|
253
|
+
Delete a chunk by its id. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
175
254
|
|
176
255
|
### Examples
|
177
256
|
|
@@ -243,7 +322,7 @@ nil (empty response body)
|
|
243
322
|
|
244
323
|
Delete Chunk By Tracking Id
|
245
324
|
|
246
|
-
Delete
|
325
|
+
Delete a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
247
326
|
|
248
327
|
### Examples
|
249
328
|
|
@@ -315,7 +394,7 @@ nil (empty response body)
|
|
315
394
|
|
316
395
|
RAG on Specified Chunks
|
317
396
|
|
318
|
-
|
397
|
+
This endpoint exists as an alternative to the topic+message concept where our API handles chat memory. With this endpoint, the user is responsible for providing the context window and the prompt. See more in the \"search before generate\" page at docs.trieve.ai.
|
319
398
|
|
320
399
|
### Examples
|
321
400
|
|
@@ -332,7 +411,7 @@ end
|
|
332
411
|
|
333
412
|
api_instance = TrieveRubyClient::ChunkApi.new
|
334
413
|
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
335
|
-
generate_chunks_request = TrieveRubyClient::GenerateChunksRequest.new({chunk_ids: ['chunk_ids_example'], prev_messages: [TrieveRubyClient::ChatMessageProxy.new({content: 'content_example', role:
|
414
|
+
generate_chunks_request = TrieveRubyClient::GenerateChunksRequest.new({chunk_ids: ['chunk_ids_example'], prev_messages: [TrieveRubyClient::ChatMessageProxy.new({content: 'content_example', role: TrieveRubyClient::RoleProxy::SYSTEM})]}) # GenerateChunksRequest | JSON request payload to perform RAG on some chunks (chunks)
|
336
415
|
|
337
416
|
begin
|
338
417
|
# RAG on Specified Chunks
|
@@ -384,11 +463,11 @@ end
|
|
384
463
|
|
385
464
|
## get_chunk_by_id
|
386
465
|
|
387
|
-
> <
|
466
|
+
> <ChunkReturnTypes> get_chunk_by_id(tr_dataset, chunk_id, opts)
|
388
467
|
|
389
468
|
Get Chunk By Id
|
390
469
|
|
391
|
-
Get
|
470
|
+
Get a singular chunk by id.
|
392
471
|
|
393
472
|
### Examples
|
394
473
|
|
@@ -406,10 +485,13 @@ end
|
|
406
485
|
api_instance = TrieveRubyClient::ChunkApi.new
|
407
486
|
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
408
487
|
chunk_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Id of the chunk you want to fetch.
|
488
|
+
opts = {
|
489
|
+
x_api_version: TrieveRubyClient::APIVersion::V1 # APIVersion | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
490
|
+
}
|
409
491
|
|
410
492
|
begin
|
411
493
|
# Get Chunk By Id
|
412
|
-
result = api_instance.get_chunk_by_id(tr_dataset, chunk_id)
|
494
|
+
result = api_instance.get_chunk_by_id(tr_dataset, chunk_id, opts)
|
413
495
|
p result
|
414
496
|
rescue TrieveRubyClient::ApiError => e
|
415
497
|
puts "Error when calling ChunkApi->get_chunk_by_id: #{e}"
|
@@ -420,15 +502,15 @@ end
|
|
420
502
|
|
421
503
|
This returns an Array which contains the response data, status code and headers.
|
422
504
|
|
423
|
-
> <Array(<
|
505
|
+
> <Array(<ChunkReturnTypes>, Integer, Hash)> get_chunk_by_id_with_http_info(tr_dataset, chunk_id, opts)
|
424
506
|
|
425
507
|
```ruby
|
426
508
|
begin
|
427
509
|
# Get Chunk By Id
|
428
|
-
data, status_code, headers = api_instance.get_chunk_by_id_with_http_info(tr_dataset, chunk_id)
|
510
|
+
data, status_code, headers = api_instance.get_chunk_by_id_with_http_info(tr_dataset, chunk_id, opts)
|
429
511
|
p status_code # => 2xx
|
430
512
|
p headers # => { ... }
|
431
|
-
p data # => <
|
513
|
+
p data # => <ChunkReturnTypes>
|
432
514
|
rescue TrieveRubyClient::ApiError => e
|
433
515
|
puts "Error when calling ChunkApi->get_chunk_by_id_with_http_info: #{e}"
|
434
516
|
end
|
@@ -440,10 +522,11 @@ end
|
|
440
522
|
| ---- | ---- | ----------- | ----- |
|
441
523
|
| **tr_dataset** | **String** | The dataset id to use for the request | |
|
442
524
|
| **chunk_id** | **String** | Id of the chunk you want to fetch. | |
|
525
|
+
| **x_api_version** | [**APIVersion**](.md) | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise. | [optional] |
|
443
526
|
|
444
527
|
### Return type
|
445
528
|
|
446
|
-
[**
|
529
|
+
[**ChunkReturnTypes**](ChunkReturnTypes.md)
|
447
530
|
|
448
531
|
### Authorization
|
449
532
|
|
@@ -457,11 +540,11 @@ end
|
|
457
540
|
|
458
541
|
## get_chunk_by_tracking_id
|
459
542
|
|
460
|
-
> <
|
543
|
+
> <ChunkReturnTypes> get_chunk_by_tracking_id(tr_dataset, tracking_id, opts)
|
461
544
|
|
462
545
|
Get Chunk By Tracking Id
|
463
546
|
|
464
|
-
Get
|
547
|
+
Get a singular chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use your own id as the primary reference for a chunk.
|
465
548
|
|
466
549
|
### Examples
|
467
550
|
|
@@ -479,10 +562,13 @@ end
|
|
479
562
|
api_instance = TrieveRubyClient::ChunkApi.new
|
480
563
|
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
481
564
|
tracking_id = 'tracking_id_example' # String | tracking_id of the chunk you want to fetch
|
565
|
+
opts = {
|
566
|
+
x_api_version: TrieveRubyClient::APIVersion::V1 # APIVersion | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
567
|
+
}
|
482
568
|
|
483
569
|
begin
|
484
570
|
# Get Chunk By Tracking Id
|
485
|
-
result = api_instance.get_chunk_by_tracking_id(tr_dataset, tracking_id)
|
571
|
+
result = api_instance.get_chunk_by_tracking_id(tr_dataset, tracking_id, opts)
|
486
572
|
p result
|
487
573
|
rescue TrieveRubyClient::ApiError => e
|
488
574
|
puts "Error when calling ChunkApi->get_chunk_by_tracking_id: #{e}"
|
@@ -493,15 +579,15 @@ end
|
|
493
579
|
|
494
580
|
This returns an Array which contains the response data, status code and headers.
|
495
581
|
|
496
|
-
> <Array(<
|
582
|
+
> <Array(<ChunkReturnTypes>, Integer, Hash)> get_chunk_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts)
|
497
583
|
|
498
584
|
```ruby
|
499
585
|
begin
|
500
586
|
# Get Chunk By Tracking Id
|
501
|
-
data, status_code, headers = api_instance.get_chunk_by_tracking_id_with_http_info(tr_dataset, tracking_id)
|
587
|
+
data, status_code, headers = api_instance.get_chunk_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts)
|
502
588
|
p status_code # => 2xx
|
503
589
|
p headers # => { ... }
|
504
|
-
p data # => <
|
590
|
+
p data # => <ChunkReturnTypes>
|
505
591
|
rescue TrieveRubyClient::ApiError => e
|
506
592
|
puts "Error when calling ChunkApi->get_chunk_by_tracking_id_with_http_info: #{e}"
|
507
593
|
end
|
@@ -513,10 +599,11 @@ end
|
|
513
599
|
| ---- | ---- | ----------- | ----- |
|
514
600
|
| **tr_dataset** | **String** | The dataset id to use for the request | |
|
515
601
|
| **tracking_id** | **String** | tracking_id of the chunk you want to fetch | |
|
602
|
+
| **x_api_version** | [**APIVersion**](.md) | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise. | [optional] |
|
516
603
|
|
517
604
|
### Return type
|
518
605
|
|
519
|
-
[**
|
606
|
+
[**ChunkReturnTypes**](ChunkReturnTypes.md)
|
520
607
|
|
521
608
|
### Authorization
|
522
609
|
|
@@ -530,11 +617,11 @@ end
|
|
530
617
|
|
531
618
|
## get_chunks_by_ids
|
532
619
|
|
533
|
-
> <Array<
|
620
|
+
> <Array<ChunkReturnTypes>> get_chunks_by_ids(tr_dataset, get_chunks_data, opts)
|
534
621
|
|
535
622
|
Get Chunks By Ids
|
536
623
|
|
537
|
-
Get
|
624
|
+
Get multiple chunks by multiple ids.
|
538
625
|
|
539
626
|
### Examples
|
540
627
|
|
@@ -552,10 +639,13 @@ end
|
|
552
639
|
api_instance = TrieveRubyClient::ChunkApi.new
|
553
640
|
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
554
641
|
get_chunks_data = TrieveRubyClient::GetChunksData.new({ids: ['ids_example']}) # GetChunksData | JSON request payload to get the chunks in the request
|
642
|
+
opts = {
|
643
|
+
x_api_version: TrieveRubyClient::APIVersion::V1 # APIVersion | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
644
|
+
}
|
555
645
|
|
556
646
|
begin
|
557
647
|
# Get Chunks By Ids
|
558
|
-
result = api_instance.get_chunks_by_ids(tr_dataset, get_chunks_data)
|
648
|
+
result = api_instance.get_chunks_by_ids(tr_dataset, get_chunks_data, opts)
|
559
649
|
p result
|
560
650
|
rescue TrieveRubyClient::ApiError => e
|
561
651
|
puts "Error when calling ChunkApi->get_chunks_by_ids: #{e}"
|
@@ -566,15 +656,15 @@ end
|
|
566
656
|
|
567
657
|
This returns an Array which contains the response data, status code and headers.
|
568
658
|
|
569
|
-
> <Array(<Array<
|
659
|
+
> <Array(<Array<ChunkReturnTypes>>, Integer, Hash)> get_chunks_by_ids_with_http_info(tr_dataset, get_chunks_data, opts)
|
570
660
|
|
571
661
|
```ruby
|
572
662
|
begin
|
573
663
|
# Get Chunks By Ids
|
574
|
-
data, status_code, headers = api_instance.get_chunks_by_ids_with_http_info(tr_dataset, get_chunks_data)
|
664
|
+
data, status_code, headers = api_instance.get_chunks_by_ids_with_http_info(tr_dataset, get_chunks_data, opts)
|
575
665
|
p status_code # => 2xx
|
576
666
|
p headers # => { ... }
|
577
|
-
p data # => <Array<
|
667
|
+
p data # => <Array<ChunkReturnTypes>>
|
578
668
|
rescue TrieveRubyClient::ApiError => e
|
579
669
|
puts "Error when calling ChunkApi->get_chunks_by_ids_with_http_info: #{e}"
|
580
670
|
end
|
@@ -586,10 +676,11 @@ end
|
|
586
676
|
| ---- | ---- | ----------- | ----- |
|
587
677
|
| **tr_dataset** | **String** | The dataset id to use for the request | |
|
588
678
|
| **get_chunks_data** | [**GetChunksData**](GetChunksData.md) | JSON request payload to get the chunks in the request | |
|
679
|
+
| **x_api_version** | [**APIVersion**](.md) | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise. | [optional] |
|
589
680
|
|
590
681
|
### Return type
|
591
682
|
|
592
|
-
[**Array<
|
683
|
+
[**Array<ChunkReturnTypes>**](ChunkReturnTypes.md)
|
593
684
|
|
594
685
|
### Authorization
|
595
686
|
|
@@ -603,11 +694,11 @@ end
|
|
603
694
|
|
604
695
|
## get_chunks_by_tracking_ids
|
605
696
|
|
606
|
-
> <
|
697
|
+
> <Array<ChunkReturnTypes>> get_chunks_by_tracking_ids(tr_dataset, get_tracking_chunks_data, opts)
|
607
698
|
|
608
|
-
Get Chunks By
|
699
|
+
Get Chunks By Tracking Ids
|
609
700
|
|
610
|
-
Get
|
701
|
+
Get multiple chunks by ids.
|
611
702
|
|
612
703
|
### Examples
|
613
704
|
|
@@ -625,10 +716,13 @@ end
|
|
625
716
|
api_instance = TrieveRubyClient::ChunkApi.new
|
626
717
|
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
627
718
|
get_tracking_chunks_data = TrieveRubyClient::GetTrackingChunksData.new({tracking_ids: ['tracking_ids_example']}) # GetTrackingChunksData | JSON request payload to get the chunks in the request
|
719
|
+
opts = {
|
720
|
+
x_api_version: TrieveRubyClient::APIVersion::V1 # APIVersion | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
721
|
+
}
|
628
722
|
|
629
723
|
begin
|
630
|
-
# Get Chunks By
|
631
|
-
result = api_instance.get_chunks_by_tracking_ids(tr_dataset, get_tracking_chunks_data)
|
724
|
+
# Get Chunks By Tracking Ids
|
725
|
+
result = api_instance.get_chunks_by_tracking_ids(tr_dataset, get_tracking_chunks_data, opts)
|
632
726
|
p result
|
633
727
|
rescue TrieveRubyClient::ApiError => e
|
634
728
|
puts "Error when calling ChunkApi->get_chunks_by_tracking_ids: #{e}"
|
@@ -639,15 +733,15 @@ end
|
|
639
733
|
|
640
734
|
This returns an Array which contains the response data, status code and headers.
|
641
735
|
|
642
|
-
> <Array(<
|
736
|
+
> <Array(<Array<ChunkReturnTypes>>, Integer, Hash)> get_chunks_by_tracking_ids_with_http_info(tr_dataset, get_tracking_chunks_data, opts)
|
643
737
|
|
644
738
|
```ruby
|
645
739
|
begin
|
646
|
-
# Get Chunks By
|
647
|
-
data, status_code, headers = api_instance.get_chunks_by_tracking_ids_with_http_info(tr_dataset, get_tracking_chunks_data)
|
740
|
+
# Get Chunks By Tracking Ids
|
741
|
+
data, status_code, headers = api_instance.get_chunks_by_tracking_ids_with_http_info(tr_dataset, get_tracking_chunks_data, opts)
|
648
742
|
p status_code # => 2xx
|
649
743
|
p headers # => { ... }
|
650
|
-
p data # => <
|
744
|
+
p data # => <Array<ChunkReturnTypes>>
|
651
745
|
rescue TrieveRubyClient::ApiError => e
|
652
746
|
puts "Error when calling ChunkApi->get_chunks_by_tracking_ids_with_http_info: #{e}"
|
653
747
|
end
|
@@ -659,10 +753,11 @@ end
|
|
659
753
|
| ---- | ---- | ----------- | ----- |
|
660
754
|
| **tr_dataset** | **String** | The dataset id to use for the request | |
|
661
755
|
| **get_tracking_chunks_data** | [**GetTrackingChunksData**](GetTrackingChunksData.md) | JSON request payload to get the chunks in the request | |
|
756
|
+
| **x_api_version** | [**APIVersion**](.md) | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise. | [optional] |
|
662
757
|
|
663
758
|
### Return type
|
664
759
|
|
665
|
-
[**
|
760
|
+
[**Array<ChunkReturnTypes>**](ChunkReturnTypes.md)
|
666
761
|
|
667
762
|
### Authorization
|
668
763
|
|
@@ -676,11 +771,11 @@ end
|
|
676
771
|
|
677
772
|
## get_recommended_chunks
|
678
773
|
|
679
|
-
> <
|
774
|
+
> <RecommendResponseTypes> get_recommended_chunks(tr_dataset, recommend_chunks_request, opts)
|
680
775
|
|
681
776
|
Get Recommended Chunks
|
682
777
|
|
683
|
-
Get
|
778
|
+
Get recommendations of chunks similar to the positive samples in the request and dissimilar to the negative. You must provide at least one of either positive_chunk_ids or positive_tracking_ids.
|
684
779
|
|
685
780
|
### Examples
|
686
781
|
|
@@ -698,10 +793,13 @@ end
|
|
698
793
|
api_instance = TrieveRubyClient::ChunkApi.new
|
699
794
|
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
700
795
|
recommend_chunks_request = TrieveRubyClient::RecommendChunksRequest.new # RecommendChunksRequest | JSON request payload to get recommendations of chunks similar to the chunks in the request
|
796
|
+
opts = {
|
797
|
+
x_api_version: TrieveRubyClient::APIVersion::V1 # APIVersion | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
798
|
+
}
|
701
799
|
|
702
800
|
begin
|
703
801
|
# Get Recommended Chunks
|
704
|
-
result = api_instance.get_recommended_chunks(tr_dataset, recommend_chunks_request)
|
802
|
+
result = api_instance.get_recommended_chunks(tr_dataset, recommend_chunks_request, opts)
|
705
803
|
p result
|
706
804
|
rescue TrieveRubyClient::ApiError => e
|
707
805
|
puts "Error when calling ChunkApi->get_recommended_chunks: #{e}"
|
@@ -712,15 +810,15 @@ end
|
|
712
810
|
|
713
811
|
This returns an Array which contains the response data, status code and headers.
|
714
812
|
|
715
|
-
> <Array(<
|
813
|
+
> <Array(<RecommendResponseTypes>, Integer, Hash)> get_recommended_chunks_with_http_info(tr_dataset, recommend_chunks_request, opts)
|
716
814
|
|
717
815
|
```ruby
|
718
816
|
begin
|
719
817
|
# Get Recommended Chunks
|
720
|
-
data, status_code, headers = api_instance.get_recommended_chunks_with_http_info(tr_dataset, recommend_chunks_request)
|
818
|
+
data, status_code, headers = api_instance.get_recommended_chunks_with_http_info(tr_dataset, recommend_chunks_request, opts)
|
721
819
|
p status_code # => 2xx
|
722
820
|
p headers # => { ... }
|
723
|
-
p data # => <
|
821
|
+
p data # => <RecommendResponseTypes>
|
724
822
|
rescue TrieveRubyClient::ApiError => e
|
725
823
|
puts "Error when calling ChunkApi->get_recommended_chunks_with_http_info: #{e}"
|
726
824
|
end
|
@@ -732,10 +830,84 @@ end
|
|
732
830
|
| ---- | ---- | ----------- | ----- |
|
733
831
|
| **tr_dataset** | **String** | The dataset id to use for the request | |
|
734
832
|
| **recommend_chunks_request** | [**RecommendChunksRequest**](RecommendChunksRequest.md) | JSON request payload to get recommendations of chunks similar to the chunks in the request | |
|
833
|
+
| **x_api_version** | [**APIVersion**](.md) | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise. | [optional] |
|
735
834
|
|
736
835
|
### Return type
|
737
836
|
|
738
|
-
[**
|
837
|
+
[**RecommendResponseTypes**](RecommendResponseTypes.md)
|
838
|
+
|
839
|
+
### Authorization
|
840
|
+
|
841
|
+
[ApiKey](../README.md#ApiKey)
|
842
|
+
|
843
|
+
### HTTP request headers
|
844
|
+
|
845
|
+
- **Content-Type**: application/json
|
846
|
+
- **Accept**: application/json
|
847
|
+
|
848
|
+
|
849
|
+
## get_suggested_queries
|
850
|
+
|
851
|
+
> <SuggestedQueriesResponse> get_suggested_queries(tr_dataset, suggested_queries_req_payload)
|
852
|
+
|
853
|
+
Generate suggested queries
|
854
|
+
|
855
|
+
This endpoint will generate 3 suggested queries based off a hybrid search using RAG with the query provided in the request body and return them as a JSON object.
|
856
|
+
|
857
|
+
### Examples
|
858
|
+
|
859
|
+
```ruby
|
860
|
+
require 'time'
|
861
|
+
require 'trieve_ruby_client'
|
862
|
+
# setup authorization
|
863
|
+
TrieveRubyClient.configure do |config|
|
864
|
+
# Configure API key authorization: ApiKey
|
865
|
+
config.api_key['ApiKey'] = 'YOUR API KEY'
|
866
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
867
|
+
# config.api_key_prefix['ApiKey'] = 'Bearer'
|
868
|
+
end
|
869
|
+
|
870
|
+
api_instance = TrieveRubyClient::ChunkApi.new
|
871
|
+
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
872
|
+
suggested_queries_req_payload = TrieveRubyClient::SuggestedQueriesReqPayload.new({query: 'query_example'}) # SuggestedQueriesReqPayload | JSON request payload to get alternative suggested queries
|
873
|
+
|
874
|
+
begin
|
875
|
+
# Generate suggested queries
|
876
|
+
result = api_instance.get_suggested_queries(tr_dataset, suggested_queries_req_payload)
|
877
|
+
p result
|
878
|
+
rescue TrieveRubyClient::ApiError => e
|
879
|
+
puts "Error when calling ChunkApi->get_suggested_queries: #{e}"
|
880
|
+
end
|
881
|
+
```
|
882
|
+
|
883
|
+
#### Using the get_suggested_queries_with_http_info variant
|
884
|
+
|
885
|
+
This returns an Array which contains the response data, status code and headers.
|
886
|
+
|
887
|
+
> <Array(<SuggestedQueriesResponse>, Integer, Hash)> get_suggested_queries_with_http_info(tr_dataset, suggested_queries_req_payload)
|
888
|
+
|
889
|
+
```ruby
|
890
|
+
begin
|
891
|
+
# Generate suggested queries
|
892
|
+
data, status_code, headers = api_instance.get_suggested_queries_with_http_info(tr_dataset, suggested_queries_req_payload)
|
893
|
+
p status_code # => 2xx
|
894
|
+
p headers # => { ... }
|
895
|
+
p data # => <SuggestedQueriesResponse>
|
896
|
+
rescue TrieveRubyClient::ApiError => e
|
897
|
+
puts "Error when calling ChunkApi->get_suggested_queries_with_http_info: #{e}"
|
898
|
+
end
|
899
|
+
```
|
900
|
+
|
901
|
+
### Parameters
|
902
|
+
|
903
|
+
| Name | Type | Description | Notes |
|
904
|
+
| ---- | ---- | ----------- | ----- |
|
905
|
+
| **tr_dataset** | **String** | The dataset id to use for the request | |
|
906
|
+
| **suggested_queries_req_payload** | [**SuggestedQueriesReqPayload**](SuggestedQueriesReqPayload.md) | JSON request payload to get alternative suggested queries | |
|
907
|
+
|
908
|
+
### Return type
|
909
|
+
|
910
|
+
[**SuggestedQueriesResponse**](SuggestedQueriesResponse.md)
|
739
911
|
|
740
912
|
### Authorization
|
741
913
|
|
@@ -749,11 +921,11 @@ end
|
|
749
921
|
|
750
922
|
## search_chunks
|
751
923
|
|
752
|
-
> <
|
924
|
+
> <SearchResponseTypes> search_chunks(tr_dataset, search_chunks_req_payload, opts)
|
753
925
|
|
754
926
|
Search
|
755
927
|
|
756
|
-
|
928
|
+
This 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.
|
757
929
|
|
758
930
|
### Examples
|
759
931
|
|
@@ -770,11 +942,14 @@ end
|
|
770
942
|
|
771
943
|
api_instance = TrieveRubyClient::ChunkApi.new
|
772
944
|
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
773
|
-
|
945
|
+
search_chunks_req_payload = TrieveRubyClient::SearchChunksReqPayload.new({query: 'query_example', search_type: TrieveRubyClient::SearchMethod::FULL_TEXT}) # SearchChunksReqPayload | JSON request payload to semantically search for chunks (chunks)
|
946
|
+
opts = {
|
947
|
+
x_api_version: TrieveRubyClient::APIVersion::V1 # APIVersion | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
948
|
+
}
|
774
949
|
|
775
950
|
begin
|
776
951
|
# Search
|
777
|
-
result = api_instance.search_chunks(tr_dataset,
|
952
|
+
result = api_instance.search_chunks(tr_dataset, search_chunks_req_payload, opts)
|
778
953
|
p result
|
779
954
|
rescue TrieveRubyClient::ApiError => e
|
780
955
|
puts "Error when calling ChunkApi->search_chunks: #{e}"
|
@@ -785,15 +960,15 @@ end
|
|
785
960
|
|
786
961
|
This returns an Array which contains the response data, status code and headers.
|
787
962
|
|
788
|
-
> <Array(<
|
963
|
+
> <Array(<SearchResponseTypes>, Integer, Hash)> search_chunks_with_http_info(tr_dataset, search_chunks_req_payload, opts)
|
789
964
|
|
790
965
|
```ruby
|
791
966
|
begin
|
792
967
|
# Search
|
793
|
-
data, status_code, headers = api_instance.search_chunks_with_http_info(tr_dataset,
|
968
|
+
data, status_code, headers = api_instance.search_chunks_with_http_info(tr_dataset, search_chunks_req_payload, opts)
|
794
969
|
p status_code # => 2xx
|
795
970
|
p headers # => { ... }
|
796
|
-
p data # => <
|
971
|
+
p data # => <SearchResponseTypes>
|
797
972
|
rescue TrieveRubyClient::ApiError => e
|
798
973
|
puts "Error when calling ChunkApi->search_chunks_with_http_info: #{e}"
|
799
974
|
end
|
@@ -804,11 +979,12 @@ end
|
|
804
979
|
| Name | Type | Description | Notes |
|
805
980
|
| ---- | ---- | ----------- | ----- |
|
806
981
|
| **tr_dataset** | **String** | The dataset id to use for the request | |
|
807
|
-
| **
|
982
|
+
| **search_chunks_req_payload** | [**SearchChunksReqPayload**](SearchChunksReqPayload.md) | JSON request payload to semantically search for chunks (chunks) | |
|
983
|
+
| **x_api_version** | [**APIVersion**](.md) | The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise. | [optional] |
|
808
984
|
|
809
985
|
### Return type
|
810
986
|
|
811
|
-
[**
|
987
|
+
[**SearchResponseTypes**](SearchResponseTypes.md)
|
812
988
|
|
813
989
|
### Authorization
|
814
990
|
|
@@ -822,11 +998,11 @@ end
|
|
822
998
|
|
823
999
|
## update_chunk
|
824
1000
|
|
825
|
-
> update_chunk(tr_dataset,
|
1001
|
+
> update_chunk(tr_dataset, update_chunk_req_payload)
|
826
1002
|
|
827
1003
|
Update Chunk
|
828
1004
|
|
829
|
-
Update
|
1005
|
+
Update a chunk. If you try to change the tracking_id of the chunk to have the same tracking_id as an existing chunk, the request will fail. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
830
1006
|
|
831
1007
|
### Examples
|
832
1008
|
|
@@ -843,11 +1019,11 @@ end
|
|
843
1019
|
|
844
1020
|
api_instance = TrieveRubyClient::ChunkApi.new
|
845
1021
|
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
|
846
|
-
|
1022
|
+
update_chunk_req_payload = TrieveRubyClient::UpdateChunkReqPayload.new # UpdateChunkReqPayload | JSON request payload to update a chunk (chunk)
|
847
1023
|
|
848
1024
|
begin
|
849
1025
|
# Update Chunk
|
850
|
-
api_instance.update_chunk(tr_dataset,
|
1026
|
+
api_instance.update_chunk(tr_dataset, update_chunk_req_payload)
|
851
1027
|
rescue TrieveRubyClient::ApiError => e
|
852
1028
|
puts "Error when calling ChunkApi->update_chunk: #{e}"
|
853
1029
|
end
|
@@ -857,12 +1033,12 @@ end
|
|
857
1033
|
|
858
1034
|
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
859
1035
|
|
860
|
-
> <Array(nil, Integer, Hash)> update_chunk_with_http_info(tr_dataset,
|
1036
|
+
> <Array(nil, Integer, Hash)> update_chunk_with_http_info(tr_dataset, update_chunk_req_payload)
|
861
1037
|
|
862
1038
|
```ruby
|
863
1039
|
begin
|
864
1040
|
# Update Chunk
|
865
|
-
data, status_code, headers = api_instance.update_chunk_with_http_info(tr_dataset,
|
1041
|
+
data, status_code, headers = api_instance.update_chunk_with_http_info(tr_dataset, update_chunk_req_payload)
|
866
1042
|
p status_code # => 2xx
|
867
1043
|
p headers # => { ... }
|
868
1044
|
p data # => nil
|
@@ -876,7 +1052,7 @@ end
|
|
876
1052
|
| Name | Type | Description | Notes |
|
877
1053
|
| ---- | ---- | ----------- | ----- |
|
878
1054
|
| **tr_dataset** | **String** | The dataset id to use for the request | |
|
879
|
-
| **
|
1055
|
+
| **update_chunk_req_payload** | [**UpdateChunkReqPayload**](UpdateChunkReqPayload.md) | JSON request payload to update a chunk (chunk) | |
|
880
1056
|
|
881
1057
|
### Return type
|
882
1058
|
|
@@ -898,7 +1074,7 @@ nil (empty response body)
|
|
898
1074
|
|
899
1075
|
Update Chunk By Tracking Id
|
900
1076
|
|
901
|
-
Update
|
1077
|
+
Update a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. Auth'ed user or api key must have an admin or owner role for the specified dataset's organization.
|
902
1078
|
|
903
1079
|
### Examples
|
904
1080
|
|