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
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.11.0
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -19,37 +19,39 @@ module TrieveRubyClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
#
|
23
|
-
#
|
22
|
+
# Autocomplete
|
23
|
+
# This route provides the primary autocomplete functionality for the API. This prioritize prefix matching with semantic or full-text search.
|
24
24
|
# @param tr_dataset [String] The dataset id to use for the request
|
25
|
-
# @param
|
25
|
+
# @param autocomplete_req_payload [AutocompleteReqPayload] JSON request payload to semantically search for chunks (chunks)
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
|
-
# @
|
28
|
-
|
29
|
-
|
27
|
+
# @option opts [APIVersion] :x_api_version The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
28
|
+
# @return [SearchResponseTypes]
|
29
|
+
def autocomplete(tr_dataset, autocomplete_req_payload, opts = {})
|
30
|
+
data, _status_code, _headers = autocomplete_with_http_info(tr_dataset, autocomplete_req_payload, opts)
|
30
31
|
data
|
31
32
|
end
|
32
33
|
|
33
|
-
#
|
34
|
-
#
|
34
|
+
# Autocomplete
|
35
|
+
# This route provides the primary autocomplete functionality for the API. This prioritize prefix matching with semantic or full-text search.
|
35
36
|
# @param tr_dataset [String] The dataset id to use for the request
|
36
|
-
# @param
|
37
|
+
# @param autocomplete_req_payload [AutocompleteReqPayload] JSON request payload to semantically search for chunks (chunks)
|
37
38
|
# @param [Hash] opts the optional parameters
|
38
|
-
# @
|
39
|
-
|
39
|
+
# @option opts [APIVersion] :x_api_version The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
40
|
+
# @return [Array<(SearchResponseTypes, Integer, Hash)>] SearchResponseTypes data, response status code and response headers
|
41
|
+
def autocomplete_with_http_info(tr_dataset, autocomplete_req_payload, opts = {})
|
40
42
|
if @api_client.config.debugging
|
41
|
-
@api_client.config.logger.debug 'Calling API: ChunkApi.
|
43
|
+
@api_client.config.logger.debug 'Calling API: ChunkApi.autocomplete ...'
|
42
44
|
end
|
43
45
|
# verify the required parameter 'tr_dataset' is set
|
44
46
|
if @api_client.config.client_side_validation && tr_dataset.nil?
|
45
|
-
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.
|
47
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.autocomplete"
|
46
48
|
end
|
47
|
-
# verify the required parameter '
|
48
|
-
if @api_client.config.client_side_validation &&
|
49
|
-
fail ArgumentError, "Missing the required parameter '
|
49
|
+
# verify the required parameter 'autocomplete_req_payload' is set
|
50
|
+
if @api_client.config.client_side_validation && autocomplete_req_payload.nil?
|
51
|
+
fail ArgumentError, "Missing the required parameter 'autocomplete_req_payload' when calling ChunkApi.autocomplete"
|
50
52
|
end
|
51
53
|
# resource path
|
52
|
-
local_var_path = '/api/chunk'
|
54
|
+
local_var_path = '/api/chunk/autocomplete'
|
53
55
|
|
54
56
|
# query parameters
|
55
57
|
query_params = opts[:query_params] || {}
|
@@ -64,21 +66,22 @@ module TrieveRubyClient
|
|
64
66
|
header_params['Content-Type'] = content_type
|
65
67
|
end
|
66
68
|
header_params[:'TR-Dataset'] = tr_dataset
|
69
|
+
header_params[:'X-API-Version'] = opts[:'x_api_version'] if !opts[:'x_api_version'].nil?
|
67
70
|
|
68
71
|
# form parameters
|
69
72
|
form_params = opts[:form_params] || {}
|
70
73
|
|
71
74
|
# http body (model)
|
72
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
75
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(autocomplete_req_payload)
|
73
76
|
|
74
77
|
# return_type
|
75
|
-
return_type = opts[:debug_return_type] || '
|
78
|
+
return_type = opts[:debug_return_type] || 'SearchResponseTypes'
|
76
79
|
|
77
80
|
# auth_names
|
78
81
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
79
82
|
|
80
83
|
new_options = opts.merge(
|
81
|
-
:operation => :"ChunkApi.
|
84
|
+
:operation => :"ChunkApi.autocomplete",
|
82
85
|
:header_params => header_params,
|
83
86
|
:query_params => query_params,
|
84
87
|
:form_params => form_params,
|
@@ -89,42 +92,42 @@ module TrieveRubyClient
|
|
89
92
|
|
90
93
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
91
94
|
if @api_client.config.debugging
|
92
|
-
@api_client.config.logger.debug "API called: ChunkApi#
|
95
|
+
@api_client.config.logger.debug "API called: ChunkApi#autocomplete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
93
96
|
end
|
94
97
|
return data, status_code, headers
|
95
98
|
end
|
96
99
|
|
97
|
-
#
|
98
|
-
#
|
100
|
+
# Count chunks above threshold
|
101
|
+
# 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.
|
99
102
|
# @param tr_dataset [String] The dataset id to use for the request
|
100
|
-
# @param
|
103
|
+
# @param count_chunks_req_payload [CountChunksReqPayload]
|
101
104
|
# @param [Hash] opts the optional parameters
|
102
|
-
# @return [
|
103
|
-
def
|
104
|
-
data, _status_code, _headers =
|
105
|
+
# @return [CountChunkQueryResponseBody]
|
106
|
+
def count_chunks(tr_dataset, count_chunks_req_payload, opts = {})
|
107
|
+
data, _status_code, _headers = count_chunks_with_http_info(tr_dataset, count_chunks_req_payload, opts)
|
105
108
|
data
|
106
109
|
end
|
107
110
|
|
108
|
-
#
|
109
|
-
#
|
111
|
+
# Count chunks above threshold
|
112
|
+
# 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.
|
110
113
|
# @param tr_dataset [String] The dataset id to use for the request
|
111
|
-
# @param
|
114
|
+
# @param count_chunks_req_payload [CountChunksReqPayload]
|
112
115
|
# @param [Hash] opts the optional parameters
|
113
|
-
# @return [Array<(
|
114
|
-
def
|
116
|
+
# @return [Array<(CountChunkQueryResponseBody, Integer, Hash)>] CountChunkQueryResponseBody data, response status code and response headers
|
117
|
+
def count_chunks_with_http_info(tr_dataset, count_chunks_req_payload, opts = {})
|
115
118
|
if @api_client.config.debugging
|
116
|
-
@api_client.config.logger.debug 'Calling API: ChunkApi.
|
119
|
+
@api_client.config.logger.debug 'Calling API: ChunkApi.count_chunks ...'
|
117
120
|
end
|
118
121
|
# verify the required parameter 'tr_dataset' is set
|
119
122
|
if @api_client.config.client_side_validation && tr_dataset.nil?
|
120
|
-
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.
|
123
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.count_chunks"
|
121
124
|
end
|
122
|
-
# verify the required parameter '
|
123
|
-
if @api_client.config.client_side_validation &&
|
124
|
-
fail ArgumentError, "Missing the required parameter '
|
125
|
+
# verify the required parameter 'count_chunks_req_payload' is set
|
126
|
+
if @api_client.config.client_side_validation && count_chunks_req_payload.nil?
|
127
|
+
fail ArgumentError, "Missing the required parameter 'count_chunks_req_payload' when calling ChunkApi.count_chunks"
|
125
128
|
end
|
126
129
|
# resource path
|
127
|
-
local_var_path = '/api/chunk/
|
130
|
+
local_var_path = '/api/chunk/count'
|
128
131
|
|
129
132
|
# query parameters
|
130
133
|
query_params = opts[:query_params] || {}
|
@@ -144,16 +147,91 @@ module TrieveRubyClient
|
|
144
147
|
form_params = opts[:form_params] || {}
|
145
148
|
|
146
149
|
# http body (model)
|
147
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
150
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(count_chunks_req_payload)
|
148
151
|
|
149
152
|
# return_type
|
150
|
-
return_type = opts[:debug_return_type] || '
|
153
|
+
return_type = opts[:debug_return_type] || 'CountChunkQueryResponseBody'
|
154
|
+
|
155
|
+
# auth_names
|
156
|
+
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
157
|
+
|
158
|
+
new_options = opts.merge(
|
159
|
+
:operation => :"ChunkApi.count_chunks",
|
160
|
+
:header_params => header_params,
|
161
|
+
:query_params => query_params,
|
162
|
+
:form_params => form_params,
|
163
|
+
:body => post_body,
|
164
|
+
:auth_names => auth_names,
|
165
|
+
:return_type => return_type
|
166
|
+
)
|
167
|
+
|
168
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
169
|
+
if @api_client.config.debugging
|
170
|
+
@api_client.config.logger.debug "API called: ChunkApi#count_chunks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
171
|
+
end
|
172
|
+
return data, status_code, headers
|
173
|
+
end
|
174
|
+
|
175
|
+
# Create or Upsert Chunk or Chunks
|
176
|
+
# 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.
|
177
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
178
|
+
# @param create_chunk_req_payload_enum [CreateChunkReqPayloadEnum] JSON request payload to create a new chunk (chunk)
|
179
|
+
# @param [Hash] opts the optional parameters
|
180
|
+
# @return [ReturnQueuedChunk]
|
181
|
+
def create_chunk(tr_dataset, create_chunk_req_payload_enum, opts = {})
|
182
|
+
data, _status_code, _headers = create_chunk_with_http_info(tr_dataset, create_chunk_req_payload_enum, opts)
|
183
|
+
data
|
184
|
+
end
|
185
|
+
|
186
|
+
# Create or Upsert Chunk or Chunks
|
187
|
+
# 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.
|
188
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
189
|
+
# @param create_chunk_req_payload_enum [CreateChunkReqPayloadEnum] JSON request payload to create a new chunk (chunk)
|
190
|
+
# @param [Hash] opts the optional parameters
|
191
|
+
# @return [Array<(ReturnQueuedChunk, Integer, Hash)>] ReturnQueuedChunk data, response status code and response headers
|
192
|
+
def create_chunk_with_http_info(tr_dataset, create_chunk_req_payload_enum, opts = {})
|
193
|
+
if @api_client.config.debugging
|
194
|
+
@api_client.config.logger.debug 'Calling API: ChunkApi.create_chunk ...'
|
195
|
+
end
|
196
|
+
# verify the required parameter 'tr_dataset' is set
|
197
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
198
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.create_chunk"
|
199
|
+
end
|
200
|
+
# verify the required parameter 'create_chunk_req_payload_enum' is set
|
201
|
+
if @api_client.config.client_side_validation && create_chunk_req_payload_enum.nil?
|
202
|
+
fail ArgumentError, "Missing the required parameter 'create_chunk_req_payload_enum' when calling ChunkApi.create_chunk"
|
203
|
+
end
|
204
|
+
# resource path
|
205
|
+
local_var_path = '/api/chunk'
|
206
|
+
|
207
|
+
# query parameters
|
208
|
+
query_params = opts[:query_params] || {}
|
209
|
+
|
210
|
+
# header parameters
|
211
|
+
header_params = opts[:header_params] || {}
|
212
|
+
# HTTP header 'Accept' (if needed)
|
213
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
214
|
+
# HTTP header 'Content-Type'
|
215
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
216
|
+
if !content_type.nil?
|
217
|
+
header_params['Content-Type'] = content_type
|
218
|
+
end
|
219
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
220
|
+
|
221
|
+
# form parameters
|
222
|
+
form_params = opts[:form_params] || {}
|
223
|
+
|
224
|
+
# http body (model)
|
225
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_chunk_req_payload_enum)
|
226
|
+
|
227
|
+
# return_type
|
228
|
+
return_type = opts[:debug_return_type] || 'ReturnQueuedChunk'
|
151
229
|
|
152
230
|
# auth_names
|
153
231
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
154
232
|
|
155
233
|
new_options = opts.merge(
|
156
|
-
:operation => :"ChunkApi.
|
234
|
+
:operation => :"ChunkApi.create_chunk",
|
157
235
|
:header_params => header_params,
|
158
236
|
:query_params => query_params,
|
159
237
|
:form_params => form_params,
|
@@ -164,13 +242,13 @@ module TrieveRubyClient
|
|
164
242
|
|
165
243
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
166
244
|
if @api_client.config.debugging
|
167
|
-
@api_client.config.logger.debug "API called: ChunkApi#
|
245
|
+
@api_client.config.logger.debug "API called: ChunkApi#create_chunk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
168
246
|
end
|
169
247
|
return data, status_code, headers
|
170
248
|
end
|
171
249
|
|
172
250
|
# Delete Chunk
|
173
|
-
# Delete
|
251
|
+
# 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.
|
174
252
|
# @param tr_dataset [String] The dataset id to use for the request
|
175
253
|
# @param chunk_id [String] Id of the chunk you want to fetch.
|
176
254
|
# @param [Hash] opts the optional parameters
|
@@ -181,7 +259,7 @@ module TrieveRubyClient
|
|
181
259
|
end
|
182
260
|
|
183
261
|
# Delete Chunk
|
184
|
-
# Delete
|
262
|
+
# 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.
|
185
263
|
# @param tr_dataset [String] The dataset id to use for the request
|
186
264
|
# @param chunk_id [String] Id of the chunk you want to fetch.
|
187
265
|
# @param [Hash] opts the optional parameters
|
@@ -240,7 +318,7 @@ module TrieveRubyClient
|
|
240
318
|
end
|
241
319
|
|
242
320
|
# Delete Chunk By Tracking Id
|
243
|
-
# Delete
|
321
|
+
# 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.
|
244
322
|
# @param tr_dataset [String] The dataset id to use for the request
|
245
323
|
# @param tracking_id [String] tracking_id of the chunk you want to delete
|
246
324
|
# @param [Hash] opts the optional parameters
|
@@ -251,7 +329,7 @@ module TrieveRubyClient
|
|
251
329
|
end
|
252
330
|
|
253
331
|
# Delete Chunk By Tracking Id
|
254
|
-
# Delete
|
332
|
+
# 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.
|
255
333
|
# @param tr_dataset [String] The dataset id to use for the request
|
256
334
|
# @param tracking_id [String] tracking_id of the chunk you want to delete
|
257
335
|
# @param [Hash] opts the optional parameters
|
@@ -310,7 +388,7 @@ module TrieveRubyClient
|
|
310
388
|
end
|
311
389
|
|
312
390
|
# RAG on Specified Chunks
|
313
|
-
#
|
391
|
+
# 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.
|
314
392
|
# @param tr_dataset [String] The dataset id to use for the request
|
315
393
|
# @param generate_chunks_request [GenerateChunksRequest] JSON request payload to perform RAG on some chunks (chunks)
|
316
394
|
# @param [Hash] opts the optional parameters
|
@@ -321,7 +399,7 @@ module TrieveRubyClient
|
|
321
399
|
end
|
322
400
|
|
323
401
|
# RAG on Specified Chunks
|
324
|
-
#
|
402
|
+
# 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.
|
325
403
|
# @param tr_dataset [String] The dataset id to use for the request
|
326
404
|
# @param generate_chunks_request [GenerateChunksRequest] JSON request payload to perform RAG on some chunks (chunks)
|
327
405
|
# @param [Hash] opts the optional parameters
|
@@ -385,22 +463,24 @@ module TrieveRubyClient
|
|
385
463
|
end
|
386
464
|
|
387
465
|
# Get Chunk By Id
|
388
|
-
# Get
|
466
|
+
# Get a singular chunk by id.
|
389
467
|
# @param tr_dataset [String] The dataset id to use for the request
|
390
468
|
# @param chunk_id [String] Id of the chunk you want to fetch.
|
391
469
|
# @param [Hash] opts the optional parameters
|
392
|
-
# @
|
470
|
+
# @option opts [APIVersion] :x_api_version The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
471
|
+
# @return [ChunkReturnTypes]
|
393
472
|
def get_chunk_by_id(tr_dataset, chunk_id, opts = {})
|
394
473
|
data, _status_code, _headers = get_chunk_by_id_with_http_info(tr_dataset, chunk_id, opts)
|
395
474
|
data
|
396
475
|
end
|
397
476
|
|
398
477
|
# Get Chunk By Id
|
399
|
-
# Get
|
478
|
+
# Get a singular chunk by id.
|
400
479
|
# @param tr_dataset [String] The dataset id to use for the request
|
401
480
|
# @param chunk_id [String] Id of the chunk you want to fetch.
|
402
481
|
# @param [Hash] opts the optional parameters
|
403
|
-
# @
|
482
|
+
# @option opts [APIVersion] :x_api_version The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
483
|
+
# @return [Array<(ChunkReturnTypes, Integer, Hash)>] ChunkReturnTypes data, response status code and response headers
|
404
484
|
def get_chunk_by_id_with_http_info(tr_dataset, chunk_id, opts = {})
|
405
485
|
if @api_client.config.debugging
|
406
486
|
@api_client.config.logger.debug 'Calling API: ChunkApi.get_chunk_by_id ...'
|
@@ -424,6 +504,7 @@ module TrieveRubyClient
|
|
424
504
|
# HTTP header 'Accept' (if needed)
|
425
505
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
426
506
|
header_params[:'TR-Dataset'] = tr_dataset
|
507
|
+
header_params[:'X-API-Version'] = opts[:'x_api_version'] if !opts[:'x_api_version'].nil?
|
427
508
|
|
428
509
|
# form parameters
|
429
510
|
form_params = opts[:form_params] || {}
|
@@ -432,7 +513,7 @@ module TrieveRubyClient
|
|
432
513
|
post_body = opts[:debug_body]
|
433
514
|
|
434
515
|
# return_type
|
435
|
-
return_type = opts[:debug_return_type] || '
|
516
|
+
return_type = opts[:debug_return_type] || 'ChunkReturnTypes'
|
436
517
|
|
437
518
|
# auth_names
|
438
519
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
@@ -455,22 +536,24 @@ module TrieveRubyClient
|
|
455
536
|
end
|
456
537
|
|
457
538
|
# Get Chunk By Tracking Id
|
458
|
-
# Get
|
539
|
+
# 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.
|
459
540
|
# @param tr_dataset [String] The dataset id to use for the request
|
460
541
|
# @param tracking_id [String] tracking_id of the chunk you want to fetch
|
461
542
|
# @param [Hash] opts the optional parameters
|
462
|
-
# @
|
543
|
+
# @option opts [APIVersion] :x_api_version The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
544
|
+
# @return [ChunkReturnTypes]
|
463
545
|
def get_chunk_by_tracking_id(tr_dataset, tracking_id, opts = {})
|
464
546
|
data, _status_code, _headers = get_chunk_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts)
|
465
547
|
data
|
466
548
|
end
|
467
549
|
|
468
550
|
# Get Chunk By Tracking Id
|
469
|
-
# Get
|
551
|
+
# 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.
|
470
552
|
# @param tr_dataset [String] The dataset id to use for the request
|
471
553
|
# @param tracking_id [String] tracking_id of the chunk you want to fetch
|
472
554
|
# @param [Hash] opts the optional parameters
|
473
|
-
# @
|
555
|
+
# @option opts [APIVersion] :x_api_version The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
556
|
+
# @return [Array<(ChunkReturnTypes, Integer, Hash)>] ChunkReturnTypes data, response status code and response headers
|
474
557
|
def get_chunk_by_tracking_id_with_http_info(tr_dataset, tracking_id, opts = {})
|
475
558
|
if @api_client.config.debugging
|
476
559
|
@api_client.config.logger.debug 'Calling API: ChunkApi.get_chunk_by_tracking_id ...'
|
@@ -494,6 +577,7 @@ module TrieveRubyClient
|
|
494
577
|
# HTTP header 'Accept' (if needed)
|
495
578
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
496
579
|
header_params[:'TR-Dataset'] = tr_dataset
|
580
|
+
header_params[:'X-API-Version'] = opts[:'x_api_version'] if !opts[:'x_api_version'].nil?
|
497
581
|
|
498
582
|
# form parameters
|
499
583
|
form_params = opts[:form_params] || {}
|
@@ -502,7 +586,7 @@ module TrieveRubyClient
|
|
502
586
|
post_body = opts[:debug_body]
|
503
587
|
|
504
588
|
# return_type
|
505
|
-
return_type = opts[:debug_return_type] || '
|
589
|
+
return_type = opts[:debug_return_type] || 'ChunkReturnTypes'
|
506
590
|
|
507
591
|
# auth_names
|
508
592
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
@@ -525,22 +609,24 @@ module TrieveRubyClient
|
|
525
609
|
end
|
526
610
|
|
527
611
|
# Get Chunks By Ids
|
528
|
-
# Get
|
612
|
+
# Get multiple chunks by multiple ids.
|
529
613
|
# @param tr_dataset [String] The dataset id to use for the request
|
530
614
|
# @param get_chunks_data [GetChunksData] JSON request payload to get the chunks in the request
|
531
615
|
# @param [Hash] opts the optional parameters
|
532
|
-
# @
|
616
|
+
# @option opts [APIVersion] :x_api_version The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
617
|
+
# @return [Array<ChunkReturnTypes>]
|
533
618
|
def get_chunks_by_ids(tr_dataset, get_chunks_data, opts = {})
|
534
619
|
data, _status_code, _headers = get_chunks_by_ids_with_http_info(tr_dataset, get_chunks_data, opts)
|
535
620
|
data
|
536
621
|
end
|
537
622
|
|
538
623
|
# Get Chunks By Ids
|
539
|
-
# Get
|
624
|
+
# Get multiple chunks by multiple ids.
|
540
625
|
# @param tr_dataset [String] The dataset id to use for the request
|
541
626
|
# @param get_chunks_data [GetChunksData] JSON request payload to get the chunks in the request
|
542
627
|
# @param [Hash] opts the optional parameters
|
543
|
-
# @
|
628
|
+
# @option opts [APIVersion] :x_api_version The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
629
|
+
# @return [Array<(Array<ChunkReturnTypes>, Integer, Hash)>] Array<ChunkReturnTypes> data, response status code and response headers
|
544
630
|
def get_chunks_by_ids_with_http_info(tr_dataset, get_chunks_data, opts = {})
|
545
631
|
if @api_client.config.debugging
|
546
632
|
@api_client.config.logger.debug 'Calling API: ChunkApi.get_chunks_by_ids ...'
|
@@ -569,6 +655,7 @@ module TrieveRubyClient
|
|
569
655
|
header_params['Content-Type'] = content_type
|
570
656
|
end
|
571
657
|
header_params[:'TR-Dataset'] = tr_dataset
|
658
|
+
header_params[:'X-API-Version'] = opts[:'x_api_version'] if !opts[:'x_api_version'].nil?
|
572
659
|
|
573
660
|
# form parameters
|
574
661
|
form_params = opts[:form_params] || {}
|
@@ -577,7 +664,7 @@ module TrieveRubyClient
|
|
577
664
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(get_chunks_data)
|
578
665
|
|
579
666
|
# return_type
|
580
|
-
return_type = opts[:debug_return_type] || 'Array<
|
667
|
+
return_type = opts[:debug_return_type] || 'Array<ChunkReturnTypes>'
|
581
668
|
|
582
669
|
# auth_names
|
583
670
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
@@ -599,23 +686,25 @@ module TrieveRubyClient
|
|
599
686
|
return data, status_code, headers
|
600
687
|
end
|
601
688
|
|
602
|
-
# Get Chunks By
|
603
|
-
# Get
|
689
|
+
# Get Chunks By Tracking Ids
|
690
|
+
# Get multiple chunks by ids.
|
604
691
|
# @param tr_dataset [String] The dataset id to use for the request
|
605
692
|
# @param get_tracking_chunks_data [GetTrackingChunksData] JSON request payload to get the chunks in the request
|
606
693
|
# @param [Hash] opts the optional parameters
|
607
|
-
# @
|
694
|
+
# @option opts [APIVersion] :x_api_version The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
695
|
+
# @return [Array<ChunkReturnTypes>]
|
608
696
|
def get_chunks_by_tracking_ids(tr_dataset, get_tracking_chunks_data, opts = {})
|
609
697
|
data, _status_code, _headers = get_chunks_by_tracking_ids_with_http_info(tr_dataset, get_tracking_chunks_data, opts)
|
610
698
|
data
|
611
699
|
end
|
612
700
|
|
613
|
-
# Get Chunks By
|
614
|
-
# Get
|
701
|
+
# Get Chunks By Tracking Ids
|
702
|
+
# Get multiple chunks by ids.
|
615
703
|
# @param tr_dataset [String] The dataset id to use for the request
|
616
704
|
# @param get_tracking_chunks_data [GetTrackingChunksData] JSON request payload to get the chunks in the request
|
617
705
|
# @param [Hash] opts the optional parameters
|
618
|
-
# @
|
706
|
+
# @option opts [APIVersion] :x_api_version The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
707
|
+
# @return [Array<(Array<ChunkReturnTypes>, Integer, Hash)>] Array<ChunkReturnTypes> data, response status code and response headers
|
619
708
|
def get_chunks_by_tracking_ids_with_http_info(tr_dataset, get_tracking_chunks_data, opts = {})
|
620
709
|
if @api_client.config.debugging
|
621
710
|
@api_client.config.logger.debug 'Calling API: ChunkApi.get_chunks_by_tracking_ids ...'
|
@@ -644,6 +733,7 @@ module TrieveRubyClient
|
|
644
733
|
header_params['Content-Type'] = content_type
|
645
734
|
end
|
646
735
|
header_params[:'TR-Dataset'] = tr_dataset
|
736
|
+
header_params[:'X-API-Version'] = opts[:'x_api_version'] if !opts[:'x_api_version'].nil?
|
647
737
|
|
648
738
|
# form parameters
|
649
739
|
form_params = opts[:form_params] || {}
|
@@ -652,7 +742,7 @@ module TrieveRubyClient
|
|
652
742
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(get_tracking_chunks_data)
|
653
743
|
|
654
744
|
# return_type
|
655
|
-
return_type = opts[:debug_return_type] || '
|
745
|
+
return_type = opts[:debug_return_type] || 'Array<ChunkReturnTypes>'
|
656
746
|
|
657
747
|
# auth_names
|
658
748
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
@@ -675,22 +765,24 @@ module TrieveRubyClient
|
|
675
765
|
end
|
676
766
|
|
677
767
|
# Get Recommended Chunks
|
678
|
-
# Get
|
768
|
+
# 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.
|
679
769
|
# @param tr_dataset [String] The dataset id to use for the request
|
680
770
|
# @param recommend_chunks_request [RecommendChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
|
681
771
|
# @param [Hash] opts the optional parameters
|
682
|
-
# @
|
772
|
+
# @option opts [APIVersion] :x_api_version The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
773
|
+
# @return [RecommendResponseTypes]
|
683
774
|
def get_recommended_chunks(tr_dataset, recommend_chunks_request, opts = {})
|
684
775
|
data, _status_code, _headers = get_recommended_chunks_with_http_info(tr_dataset, recommend_chunks_request, opts)
|
685
776
|
data
|
686
777
|
end
|
687
778
|
|
688
779
|
# Get Recommended Chunks
|
689
|
-
# Get
|
780
|
+
# 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.
|
690
781
|
# @param tr_dataset [String] The dataset id to use for the request
|
691
782
|
# @param recommend_chunks_request [RecommendChunksRequest] JSON request payload to get recommendations of chunks similar to the chunks in the request
|
692
783
|
# @param [Hash] opts the optional parameters
|
693
|
-
# @
|
784
|
+
# @option opts [APIVersion] :x_api_version The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
785
|
+
# @return [Array<(RecommendResponseTypes, Integer, Hash)>] RecommendResponseTypes data, response status code and response headers
|
694
786
|
def get_recommended_chunks_with_http_info(tr_dataset, recommend_chunks_request, opts = {})
|
695
787
|
if @api_client.config.debugging
|
696
788
|
@api_client.config.logger.debug 'Calling API: ChunkApi.get_recommended_chunks ...'
|
@@ -719,6 +811,7 @@ module TrieveRubyClient
|
|
719
811
|
header_params['Content-Type'] = content_type
|
720
812
|
end
|
721
813
|
header_params[:'TR-Dataset'] = tr_dataset
|
814
|
+
header_params[:'X-API-Version'] = opts[:'x_api_version'] if !opts[:'x_api_version'].nil?
|
722
815
|
|
723
816
|
# form parameters
|
724
817
|
form_params = opts[:form_params] || {}
|
@@ -727,7 +820,7 @@ module TrieveRubyClient
|
|
727
820
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(recommend_chunks_request)
|
728
821
|
|
729
822
|
# return_type
|
730
|
-
return_type = opts[:debug_return_type] || '
|
823
|
+
return_type = opts[:debug_return_type] || 'RecommendResponseTypes'
|
731
824
|
|
732
825
|
# auth_names
|
733
826
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
@@ -749,24 +842,101 @@ module TrieveRubyClient
|
|
749
842
|
return data, status_code, headers
|
750
843
|
end
|
751
844
|
|
845
|
+
# Generate suggested queries
|
846
|
+
# 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.
|
847
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
848
|
+
# @param suggested_queries_req_payload [SuggestedQueriesReqPayload] JSON request payload to get alternative suggested queries
|
849
|
+
# @param [Hash] opts the optional parameters
|
850
|
+
# @return [SuggestedQueriesResponse]
|
851
|
+
def get_suggested_queries(tr_dataset, suggested_queries_req_payload, opts = {})
|
852
|
+
data, _status_code, _headers = get_suggested_queries_with_http_info(tr_dataset, suggested_queries_req_payload, opts)
|
853
|
+
data
|
854
|
+
end
|
855
|
+
|
856
|
+
# Generate suggested queries
|
857
|
+
# 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.
|
858
|
+
# @param tr_dataset [String] The dataset id to use for the request
|
859
|
+
# @param suggested_queries_req_payload [SuggestedQueriesReqPayload] JSON request payload to get alternative suggested queries
|
860
|
+
# @param [Hash] opts the optional parameters
|
861
|
+
# @return [Array<(SuggestedQueriesResponse, Integer, Hash)>] SuggestedQueriesResponse data, response status code and response headers
|
862
|
+
def get_suggested_queries_with_http_info(tr_dataset, suggested_queries_req_payload, opts = {})
|
863
|
+
if @api_client.config.debugging
|
864
|
+
@api_client.config.logger.debug 'Calling API: ChunkApi.get_suggested_queries ...'
|
865
|
+
end
|
866
|
+
# verify the required parameter 'tr_dataset' is set
|
867
|
+
if @api_client.config.client_side_validation && tr_dataset.nil?
|
868
|
+
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.get_suggested_queries"
|
869
|
+
end
|
870
|
+
# verify the required parameter 'suggested_queries_req_payload' is set
|
871
|
+
if @api_client.config.client_side_validation && suggested_queries_req_payload.nil?
|
872
|
+
fail ArgumentError, "Missing the required parameter 'suggested_queries_req_payload' when calling ChunkApi.get_suggested_queries"
|
873
|
+
end
|
874
|
+
# resource path
|
875
|
+
local_var_path = '/api/chunk/gen_suggestions'
|
876
|
+
|
877
|
+
# query parameters
|
878
|
+
query_params = opts[:query_params] || {}
|
879
|
+
|
880
|
+
# header parameters
|
881
|
+
header_params = opts[:header_params] || {}
|
882
|
+
# HTTP header 'Accept' (if needed)
|
883
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
884
|
+
# HTTP header 'Content-Type'
|
885
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
886
|
+
if !content_type.nil?
|
887
|
+
header_params['Content-Type'] = content_type
|
888
|
+
end
|
889
|
+
header_params[:'TR-Dataset'] = tr_dataset
|
890
|
+
|
891
|
+
# form parameters
|
892
|
+
form_params = opts[:form_params] || {}
|
893
|
+
|
894
|
+
# http body (model)
|
895
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(suggested_queries_req_payload)
|
896
|
+
|
897
|
+
# return_type
|
898
|
+
return_type = opts[:debug_return_type] || 'SuggestedQueriesResponse'
|
899
|
+
|
900
|
+
# auth_names
|
901
|
+
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
902
|
+
|
903
|
+
new_options = opts.merge(
|
904
|
+
:operation => :"ChunkApi.get_suggested_queries",
|
905
|
+
:header_params => header_params,
|
906
|
+
:query_params => query_params,
|
907
|
+
:form_params => form_params,
|
908
|
+
:body => post_body,
|
909
|
+
:auth_names => auth_names,
|
910
|
+
:return_type => return_type
|
911
|
+
)
|
912
|
+
|
913
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
914
|
+
if @api_client.config.debugging
|
915
|
+
@api_client.config.logger.debug "API called: ChunkApi#get_suggested_queries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
916
|
+
end
|
917
|
+
return data, status_code, headers
|
918
|
+
end
|
919
|
+
|
752
920
|
# Search
|
753
|
-
#
|
921
|
+
# 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.
|
754
922
|
# @param tr_dataset [String] The dataset id to use for the request
|
755
|
-
# @param
|
923
|
+
# @param search_chunks_req_payload [SearchChunksReqPayload] JSON request payload to semantically search for chunks (chunks)
|
756
924
|
# @param [Hash] opts the optional parameters
|
757
|
-
# @
|
758
|
-
|
759
|
-
|
925
|
+
# @option opts [APIVersion] :x_api_version The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
926
|
+
# @return [SearchResponseTypes]
|
927
|
+
def search_chunks(tr_dataset, search_chunks_req_payload, opts = {})
|
928
|
+
data, _status_code, _headers = search_chunks_with_http_info(tr_dataset, search_chunks_req_payload, opts)
|
760
929
|
data
|
761
930
|
end
|
762
931
|
|
763
932
|
# Search
|
764
|
-
#
|
933
|
+
# 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.
|
765
934
|
# @param tr_dataset [String] The dataset id to use for the request
|
766
|
-
# @param
|
935
|
+
# @param search_chunks_req_payload [SearchChunksReqPayload] JSON request payload to semantically search for chunks (chunks)
|
767
936
|
# @param [Hash] opts the optional parameters
|
768
|
-
# @
|
769
|
-
|
937
|
+
# @option opts [APIVersion] :x_api_version The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
|
938
|
+
# @return [Array<(SearchResponseTypes, Integer, Hash)>] SearchResponseTypes data, response status code and response headers
|
939
|
+
def search_chunks_with_http_info(tr_dataset, search_chunks_req_payload, opts = {})
|
770
940
|
if @api_client.config.debugging
|
771
941
|
@api_client.config.logger.debug 'Calling API: ChunkApi.search_chunks ...'
|
772
942
|
end
|
@@ -774,9 +944,9 @@ module TrieveRubyClient
|
|
774
944
|
if @api_client.config.client_side_validation && tr_dataset.nil?
|
775
945
|
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.search_chunks"
|
776
946
|
end
|
777
|
-
# verify the required parameter '
|
778
|
-
if @api_client.config.client_side_validation &&
|
779
|
-
fail ArgumentError, "Missing the required parameter '
|
947
|
+
# verify the required parameter 'search_chunks_req_payload' is set
|
948
|
+
if @api_client.config.client_side_validation && search_chunks_req_payload.nil?
|
949
|
+
fail ArgumentError, "Missing the required parameter 'search_chunks_req_payload' when calling ChunkApi.search_chunks"
|
780
950
|
end
|
781
951
|
# resource path
|
782
952
|
local_var_path = '/api/chunk/search'
|
@@ -794,15 +964,16 @@ module TrieveRubyClient
|
|
794
964
|
header_params['Content-Type'] = content_type
|
795
965
|
end
|
796
966
|
header_params[:'TR-Dataset'] = tr_dataset
|
967
|
+
header_params[:'X-API-Version'] = opts[:'x_api_version'] if !opts[:'x_api_version'].nil?
|
797
968
|
|
798
969
|
# form parameters
|
799
970
|
form_params = opts[:form_params] || {}
|
800
971
|
|
801
972
|
# http body (model)
|
802
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
973
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(search_chunks_req_payload)
|
803
974
|
|
804
975
|
# return_type
|
805
|
-
return_type = opts[:debug_return_type] || '
|
976
|
+
return_type = opts[:debug_return_type] || 'SearchResponseTypes'
|
806
977
|
|
807
978
|
# auth_names
|
808
979
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
@@ -825,23 +996,23 @@ module TrieveRubyClient
|
|
825
996
|
end
|
826
997
|
|
827
998
|
# Update Chunk
|
828
|
-
# Update
|
999
|
+
# 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.
|
829
1000
|
# @param tr_dataset [String] The dataset id to use for the request
|
830
|
-
# @param
|
1001
|
+
# @param update_chunk_req_payload [UpdateChunkReqPayload] JSON request payload to update a chunk (chunk)
|
831
1002
|
# @param [Hash] opts the optional parameters
|
832
1003
|
# @return [nil]
|
833
|
-
def update_chunk(tr_dataset,
|
834
|
-
update_chunk_with_http_info(tr_dataset,
|
1004
|
+
def update_chunk(tr_dataset, update_chunk_req_payload, opts = {})
|
1005
|
+
update_chunk_with_http_info(tr_dataset, update_chunk_req_payload, opts)
|
835
1006
|
nil
|
836
1007
|
end
|
837
1008
|
|
838
1009
|
# Update Chunk
|
839
|
-
# Update
|
1010
|
+
# 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.
|
840
1011
|
# @param tr_dataset [String] The dataset id to use for the request
|
841
|
-
# @param
|
1012
|
+
# @param update_chunk_req_payload [UpdateChunkReqPayload] JSON request payload to update a chunk (chunk)
|
842
1013
|
# @param [Hash] opts the optional parameters
|
843
1014
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
844
|
-
def update_chunk_with_http_info(tr_dataset,
|
1015
|
+
def update_chunk_with_http_info(tr_dataset, update_chunk_req_payload, opts = {})
|
845
1016
|
if @api_client.config.debugging
|
846
1017
|
@api_client.config.logger.debug 'Calling API: ChunkApi.update_chunk ...'
|
847
1018
|
end
|
@@ -849,9 +1020,9 @@ module TrieveRubyClient
|
|
849
1020
|
if @api_client.config.client_side_validation && tr_dataset.nil?
|
850
1021
|
fail ArgumentError, "Missing the required parameter 'tr_dataset' when calling ChunkApi.update_chunk"
|
851
1022
|
end
|
852
|
-
# verify the required parameter '
|
853
|
-
if @api_client.config.client_side_validation &&
|
854
|
-
fail ArgumentError, "Missing the required parameter '
|
1023
|
+
# verify the required parameter 'update_chunk_req_payload' is set
|
1024
|
+
if @api_client.config.client_side_validation && update_chunk_req_payload.nil?
|
1025
|
+
fail ArgumentError, "Missing the required parameter 'update_chunk_req_payload' when calling ChunkApi.update_chunk"
|
855
1026
|
end
|
856
1027
|
# resource path
|
857
1028
|
local_var_path = '/api/chunk'
|
@@ -874,7 +1045,7 @@ module TrieveRubyClient
|
|
874
1045
|
form_params = opts[:form_params] || {}
|
875
1046
|
|
876
1047
|
# http body (model)
|
877
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
1048
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_chunk_req_payload)
|
878
1049
|
|
879
1050
|
# return_type
|
880
1051
|
return_type = opts[:debug_return_type]
|
@@ -900,7 +1071,7 @@ module TrieveRubyClient
|
|
900
1071
|
end
|
901
1072
|
|
902
1073
|
# Update Chunk By Tracking Id
|
903
|
-
# Update
|
1074
|
+
# 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.
|
904
1075
|
# @param tr_dataset [String] The dataset id to use for the request
|
905
1076
|
# @param update_chunk_by_tracking_id_data [UpdateChunkByTrackingIdData] JSON request payload to update a chunk by tracking_id (chunks)
|
906
1077
|
# @param [Hash] opts the optional parameters
|
@@ -911,7 +1082,7 @@ module TrieveRubyClient
|
|
911
1082
|
end
|
912
1083
|
|
913
1084
|
# Update Chunk By Tracking Id
|
914
|
-
# Update
|
1085
|
+
# 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.
|
915
1086
|
# @param tr_dataset [String] The dataset id to use for the request
|
916
1087
|
# @param update_chunk_by_tracking_id_data [UpdateChunkByTrackingIdData] JSON request payload to update a chunk by tracking_id (chunks)
|
917
1088
|
# @param [Hash] opts the optional parameters
|