trieve_ruby_client 0.10.7 → 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 +119 -16
- data/docs/APIVersion.md +15 -0
- data/docs/AnalyticsApi.md +303 -0
- data/docs/AuthApi.md +4 -4
- data/docs/AutocompleteReqPayload.md +6 -2
- data/docs/BookmarkGroupResponse.md +49 -0
- data/docs/BookmarkGroupResult.md +1 -1
- data/docs/ChatMessageProxy.md +1 -1
- data/docs/ChunkApi.md +165 -63
- data/docs/ChunkFilter.md +2 -0
- data/docs/ChunkGroupAndFileId.md +36 -0
- data/docs/ChunkGroupApi.md +110 -90
- data/docs/ChunkMetadata.md +1 -1
- data/docs/ChunkMetadataStringTagSet.md +1 -1
- data/docs/ChunkMetadataWithScore.md +1 -1
- data/docs/ChunkReqPayload.md +2 -2
- data/docs/ChunkReturnTypes.md +49 -0
- 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/ContentChunkMetadata.md +1 -1
- data/docs/CountChunkQueryResponseBody.md +18 -0
- data/docs/CountChunksReqPayload.md +26 -0
- data/docs/CountQueries.md +20 -0
- data/docs/CreateMessageReqPayload.md +11 -1
- data/docs/CreateSetupCheckoutSessionResPayload.md +18 -0
- data/docs/Dataset.md +0 -2
- data/docs/DatasetAnalytics.md +28 -0
- data/docs/DatasetApi.md +8 -80
- data/docs/DatasetDTO.md +0 -2
- data/docs/DeprecatedSearchOverGroupsResponseBody.md +20 -0
- data/docs/DistancePhrase.md +20 -0
- data/docs/EditMessageReqPayload.md +11 -1
- data/docs/Event.md +3 -5
- data/docs/EventTypeRequest.md +15 -0
- data/docs/EventsApi.md +1 -1
- data/docs/FileApi.md +4 -4
- data/docs/GenerateChunksRequest.md +11 -1
- data/docs/GeoInfoWithBias.md +20 -0
- data/docs/GetChunksForGroupsResponse.md +22 -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/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/MessageApi.md +4 -4
- data/docs/MetricsApi.md +76 -0
- data/docs/NewChunkMetadataTypes.md +51 -0
- data/docs/NoResultQueries.md +22 -0
- data/docs/OrganizationApi.md +6 -6
- 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/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 +9 -1
- data/docs/RoleProxy.md +15 -0
- data/docs/ScoreChunk.md +22 -0
- data/docs/SearchAnalytics.md +77 -0
- data/docs/SearchAnalyticsFilter.md +22 -0
- data/docs/SearchAnalyticsResponse.md +59 -0
- data/docs/SearchChunksReqPayload.md +6 -4
- 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 +2 -4
- 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 +6 -2
- data/docs/SearchWithinGroupResponseBody.md +20 -0
- data/docs/SearchWithinGroupResults.md +1 -1
- data/docs/SlimChunkMetadata.md +1 -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/TopicApi.md +4 -4
- data/docs/UpdateChunkGroupData.md +3 -1
- data/docs/UpdateChunkReqPayload.md +2 -0
- data/docs/UserApi.md +3 -3
- 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 +148 -52
- data/lib/trieve_ruby_client/api/chunk_group_api.rb +122 -107
- data/lib/trieve_ruby_client/api/dataset_api.rb +17 -81
- data/lib/trieve_ruby_client/api/events_api.rb +3 -3
- data/lib/trieve_ruby_client/api/file_api.rb +9 -9
- 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 +9 -9
- data/lib/trieve_ruby_client/api/metrics_api.rb +79 -0
- data/lib/trieve_ruby_client/api/organization_api.rb +13 -13
- data/lib/trieve_ruby_client/api/stripe_api.rb +135 -9
- data/lib/trieve_ruby_client/api/topic_api.rb +9 -9
- data/lib/trieve_ruby_client/api/user_api.rb +7 -7
- 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_resp_body.rb +1 -1
- 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_req_payload.rb +47 -5
- data/lib/trieve_ruby_client/models/batch_queued_chunk_response.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 +1 -1
- data/lib/trieve_ruby_client/models/chat_message_proxy.rb +24 -2
- data/lib/trieve_ruby_client/models/chunk_filter.rb +13 -2
- data/lib/trieve_ruby_client/models/chunk_group.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 +8 -2
- data/lib/trieve_ruby_client/models/chunk_metadata_string_tag_set.rb +8 -2
- data/lib/trieve_ruby_client/models/chunk_metadata_types.rb +1 -1
- data/lib/trieve_ruby_client/models/chunk_metadata_with_score.rb +8 -2
- data/lib/trieve_ruby_client/models/chunk_req_payload.rb +12 -15
- data/lib/trieve_ruby_client/models/chunk_return_types.rb +105 -0
- 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 +1 -1
- data/lib/trieve_ruby_client/models/content_chunk_metadata.rb +8 -2
- 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_group_req_payload.rb +1 -1
- data/lib/trieve_ruby_client/models/create_chunk_req_payload_enum.rb +1 -1
- data/lib/trieve_ruby_client/models/create_dataset_request.rb +1 -1
- data/lib/trieve_ruby_client/models/create_message_req_payload.rb +95 -4
- 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_req_payload.rb +1 -1
- data/lib/trieve_ruby_client/models/dataset.rb +2 -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 +1 -1
- data/lib/trieve_ruby_client/models/delete_topic_data.rb +1 -1
- data/lib/trieve_ruby_client/models/delete_user_api_key_request.rb +1 -1
- data/lib/trieve_ruby_client/models/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_req_payload.rb +95 -4
- 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 +1 -1
- data/lib/trieve_ruby_client/models/file.rb +1 -1
- data/lib/trieve_ruby_client/models/file_dto.rb +1 -1
- data/lib/trieve_ruby_client/models/generate_chunks_request.rb +78 -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 +1 -1
- data/lib/trieve_ruby_client/models/get_events_data.rb +2 -2
- data/lib/trieve_ruby_client/models/get_groups_for_chunks_data.rb +1 -1
- data/lib/trieve_ruby_client/models/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 +1 -1
- 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 +1 -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 +1 -1
- 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 +1 -1
- 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_req_payload.rb +84 -4
- data/lib/trieve_ruby_client/models/remove_chunk_from_group_req_payload.rb +1 -1
- 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 +1 -1
- 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_query_response_body.rb +1 -1
- data/lib/trieve_ruby_client/models/search_chunks_req_payload.rb +47 -16
- 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 +26 -16
- 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 +47 -5
- 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 +1 -1
- data/lib/trieve_ruby_client/models/set_user_api_key_response.rb +1 -1
- data/lib/trieve_ruby_client/models/single_queued_chunk_response.rb +1 -1
- data/lib/trieve_ruby_client/models/slim_chunk_metadata.rb +8 -2
- 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_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 +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_group_data.rb +17 -6
- data/lib/trieve_ruby_client/models/update_chunk_req_payload.rb +12 -2
- data/lib/trieve_ruby_client/models/update_dataset_request.rb +1 -1
- data/lib/trieve_ruby_client/models/update_group_by_tracking_id_req_payload.rb +1 -1
- data/lib/trieve_ruby_client/models/update_organization_data.rb +1 -1
- data/lib/trieve_ruby_client/models/update_topic_req_payload.rb +1 -1
- data/lib/trieve_ruby_client/models/update_user_org_role_data.rb +1 -1
- data/lib/trieve_ruby_client/models/upload_file_req_payload.rb +1 -1
- data/lib/trieve_ruby_client/models/upload_file_result.rb +1 -1
- data/lib/trieve_ruby_client/models/user_organization.rb +1 -1
- data/lib/trieve_ruby_client/version.rb +2 -2
- data/lib/trieve_ruby_client.rb +86 -5
- data/openapi-generator.yaml +2 -2
- data/openapi.json +11050 -1
- data/spec/api/analytics_api_spec.rb +87 -0
- data/spec/api/metrics_api_spec.rb +46 -0
- data/spec/models/api_version_spec.rb +30 -0
- data/spec/models/bookmark_group_response_spec.rb +32 -0
- data/spec/models/chunk_group_and_file_id_spec.rb +90 -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/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_setup_checkout_session_res_payload_spec.rb +36 -0
- data/spec/models/dataset_analytics_spec.rb +66 -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/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/granularity_spec.rb +30 -0
- data/spec/models/groups_bookmark_query_result_spec.rb +48 -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/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_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/spec_helper.rb +1 -1
- data/trieve_ruby_client.gemspec +1 -1
- metadata +456 -135
- 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/trieve_ruby_client-0.8.2.gem +0 -0
- data/trieve_ruby_client-0.8.5.gem +0 -0
@@ -0,0 +1,296 @@
|
|
1
|
+
=begin
|
2
|
+
#Trieve API
|
3
|
+
|
4
|
+
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.11.0
|
7
|
+
Contact: developers@trieve.ai
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module TrieveRubyClient
|
17
|
+
class ClusterQueries
|
18
|
+
attr_accessor :cluster_id
|
19
|
+
|
20
|
+
attr_accessor :page
|
21
|
+
|
22
|
+
attr_accessor :type
|
23
|
+
|
24
|
+
class EnumAttributeValidator
|
25
|
+
attr_reader :datatype
|
26
|
+
attr_reader :allowable_values
|
27
|
+
|
28
|
+
def initialize(datatype, allowable_values)
|
29
|
+
@allowable_values = allowable_values.map do |value|
|
30
|
+
case datatype.to_s
|
31
|
+
when /Integer/i
|
32
|
+
value.to_i
|
33
|
+
when /Float/i
|
34
|
+
value.to_f
|
35
|
+
else
|
36
|
+
value
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def valid?(value)
|
42
|
+
!value || allowable_values.include?(value)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
47
|
+
def self.attribute_map
|
48
|
+
{
|
49
|
+
:'cluster_id' => :'cluster_id',
|
50
|
+
:'page' => :'page',
|
51
|
+
:'type' => :'type'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Returns all the JSON keys this model knows about
|
56
|
+
def self.acceptable_attributes
|
57
|
+
attribute_map.values
|
58
|
+
end
|
59
|
+
|
60
|
+
# Attribute type mapping.
|
61
|
+
def self.openapi_types
|
62
|
+
{
|
63
|
+
:'cluster_id' => :'String',
|
64
|
+
:'page' => :'Integer',
|
65
|
+
:'type' => :'String'
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
# List of attributes with nullable: true
|
70
|
+
def self.openapi_nullable
|
71
|
+
Set.new([
|
72
|
+
:'page',
|
73
|
+
])
|
74
|
+
end
|
75
|
+
|
76
|
+
# Initializes the object
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
78
|
+
def initialize(attributes = {})
|
79
|
+
if (!attributes.is_a?(Hash))
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrieveRubyClient::ClusterQueries` initialize method"
|
81
|
+
end
|
82
|
+
|
83
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
84
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
85
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrieveRubyClient::ClusterQueries`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
87
|
+
end
|
88
|
+
h[k.to_sym] = v
|
89
|
+
}
|
90
|
+
|
91
|
+
if attributes.key?(:'cluster_id')
|
92
|
+
self.cluster_id = attributes[:'cluster_id']
|
93
|
+
else
|
94
|
+
self.cluster_id = nil
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'page')
|
98
|
+
self.page = attributes[:'page']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'type')
|
102
|
+
self.type = attributes[:'type']
|
103
|
+
else
|
104
|
+
self.type = nil
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
109
|
+
# @return Array for valid properties with the reasons
|
110
|
+
def list_invalid_properties
|
111
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
112
|
+
invalid_properties = Array.new
|
113
|
+
if @cluster_id.nil?
|
114
|
+
invalid_properties.push('invalid value for "cluster_id", cluster_id cannot be nil.')
|
115
|
+
end
|
116
|
+
|
117
|
+
if !@page.nil? && @page < 0
|
118
|
+
invalid_properties.push('invalid value for "page", must be greater than or equal to 0.')
|
119
|
+
end
|
120
|
+
|
121
|
+
if @type.nil?
|
122
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
123
|
+
end
|
124
|
+
|
125
|
+
invalid_properties
|
126
|
+
end
|
127
|
+
|
128
|
+
# Check to see if the all the properties in the model are valid
|
129
|
+
# @return true if the model is valid
|
130
|
+
def valid?
|
131
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
132
|
+
return false if @cluster_id.nil?
|
133
|
+
return false if !@page.nil? && @page < 0
|
134
|
+
return false if @type.nil?
|
135
|
+
type_validator = EnumAttributeValidator.new('String', ["cluster_queries"])
|
136
|
+
return false unless type_validator.valid?(@type)
|
137
|
+
true
|
138
|
+
end
|
139
|
+
|
140
|
+
# Custom attribute writer method with validation
|
141
|
+
# @param [Object] page Value to be assigned
|
142
|
+
def page=(page)
|
143
|
+
if !page.nil? && page < 0
|
144
|
+
fail ArgumentError, 'invalid value for "page", must be greater than or equal to 0.'
|
145
|
+
end
|
146
|
+
|
147
|
+
@page = page
|
148
|
+
end
|
149
|
+
|
150
|
+
# Custom attribute writer method checking allowed values (enum).
|
151
|
+
# @param [Object] type Object to be assigned
|
152
|
+
def type=(type)
|
153
|
+
validator = EnumAttributeValidator.new('String', ["cluster_queries"])
|
154
|
+
unless validator.valid?(type)
|
155
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
156
|
+
end
|
157
|
+
@type = type
|
158
|
+
end
|
159
|
+
|
160
|
+
# Checks equality by comparing each attribute.
|
161
|
+
# @param [Object] Object to be compared
|
162
|
+
def ==(o)
|
163
|
+
return true if self.equal?(o)
|
164
|
+
self.class == o.class &&
|
165
|
+
cluster_id == o.cluster_id &&
|
166
|
+
page == o.page &&
|
167
|
+
type == o.type
|
168
|
+
end
|
169
|
+
|
170
|
+
# @see the `==` method
|
171
|
+
# @param [Object] Object to be compared
|
172
|
+
def eql?(o)
|
173
|
+
self == o
|
174
|
+
end
|
175
|
+
|
176
|
+
# Calculates hash code according to all attributes.
|
177
|
+
# @return [Integer] Hash code
|
178
|
+
def hash
|
179
|
+
[cluster_id, page, type].hash
|
180
|
+
end
|
181
|
+
|
182
|
+
# Builds the object from hash
|
183
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
184
|
+
# @return [Object] Returns the model itself
|
185
|
+
def self.build_from_hash(attributes)
|
186
|
+
return nil unless attributes.is_a?(Hash)
|
187
|
+
attributes = attributes.transform_keys(&:to_sym)
|
188
|
+
transformed_hash = {}
|
189
|
+
openapi_types.each_pair do |key, type|
|
190
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
191
|
+
transformed_hash["#{key}"] = nil
|
192
|
+
elsif type =~ /\AArray<(.*)>/i
|
193
|
+
# check to ensure the input is an array given that the attribute
|
194
|
+
# is documented as an array but the input is not
|
195
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
196
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
197
|
+
end
|
198
|
+
elsif !attributes[attribute_map[key]].nil?
|
199
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
200
|
+
end
|
201
|
+
end
|
202
|
+
new(transformed_hash)
|
203
|
+
end
|
204
|
+
|
205
|
+
# Deserializes the data based on type
|
206
|
+
# @param string type Data type
|
207
|
+
# @param string value Value to be deserialized
|
208
|
+
# @return [Object] Deserialized data
|
209
|
+
def self._deserialize(type, value)
|
210
|
+
case type.to_sym
|
211
|
+
when :Time
|
212
|
+
Time.parse(value)
|
213
|
+
when :Date
|
214
|
+
Date.parse(value)
|
215
|
+
when :String
|
216
|
+
value.to_s
|
217
|
+
when :Integer
|
218
|
+
value.to_i
|
219
|
+
when :Float
|
220
|
+
value.to_f
|
221
|
+
when :Boolean
|
222
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
223
|
+
true
|
224
|
+
else
|
225
|
+
false
|
226
|
+
end
|
227
|
+
when :Object
|
228
|
+
# generic object (usually a Hash), return directly
|
229
|
+
value
|
230
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
231
|
+
inner_type = Regexp.last_match[:inner_type]
|
232
|
+
value.map { |v| _deserialize(inner_type, v) }
|
233
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
234
|
+
k_type = Regexp.last_match[:k_type]
|
235
|
+
v_type = Regexp.last_match[:v_type]
|
236
|
+
{}.tap do |hash|
|
237
|
+
value.each do |k, v|
|
238
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
239
|
+
end
|
240
|
+
end
|
241
|
+
else # model
|
242
|
+
# models (e.g. Pet) or oneOf
|
243
|
+
klass = TrieveRubyClient.const_get(type)
|
244
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
# Returns the string representation of the object
|
249
|
+
# @return [String] String presentation of the object
|
250
|
+
def to_s
|
251
|
+
to_hash.to_s
|
252
|
+
end
|
253
|
+
|
254
|
+
# to_body is an alias to to_hash (backward compatibility)
|
255
|
+
# @return [Hash] Returns the object in the form of hash
|
256
|
+
def to_body
|
257
|
+
to_hash
|
258
|
+
end
|
259
|
+
|
260
|
+
# Returns the object in the form of hash
|
261
|
+
# @return [Hash] Returns the object in the form of hash
|
262
|
+
def to_hash
|
263
|
+
hash = {}
|
264
|
+
self.class.attribute_map.each_pair do |attr, param|
|
265
|
+
value = self.send(attr)
|
266
|
+
if value.nil?
|
267
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
268
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
269
|
+
end
|
270
|
+
|
271
|
+
hash[param] = _to_hash(value)
|
272
|
+
end
|
273
|
+
hash
|
274
|
+
end
|
275
|
+
|
276
|
+
# Outputs non-array value in the form of hash
|
277
|
+
# For object, use to_hash. Otherwise, just return the value
|
278
|
+
# @param [Object] value Any valid value
|
279
|
+
# @return [Hash] Returns the value in the form of hash
|
280
|
+
def _to_hash(value)
|
281
|
+
if value.is_a?(Array)
|
282
|
+
value.compact.map { |v| _to_hash(v) }
|
283
|
+
elsif value.is_a?(Hash)
|
284
|
+
{}.tap do |hash|
|
285
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
286
|
+
end
|
287
|
+
elsif value.respond_to? :to_hash
|
288
|
+
value.to_hash
|
289
|
+
else
|
290
|
+
value
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
end
|
295
|
+
|
296
|
+
end
|
@@ -0,0 +1,265 @@
|
|
1
|
+
=begin
|
2
|
+
#Trieve API
|
3
|
+
|
4
|
+
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.11.0
|
7
|
+
Contact: developers@trieve.ai
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module TrieveRubyClient
|
17
|
+
class ClusterTopics
|
18
|
+
attr_accessor :filter
|
19
|
+
|
20
|
+
attr_accessor :type
|
21
|
+
|
22
|
+
class EnumAttributeValidator
|
23
|
+
attr_reader :datatype
|
24
|
+
attr_reader :allowable_values
|
25
|
+
|
26
|
+
def initialize(datatype, allowable_values)
|
27
|
+
@allowable_values = allowable_values.map do |value|
|
28
|
+
case datatype.to_s
|
29
|
+
when /Integer/i
|
30
|
+
value.to_i
|
31
|
+
when /Float/i
|
32
|
+
value.to_f
|
33
|
+
else
|
34
|
+
value
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def valid?(value)
|
40
|
+
!value || allowable_values.include?(value)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
45
|
+
def self.attribute_map
|
46
|
+
{
|
47
|
+
:'filter' => :'filter',
|
48
|
+
:'type' => :'type'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Returns all the JSON keys this model knows about
|
53
|
+
def self.acceptable_attributes
|
54
|
+
attribute_map.values
|
55
|
+
end
|
56
|
+
|
57
|
+
# Attribute type mapping.
|
58
|
+
def self.openapi_types
|
59
|
+
{
|
60
|
+
:'filter' => :'ClusterAnalyticsFilter',
|
61
|
+
:'type' => :'String'
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# List of attributes with nullable: true
|
66
|
+
def self.openapi_nullable
|
67
|
+
Set.new([
|
68
|
+
:'filter',
|
69
|
+
])
|
70
|
+
end
|
71
|
+
|
72
|
+
# Initializes the object
|
73
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
74
|
+
def initialize(attributes = {})
|
75
|
+
if (!attributes.is_a?(Hash))
|
76
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrieveRubyClient::ClusterTopics` initialize method"
|
77
|
+
end
|
78
|
+
|
79
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
81
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrieveRubyClient::ClusterTopics`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
83
|
+
end
|
84
|
+
h[k.to_sym] = v
|
85
|
+
}
|
86
|
+
|
87
|
+
if attributes.key?(:'filter')
|
88
|
+
self.filter = attributes[:'filter']
|
89
|
+
end
|
90
|
+
|
91
|
+
if attributes.key?(:'type')
|
92
|
+
self.type = attributes[:'type']
|
93
|
+
else
|
94
|
+
self.type = nil
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
99
|
+
# @return Array for valid properties with the reasons
|
100
|
+
def list_invalid_properties
|
101
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
102
|
+
invalid_properties = Array.new
|
103
|
+
if @type.nil?
|
104
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
105
|
+
end
|
106
|
+
|
107
|
+
invalid_properties
|
108
|
+
end
|
109
|
+
|
110
|
+
# Check to see if the all the properties in the model are valid
|
111
|
+
# @return true if the model is valid
|
112
|
+
def valid?
|
113
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
114
|
+
return false if @type.nil?
|
115
|
+
type_validator = EnumAttributeValidator.new('String', ["cluster_topics"])
|
116
|
+
return false unless type_validator.valid?(@type)
|
117
|
+
true
|
118
|
+
end
|
119
|
+
|
120
|
+
# Custom attribute writer method checking allowed values (enum).
|
121
|
+
# @param [Object] type Object to be assigned
|
122
|
+
def type=(type)
|
123
|
+
validator = EnumAttributeValidator.new('String', ["cluster_topics"])
|
124
|
+
unless validator.valid?(type)
|
125
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
126
|
+
end
|
127
|
+
@type = type
|
128
|
+
end
|
129
|
+
|
130
|
+
# Checks equality by comparing each attribute.
|
131
|
+
# @param [Object] Object to be compared
|
132
|
+
def ==(o)
|
133
|
+
return true if self.equal?(o)
|
134
|
+
self.class == o.class &&
|
135
|
+
filter == o.filter &&
|
136
|
+
type == o.type
|
137
|
+
end
|
138
|
+
|
139
|
+
# @see the `==` method
|
140
|
+
# @param [Object] Object to be compared
|
141
|
+
def eql?(o)
|
142
|
+
self == o
|
143
|
+
end
|
144
|
+
|
145
|
+
# Calculates hash code according to all attributes.
|
146
|
+
# @return [Integer] Hash code
|
147
|
+
def hash
|
148
|
+
[filter, type].hash
|
149
|
+
end
|
150
|
+
|
151
|
+
# Builds the object from hash
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
153
|
+
# @return [Object] Returns the model itself
|
154
|
+
def self.build_from_hash(attributes)
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
157
|
+
transformed_hash = {}
|
158
|
+
openapi_types.each_pair do |key, type|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
160
|
+
transformed_hash["#{key}"] = nil
|
161
|
+
elsif type =~ /\AArray<(.*)>/i
|
162
|
+
# check to ensure the input is an array given that the attribute
|
163
|
+
# is documented as an array but the input is not
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
166
|
+
end
|
167
|
+
elsif !attributes[attribute_map[key]].nil?
|
168
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
169
|
+
end
|
170
|
+
end
|
171
|
+
new(transformed_hash)
|
172
|
+
end
|
173
|
+
|
174
|
+
# Deserializes the data based on type
|
175
|
+
# @param string type Data type
|
176
|
+
# @param string value Value to be deserialized
|
177
|
+
# @return [Object] Deserialized data
|
178
|
+
def self._deserialize(type, value)
|
179
|
+
case type.to_sym
|
180
|
+
when :Time
|
181
|
+
Time.parse(value)
|
182
|
+
when :Date
|
183
|
+
Date.parse(value)
|
184
|
+
when :String
|
185
|
+
value.to_s
|
186
|
+
when :Integer
|
187
|
+
value.to_i
|
188
|
+
when :Float
|
189
|
+
value.to_f
|
190
|
+
when :Boolean
|
191
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
192
|
+
true
|
193
|
+
else
|
194
|
+
false
|
195
|
+
end
|
196
|
+
when :Object
|
197
|
+
# generic object (usually a Hash), return directly
|
198
|
+
value
|
199
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
200
|
+
inner_type = Regexp.last_match[:inner_type]
|
201
|
+
value.map { |v| _deserialize(inner_type, v) }
|
202
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
203
|
+
k_type = Regexp.last_match[:k_type]
|
204
|
+
v_type = Regexp.last_match[:v_type]
|
205
|
+
{}.tap do |hash|
|
206
|
+
value.each do |k, v|
|
207
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
else # model
|
211
|
+
# models (e.g. Pet) or oneOf
|
212
|
+
klass = TrieveRubyClient.const_get(type)
|
213
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
# Returns the string representation of the object
|
218
|
+
# @return [String] String presentation of the object
|
219
|
+
def to_s
|
220
|
+
to_hash.to_s
|
221
|
+
end
|
222
|
+
|
223
|
+
# to_body is an alias to to_hash (backward compatibility)
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
225
|
+
def to_body
|
226
|
+
to_hash
|
227
|
+
end
|
228
|
+
|
229
|
+
# Returns the object in the form of hash
|
230
|
+
# @return [Hash] Returns the object in the form of hash
|
231
|
+
def to_hash
|
232
|
+
hash = {}
|
233
|
+
self.class.attribute_map.each_pair do |attr, param|
|
234
|
+
value = self.send(attr)
|
235
|
+
if value.nil?
|
236
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
237
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
238
|
+
end
|
239
|
+
|
240
|
+
hash[param] = _to_hash(value)
|
241
|
+
end
|
242
|
+
hash
|
243
|
+
end
|
244
|
+
|
245
|
+
# Outputs non-array value in the form of hash
|
246
|
+
# For object, use to_hash. Otherwise, just return the value
|
247
|
+
# @param [Object] value Any valid value
|
248
|
+
# @return [Hash] Returns the value in the form of hash
|
249
|
+
def _to_hash(value)
|
250
|
+
if value.is_a?(Array)
|
251
|
+
value.compact.map { |v| _to_hash(v) }
|
252
|
+
elsif value.is_a?(Hash)
|
253
|
+
{}.tap do |hash|
|
254
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
255
|
+
end
|
256
|
+
elsif value.respond_to? :to_hash
|
257
|
+
value.to_hash
|
258
|
+
else
|
259
|
+
value
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
end
|
264
|
+
|
265
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.11.0
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.11.0
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -70,7 +70,6 @@ module TrieveRubyClient
|
|
70
70
|
:'chunk_html',
|
71
71
|
:'image_urls',
|
72
72
|
:'num_value',
|
73
|
-
:'qdrant_point_id',
|
74
73
|
:'time_stamp',
|
75
74
|
:'tracking_id',
|
76
75
|
])
|
@@ -113,6 +112,8 @@ module TrieveRubyClient
|
|
113
112
|
|
114
113
|
if attributes.key?(:'qdrant_point_id')
|
115
114
|
self.qdrant_point_id = attributes[:'qdrant_point_id']
|
115
|
+
else
|
116
|
+
self.qdrant_point_id = nil
|
116
117
|
end
|
117
118
|
|
118
119
|
if attributes.key?(:'time_stamp')
|
@@ -139,6 +140,10 @@ module TrieveRubyClient
|
|
139
140
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
140
141
|
end
|
141
142
|
|
143
|
+
if @qdrant_point_id.nil?
|
144
|
+
invalid_properties.push('invalid value for "qdrant_point_id", qdrant_point_id cannot be nil.')
|
145
|
+
end
|
146
|
+
|
142
147
|
if @weight.nil?
|
143
148
|
invalid_properties.push('invalid value for "weight", weight cannot be nil.')
|
144
149
|
end
|
@@ -151,6 +156,7 @@ module TrieveRubyClient
|
|
151
156
|
def valid?
|
152
157
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
153
158
|
return false if @id.nil?
|
159
|
+
return false if @qdrant_point_id.nil?
|
154
160
|
return false if @weight.nil?
|
155
161
|
true
|
156
162
|
end
|