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
@@ -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
|
@@ -18,6 +18,9 @@ module TrieveRubyClient
|
|
18
18
|
# Completion first decides whether the stream should contain the stream of the completion response or the chunks first. Default is false. Keep in mind that || is used to separate the chunks from the completion response. If || is in the completion then you may want to split on ||{ instead.
|
19
19
|
attr_accessor :completion_first
|
20
20
|
|
21
|
+
# If concat user messages query is set to true, all of the user messages in the topic will be concatenated together and used as the search query. If not specified, this defaults to false. Default is false.
|
22
|
+
attr_accessor :concat_user_messages_query
|
23
|
+
|
21
24
|
attr_accessor :filters
|
22
25
|
|
23
26
|
# Frequency penalty is a number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. Default is 0.7.
|
@@ -38,10 +41,18 @@ module TrieveRubyClient
|
|
38
41
|
# The new content of the message to replace the old content with.
|
39
42
|
attr_accessor :new_message_content
|
40
43
|
|
44
|
+
# Page size is the number of chunks to fetch during RAG. If 0, then no search will be performed. If specified, this will override the N retrievals to include in the dataset configuration. Default is None.
|
45
|
+
attr_accessor :page_size
|
46
|
+
|
41
47
|
# Presence penalty is a number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
|
42
48
|
attr_accessor :presence_penalty
|
43
49
|
|
44
|
-
#
|
50
|
+
# Set score_threshold to a float to filter out chunks with a score below the threshold. This threshold applies before weight and bias modifications. If not specified, this defaults to 0.0.
|
51
|
+
attr_accessor :score_threshold
|
52
|
+
|
53
|
+
# Query is the search query. This can be any string. The search_query will be used to create a dense embedding vector and/or sparse vector which will be used to find the result set. If not specified, will default to the last user message or HyDE if HyDE is enabled in the dataset configuration. Default is None.
|
54
|
+
attr_accessor :search_query
|
55
|
+
|
45
56
|
attr_accessor :search_type
|
46
57
|
|
47
58
|
# Stop tokens are up to 4 sequences where the API will stop generating further tokens.
|
@@ -50,16 +61,42 @@ module TrieveRubyClient
|
|
50
61
|
# Whether or not to stream the response. If this is set to true or not included, the response will be a stream. If this is set to false, the response will be a normal JSON response. Default is true.
|
51
62
|
attr_accessor :stream_response
|
52
63
|
|
64
|
+
# Optionally, override the system prompt in dataset server settings.
|
65
|
+
attr_accessor :system_prompt
|
66
|
+
|
53
67
|
# What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. Default is 0.7.
|
54
68
|
attr_accessor :temperature
|
55
69
|
|
56
70
|
# The id of the topic to edit the message at the given sort order for.
|
57
71
|
attr_accessor :topic_id
|
58
72
|
|
73
|
+
class EnumAttributeValidator
|
74
|
+
attr_reader :datatype
|
75
|
+
attr_reader :allowable_values
|
76
|
+
|
77
|
+
def initialize(datatype, allowable_values)
|
78
|
+
@allowable_values = allowable_values.map do |value|
|
79
|
+
case datatype.to_s
|
80
|
+
when /Integer/i
|
81
|
+
value.to_i
|
82
|
+
when /Float/i
|
83
|
+
value.to_f
|
84
|
+
else
|
85
|
+
value
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
def valid?(value)
|
91
|
+
!value || allowable_values.include?(value)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
59
95
|
# Attribute mapping from ruby-style variable name to JSON key.
|
60
96
|
def self.attribute_map
|
61
97
|
{
|
62
98
|
:'completion_first' => :'completion_first',
|
99
|
+
:'concat_user_messages_query' => :'concat_user_messages_query',
|
63
100
|
:'filters' => :'filters',
|
64
101
|
:'frequency_penalty' => :'frequency_penalty',
|
65
102
|
:'highlight_citations' => :'highlight_citations',
|
@@ -67,10 +104,14 @@ module TrieveRubyClient
|
|
67
104
|
:'max_tokens' => :'max_tokens',
|
68
105
|
:'message_sort_order' => :'message_sort_order',
|
69
106
|
:'new_message_content' => :'new_message_content',
|
107
|
+
:'page_size' => :'page_size',
|
70
108
|
:'presence_penalty' => :'presence_penalty',
|
109
|
+
:'score_threshold' => :'score_threshold',
|
110
|
+
:'search_query' => :'search_query',
|
71
111
|
:'search_type' => :'search_type',
|
72
112
|
:'stop_tokens' => :'stop_tokens',
|
73
113
|
:'stream_response' => :'stream_response',
|
114
|
+
:'system_prompt' => :'system_prompt',
|
74
115
|
:'temperature' => :'temperature',
|
75
116
|
:'topic_id' => :'topic_id'
|
76
117
|
}
|
@@ -85,6 +126,7 @@ module TrieveRubyClient
|
|
85
126
|
def self.openapi_types
|
86
127
|
{
|
87
128
|
:'completion_first' => :'Boolean',
|
129
|
+
:'concat_user_messages_query' => :'Boolean',
|
88
130
|
:'filters' => :'ChunkFilter',
|
89
131
|
:'frequency_penalty' => :'Float',
|
90
132
|
:'highlight_citations' => :'Boolean',
|
@@ -92,10 +134,14 @@ module TrieveRubyClient
|
|
92
134
|
:'max_tokens' => :'Integer',
|
93
135
|
:'message_sort_order' => :'Integer',
|
94
136
|
:'new_message_content' => :'String',
|
137
|
+
:'page_size' => :'Integer',
|
95
138
|
:'presence_penalty' => :'Float',
|
96
|
-
:'
|
139
|
+
:'score_threshold' => :'Float',
|
140
|
+
:'search_query' => :'String',
|
141
|
+
:'search_type' => :'SearchMethod',
|
97
142
|
:'stop_tokens' => :'Array<String>',
|
98
143
|
:'stream_response' => :'Boolean',
|
144
|
+
:'system_prompt' => :'String',
|
99
145
|
:'temperature' => :'Float',
|
100
146
|
:'topic_id' => :'String'
|
101
147
|
}
|
@@ -105,15 +151,20 @@ module TrieveRubyClient
|
|
105
151
|
def self.openapi_nullable
|
106
152
|
Set.new([
|
107
153
|
:'completion_first',
|
154
|
+
:'concat_user_messages_query',
|
108
155
|
:'filters',
|
109
156
|
:'frequency_penalty',
|
110
157
|
:'highlight_citations',
|
111
158
|
:'highlight_delimiters',
|
112
159
|
:'max_tokens',
|
160
|
+
:'page_size',
|
113
161
|
:'presence_penalty',
|
162
|
+
:'score_threshold',
|
163
|
+
:'search_query',
|
114
164
|
:'search_type',
|
115
165
|
:'stop_tokens',
|
116
166
|
:'stream_response',
|
167
|
+
:'system_prompt',
|
117
168
|
:'temperature',
|
118
169
|
])
|
119
170
|
end
|
@@ -137,6 +188,10 @@ module TrieveRubyClient
|
|
137
188
|
self.completion_first = attributes[:'completion_first']
|
138
189
|
end
|
139
190
|
|
191
|
+
if attributes.key?(:'concat_user_messages_query')
|
192
|
+
self.concat_user_messages_query = attributes[:'concat_user_messages_query']
|
193
|
+
end
|
194
|
+
|
140
195
|
if attributes.key?(:'filters')
|
141
196
|
self.filters = attributes[:'filters']
|
142
197
|
end
|
@@ -171,10 +226,22 @@ module TrieveRubyClient
|
|
171
226
|
self.new_message_content = nil
|
172
227
|
end
|
173
228
|
|
229
|
+
if attributes.key?(:'page_size')
|
230
|
+
self.page_size = attributes[:'page_size']
|
231
|
+
end
|
232
|
+
|
174
233
|
if attributes.key?(:'presence_penalty')
|
175
234
|
self.presence_penalty = attributes[:'presence_penalty']
|
176
235
|
end
|
177
236
|
|
237
|
+
if attributes.key?(:'score_threshold')
|
238
|
+
self.score_threshold = attributes[:'score_threshold']
|
239
|
+
end
|
240
|
+
|
241
|
+
if attributes.key?(:'search_query')
|
242
|
+
self.search_query = attributes[:'search_query']
|
243
|
+
end
|
244
|
+
|
178
245
|
if attributes.key?(:'search_type')
|
179
246
|
self.search_type = attributes[:'search_type']
|
180
247
|
end
|
@@ -189,6 +256,10 @@ module TrieveRubyClient
|
|
189
256
|
self.stream_response = attributes[:'stream_response']
|
190
257
|
end
|
191
258
|
|
259
|
+
if attributes.key?(:'system_prompt')
|
260
|
+
self.system_prompt = attributes[:'system_prompt']
|
261
|
+
end
|
262
|
+
|
192
263
|
if attributes.key?(:'temperature')
|
193
264
|
self.temperature = attributes[:'temperature']
|
194
265
|
end
|
@@ -217,6 +288,10 @@ module TrieveRubyClient
|
|
217
288
|
invalid_properties.push('invalid value for "new_message_content", new_message_content cannot be nil.')
|
218
289
|
end
|
219
290
|
|
291
|
+
if !@page_size.nil? && @page_size < 0
|
292
|
+
invalid_properties.push('invalid value for "page_size", must be greater than or equal to 0.')
|
293
|
+
end
|
294
|
+
|
220
295
|
if @topic_id.nil?
|
221
296
|
invalid_properties.push('invalid value for "topic_id", topic_id cannot be nil.')
|
222
297
|
end
|
@@ -231,6 +306,7 @@ module TrieveRubyClient
|
|
231
306
|
return false if !@max_tokens.nil? && @max_tokens < 0
|
232
307
|
return false if @message_sort_order.nil?
|
233
308
|
return false if @new_message_content.nil?
|
309
|
+
return false if !@page_size.nil? && @page_size < 0
|
234
310
|
return false if @topic_id.nil?
|
235
311
|
true
|
236
312
|
end
|
@@ -245,12 +321,23 @@ module TrieveRubyClient
|
|
245
321
|
@max_tokens = max_tokens
|
246
322
|
end
|
247
323
|
|
324
|
+
# Custom attribute writer method with validation
|
325
|
+
# @param [Object] page_size Value to be assigned
|
326
|
+
def page_size=(page_size)
|
327
|
+
if !page_size.nil? && page_size < 0
|
328
|
+
fail ArgumentError, 'invalid value for "page_size", must be greater than or equal to 0.'
|
329
|
+
end
|
330
|
+
|
331
|
+
@page_size = page_size
|
332
|
+
end
|
333
|
+
|
248
334
|
# Checks equality by comparing each attribute.
|
249
335
|
# @param [Object] Object to be compared
|
250
336
|
def ==(o)
|
251
337
|
return true if self.equal?(o)
|
252
338
|
self.class == o.class &&
|
253
339
|
completion_first == o.completion_first &&
|
340
|
+
concat_user_messages_query == o.concat_user_messages_query &&
|
254
341
|
filters == o.filters &&
|
255
342
|
frequency_penalty == o.frequency_penalty &&
|
256
343
|
highlight_citations == o.highlight_citations &&
|
@@ -258,10 +345,14 @@ module TrieveRubyClient
|
|
258
345
|
max_tokens == o.max_tokens &&
|
259
346
|
message_sort_order == o.message_sort_order &&
|
260
347
|
new_message_content == o.new_message_content &&
|
348
|
+
page_size == o.page_size &&
|
261
349
|
presence_penalty == o.presence_penalty &&
|
350
|
+
score_threshold == o.score_threshold &&
|
351
|
+
search_query == o.search_query &&
|
262
352
|
search_type == o.search_type &&
|
263
353
|
stop_tokens == o.stop_tokens &&
|
264
354
|
stream_response == o.stream_response &&
|
355
|
+
system_prompt == o.system_prompt &&
|
265
356
|
temperature == o.temperature &&
|
266
357
|
topic_id == o.topic_id
|
267
358
|
end
|
@@ -275,7 +366,7 @@ module TrieveRubyClient
|
|
275
366
|
# Calculates hash code according to all attributes.
|
276
367
|
# @return [Integer] Hash code
|
277
368
|
def hash
|
278
|
-
[completion_first, filters, frequency_penalty, highlight_citations, highlight_delimiters, max_tokens, message_sort_order, new_message_content, presence_penalty, search_type, stop_tokens, stream_response, temperature, topic_id].hash
|
369
|
+
[completion_first, concat_user_messages_query, filters, frequency_penalty, highlight_citations, highlight_delimiters, max_tokens, message_sort_order, new_message_content, page_size, presence_penalty, score_threshold, search_query, search_type, stop_tokens, stream_response, system_prompt, temperature, topic_id].hash
|
279
370
|
end
|
280
371
|
|
281
372
|
# Builds the object from hash
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.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
|
@@ -25,8 +25,6 @@ module TrieveRubyClient
|
|
25
25
|
|
26
26
|
attr_accessor :id
|
27
27
|
|
28
|
-
attr_accessor :updated_at
|
29
|
-
|
30
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
29
|
def self.attribute_map
|
32
30
|
{
|
@@ -34,8 +32,7 @@ module TrieveRubyClient
|
|
34
32
|
:'dataset_id' => :'dataset_id',
|
35
33
|
:'event_data' => :'event_data',
|
36
34
|
:'event_type' => :'event_type',
|
37
|
-
:'id' => :'id'
|
38
|
-
:'updated_at' => :'updated_at'
|
35
|
+
:'id' => :'id'
|
39
36
|
}
|
40
37
|
end
|
41
38
|
|
@@ -47,19 +44,17 @@ module TrieveRubyClient
|
|
47
44
|
# Attribute type mapping.
|
48
45
|
def self.openapi_types
|
49
46
|
{
|
50
|
-
:'created_at' => :'
|
47
|
+
:'created_at' => :'String',
|
51
48
|
:'dataset_id' => :'String',
|
52
|
-
:'event_data' => :'
|
49
|
+
:'event_data' => :'String',
|
53
50
|
:'event_type' => :'String',
|
54
|
-
:'id' => :'String'
|
55
|
-
:'updated_at' => :'Time'
|
51
|
+
:'id' => :'String'
|
56
52
|
}
|
57
53
|
end
|
58
54
|
|
59
55
|
# List of attributes with nullable: true
|
60
56
|
def self.openapi_nullable
|
61
57
|
Set.new([
|
62
|
-
:'event_data',
|
63
58
|
])
|
64
59
|
end
|
65
60
|
|
@@ -107,12 +102,6 @@ module TrieveRubyClient
|
|
107
102
|
else
|
108
103
|
self.id = nil
|
109
104
|
end
|
110
|
-
|
111
|
-
if attributes.key?(:'updated_at')
|
112
|
-
self.updated_at = attributes[:'updated_at']
|
113
|
-
else
|
114
|
-
self.updated_at = nil
|
115
|
-
end
|
116
105
|
end
|
117
106
|
|
118
107
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -128,6 +117,10 @@ module TrieveRubyClient
|
|
128
117
|
invalid_properties.push('invalid value for "dataset_id", dataset_id cannot be nil.')
|
129
118
|
end
|
130
119
|
|
120
|
+
if @event_data.nil?
|
121
|
+
invalid_properties.push('invalid value for "event_data", event_data cannot be nil.')
|
122
|
+
end
|
123
|
+
|
131
124
|
if @event_type.nil?
|
132
125
|
invalid_properties.push('invalid value for "event_type", event_type cannot be nil.')
|
133
126
|
end
|
@@ -136,10 +129,6 @@ module TrieveRubyClient
|
|
136
129
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
137
130
|
end
|
138
131
|
|
139
|
-
if @updated_at.nil?
|
140
|
-
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
141
|
-
end
|
142
|
-
|
143
132
|
invalid_properties
|
144
133
|
end
|
145
134
|
|
@@ -149,9 +138,9 @@ module TrieveRubyClient
|
|
149
138
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
150
139
|
return false if @created_at.nil?
|
151
140
|
return false if @dataset_id.nil?
|
141
|
+
return false if @event_data.nil?
|
152
142
|
return false if @event_type.nil?
|
153
143
|
return false if @id.nil?
|
154
|
-
return false if @updated_at.nil?
|
155
144
|
true
|
156
145
|
end
|
157
146
|
|
@@ -164,8 +153,7 @@ module TrieveRubyClient
|
|
164
153
|
dataset_id == o.dataset_id &&
|
165
154
|
event_data == o.event_data &&
|
166
155
|
event_type == o.event_type &&
|
167
|
-
id == o.id
|
168
|
-
updated_at == o.updated_at
|
156
|
+
id == o.id
|
169
157
|
end
|
170
158
|
|
171
159
|
# @see the `==` method
|
@@ -177,7 +165,7 @@ module TrieveRubyClient
|
|
177
165
|
# Calculates hash code according to all attributes.
|
178
166
|
# @return [Integer] Hash code
|
179
167
|
def hash
|
180
|
-
[created_at, dataset_id, event_data, event_type, id
|
168
|
+
[created_at, dataset_id, event_data, event_type, id].hash
|
181
169
|
end
|
182
170
|
|
183
171
|
# Builds the object from hash
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.11.0
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|
@@ -0,0 +1,49 @@
|
|
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 EventTypeRequest
|
18
|
+
FILE_UPLOADED = "file_uploaded".freeze
|
19
|
+
FILE_UPLOAD_FAILED = "file_upload_failed".freeze
|
20
|
+
CHUNKS_UPLOADED = "chunks_uploaded".freeze
|
21
|
+
CHUNK_ACTION_FAILED = "chunk_action_failed".freeze
|
22
|
+
CHUNK_UPDATED = "chunk_updated".freeze
|
23
|
+
BULK_CHUNKS_DELETED = "bulk_chunks_deleted".freeze
|
24
|
+
DATASET_DELETE_FAILED = "dataset_delete_failed".freeze
|
25
|
+
QDRANT_UPLOAD_FAILED = "qdrant_upload_failed".freeze
|
26
|
+
BULK_CHUNK_UPLOAD_FAILED = "bulk_chunk_upload_failed".freeze
|
27
|
+
GROUP_CHUNKS_UPDATED = "group_chunks_updated".freeze
|
28
|
+
GROUP_CHUNKS_ACTION_FAILED = "group_chunks_action_failed".freeze
|
29
|
+
|
30
|
+
def self.all_vars
|
31
|
+
@all_vars ||= [FILE_UPLOADED, FILE_UPLOAD_FAILED, CHUNKS_UPLOADED, CHUNK_ACTION_FAILED, CHUNK_UPDATED, BULK_CHUNKS_DELETED, DATASET_DELETE_FAILED, QDRANT_UPLOAD_FAILED, BULK_CHUNK_UPLOAD_FAILED, GROUP_CHUNKS_UPDATED, GROUP_CHUNKS_ACTION_FAILED].freeze
|
32
|
+
end
|
33
|
+
|
34
|
+
# Builds the enum from string
|
35
|
+
# @param [String] The enum value in the form of the string
|
36
|
+
# @return [String] The enum value
|
37
|
+
def self.build_from_hash(value)
|
38
|
+
new.build_from_hash(value)
|
39
|
+
end
|
40
|
+
|
41
|
+
# Builds the enum from string
|
42
|
+
# @param [String] The enum value in the form of the string
|
43
|
+
# @return [String] The enum value
|
44
|
+
def build_from_hash(value)
|
45
|
+
return value if EventTypeRequest.all_vars.include?(value)
|
46
|
+
raise "Invalid ENUM value #{value} for class #EventTypeRequest"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
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
|
@@ -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
|
@@ -18,26 +18,46 @@ module TrieveRubyClient
|
|
18
18
|
# The ids of the chunks to be retrieved and injected into the context window for RAG.
|
19
19
|
attr_accessor :chunk_ids
|
20
20
|
|
21
|
+
# Frequency penalty is a number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. Default is 0.7.
|
22
|
+
attr_accessor :frequency_penalty
|
23
|
+
|
21
24
|
# Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add `<b><mark>`` tags to the chunk_html of the chunks to highlight matching splits.
|
22
25
|
attr_accessor :highlight_results
|
23
26
|
|
27
|
+
# The maximum number of tokens to generate in the chat completion. Default is None.
|
28
|
+
attr_accessor :max_tokens
|
29
|
+
|
30
|
+
# Presence penalty is a number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. Default is 0.7.
|
31
|
+
attr_accessor :presence_penalty
|
32
|
+
|
24
33
|
# The previous messages to be placed into the chat history. The last message in this array will be the prompt for the model to inference on. The length of this array must be at least 1.
|
25
34
|
attr_accessor :prev_messages
|
26
35
|
|
27
36
|
# Prompt for the last message in the prev_messages array. This will be used to generate the next message in the chat. The default is 'Respond to the instruction and include the doc numbers that you used in square brackets at the end of the sentences that you used the docs for:'. You can also specify an empty string to leave the final message alone such that your user's final message can be used as the prompt. See docs.trieve.ai or contact us for more information.
|
28
37
|
attr_accessor :prompt
|
29
38
|
|
39
|
+
# Stop tokens are up to 4 sequences where the API will stop generating further tokens. Default is None.
|
40
|
+
attr_accessor :stop_tokens
|
41
|
+
|
30
42
|
# Whether or not to stream the response. If this is set to true or not included, the response will be a stream. If this is set to false, the response will be a normal JSON response. Default is true.
|
31
43
|
attr_accessor :stream_response
|
32
44
|
|
45
|
+
# What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. Default is 0.5.
|
46
|
+
attr_accessor :temperature
|
47
|
+
|
33
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
34
49
|
def self.attribute_map
|
35
50
|
{
|
36
51
|
:'chunk_ids' => :'chunk_ids',
|
52
|
+
:'frequency_penalty' => :'frequency_penalty',
|
37
53
|
:'highlight_results' => :'highlight_results',
|
54
|
+
:'max_tokens' => :'max_tokens',
|
55
|
+
:'presence_penalty' => :'presence_penalty',
|
38
56
|
:'prev_messages' => :'prev_messages',
|
39
57
|
:'prompt' => :'prompt',
|
40
|
-
:'
|
58
|
+
:'stop_tokens' => :'stop_tokens',
|
59
|
+
:'stream_response' => :'stream_response',
|
60
|
+
:'temperature' => :'temperature'
|
41
61
|
}
|
42
62
|
end
|
43
63
|
|
@@ -50,19 +70,29 @@ module TrieveRubyClient
|
|
50
70
|
def self.openapi_types
|
51
71
|
{
|
52
72
|
:'chunk_ids' => :'Array<String>',
|
73
|
+
:'frequency_penalty' => :'Float',
|
53
74
|
:'highlight_results' => :'Boolean',
|
75
|
+
:'max_tokens' => :'Integer',
|
76
|
+
:'presence_penalty' => :'Float',
|
54
77
|
:'prev_messages' => :'Array<ChatMessageProxy>',
|
55
78
|
:'prompt' => :'String',
|
56
|
-
:'
|
79
|
+
:'stop_tokens' => :'Array<String>',
|
80
|
+
:'stream_response' => :'Boolean',
|
81
|
+
:'temperature' => :'Float'
|
57
82
|
}
|
58
83
|
end
|
59
84
|
|
60
85
|
# List of attributes with nullable: true
|
61
86
|
def self.openapi_nullable
|
62
87
|
Set.new([
|
88
|
+
:'frequency_penalty',
|
63
89
|
:'highlight_results',
|
90
|
+
:'max_tokens',
|
91
|
+
:'presence_penalty',
|
64
92
|
:'prompt',
|
65
|
-
:'
|
93
|
+
:'stop_tokens',
|
94
|
+
:'stream_response',
|
95
|
+
:'temperature'
|
66
96
|
])
|
67
97
|
end
|
68
98
|
|
@@ -89,10 +119,22 @@ module TrieveRubyClient
|
|
89
119
|
self.chunk_ids = nil
|
90
120
|
end
|
91
121
|
|
122
|
+
if attributes.key?(:'frequency_penalty')
|
123
|
+
self.frequency_penalty = attributes[:'frequency_penalty']
|
124
|
+
end
|
125
|
+
|
92
126
|
if attributes.key?(:'highlight_results')
|
93
127
|
self.highlight_results = attributes[:'highlight_results']
|
94
128
|
end
|
95
129
|
|
130
|
+
if attributes.key?(:'max_tokens')
|
131
|
+
self.max_tokens = attributes[:'max_tokens']
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes.key?(:'presence_penalty')
|
135
|
+
self.presence_penalty = attributes[:'presence_penalty']
|
136
|
+
end
|
137
|
+
|
96
138
|
if attributes.key?(:'prev_messages')
|
97
139
|
if (value = attributes[:'prev_messages']).is_a?(Array)
|
98
140
|
self.prev_messages = value
|
@@ -105,9 +147,19 @@ module TrieveRubyClient
|
|
105
147
|
self.prompt = attributes[:'prompt']
|
106
148
|
end
|
107
149
|
|
150
|
+
if attributes.key?(:'stop_tokens')
|
151
|
+
if (value = attributes[:'stop_tokens']).is_a?(Array)
|
152
|
+
self.stop_tokens = value
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
108
156
|
if attributes.key?(:'stream_response')
|
109
157
|
self.stream_response = attributes[:'stream_response']
|
110
158
|
end
|
159
|
+
|
160
|
+
if attributes.key?(:'temperature')
|
161
|
+
self.temperature = attributes[:'temperature']
|
162
|
+
end
|
111
163
|
end
|
112
164
|
|
113
165
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -119,6 +171,10 @@ module TrieveRubyClient
|
|
119
171
|
invalid_properties.push('invalid value for "chunk_ids", chunk_ids cannot be nil.')
|
120
172
|
end
|
121
173
|
|
174
|
+
if !@max_tokens.nil? && @max_tokens < 0
|
175
|
+
invalid_properties.push('invalid value for "max_tokens", must be greater than or equal to 0.')
|
176
|
+
end
|
177
|
+
|
122
178
|
if @prev_messages.nil?
|
123
179
|
invalid_properties.push('invalid value for "prev_messages", prev_messages cannot be nil.')
|
124
180
|
end
|
@@ -131,20 +187,36 @@ module TrieveRubyClient
|
|
131
187
|
def valid?
|
132
188
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
133
189
|
return false if @chunk_ids.nil?
|
190
|
+
return false if !@max_tokens.nil? && @max_tokens < 0
|
134
191
|
return false if @prev_messages.nil?
|
135
192
|
true
|
136
193
|
end
|
137
194
|
|
195
|
+
# Custom attribute writer method with validation
|
196
|
+
# @param [Object] max_tokens Value to be assigned
|
197
|
+
def max_tokens=(max_tokens)
|
198
|
+
if !max_tokens.nil? && max_tokens < 0
|
199
|
+
fail ArgumentError, 'invalid value for "max_tokens", must be greater than or equal to 0.'
|
200
|
+
end
|
201
|
+
|
202
|
+
@max_tokens = max_tokens
|
203
|
+
end
|
204
|
+
|
138
205
|
# Checks equality by comparing each attribute.
|
139
206
|
# @param [Object] Object to be compared
|
140
207
|
def ==(o)
|
141
208
|
return true if self.equal?(o)
|
142
209
|
self.class == o.class &&
|
143
210
|
chunk_ids == o.chunk_ids &&
|
211
|
+
frequency_penalty == o.frequency_penalty &&
|
144
212
|
highlight_results == o.highlight_results &&
|
213
|
+
max_tokens == o.max_tokens &&
|
214
|
+
presence_penalty == o.presence_penalty &&
|
145
215
|
prev_messages == o.prev_messages &&
|
146
216
|
prompt == o.prompt &&
|
147
|
-
|
217
|
+
stop_tokens == o.stop_tokens &&
|
218
|
+
stream_response == o.stream_response &&
|
219
|
+
temperature == o.temperature
|
148
220
|
end
|
149
221
|
|
150
222
|
# @see the `==` method
|
@@ -156,7 +228,7 @@ module TrieveRubyClient
|
|
156
228
|
# Calculates hash code according to all attributes.
|
157
229
|
# @return [Integer] Hash code
|
158
230
|
def hash
|
159
|
-
[chunk_ids, highlight_results, prev_messages, prompt, stream_response].hash
|
231
|
+
[chunk_ids, frequency_penalty, highlight_results, max_tokens, presence_penalty, prev_messages, prompt, stop_tokens, stream_response, temperature].hash
|
160
232
|
end
|
161
233
|
|
162
234
|
# Builds the object from hash
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 0.
|
6
|
+
The version of the OpenAPI document: 0.11.0
|
7
7
|
Contact: developers@trieve.ai
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
Generator version: 7.4.0
|