trieve_ruby_client
TrieveRubyClient - the Ruby gem for the Trieve API
Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.
This SDK is automatically generated by the OpenAPI Generator project:
- API version: 0.11.0
- Package version: 0.11.0
- Generator version: 7.4.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://trieve.ai
Installation
Build a gem
To build the Ruby code into a gem:
gem build trieve_ruby_client.gemspec
Then either install the gem locally:
gem install ./trieve_ruby_client-0.11.0.gem
(for development, run gem install --dev ./trieve_ruby_client-0.11.0.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'trieve_ruby_client', '~> 0.11.0'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'trieve_ruby_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
# Load the gem
require 'trieve_ruby_client'
# Setup authorization
TrieveRubyClient.configure do |config|
# Configure API key authorization: ApiKey
config.api_key['ApiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['ApiKey'] = 'Bearer'
end
api_instance = TrieveRubyClient::AnalyticsApi.new
tr_dataset = 'tr_dataset_example' # String | The dataset id to use for the request
cluster_analytics = TrieveRubyClient::ClusterQueries.new({cluster_id: 'cluster_id_example', type: 'cluster_queries'}) # ClusterAnalytics | JSON request payload to filter the graph
begin
#Get Cluster Analytics
result = api_instance.get_cluster_analytics(tr_dataset, cluster_analytics)
p result
rescue TrieveRubyClient::ApiError => e
puts "Exception when calling AnalyticsApi->get_cluster_analytics: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://api.trieve.ai
Class | Method | HTTP request | Description |
---|---|---|---|
TrieveRubyClient::AnalyticsApi | get_cluster_analytics | POST /api/analytics/search/cluster | Get Cluster Analytics |
TrieveRubyClient::AnalyticsApi | get_rag_analytics | POST /api/analytics/rag | Get RAG Analytics |
TrieveRubyClient::AnalyticsApi | get_recommendation_analytics | POST /api/analytics/recommendation | Get Recommendation Analytics |
TrieveRubyClient::AnalyticsApi | get_search_analytics | POST /api/analytics/search | Get Search Analytics |
TrieveRubyClient::AuthApi | callback | GET /api/auth/callback | OpenID Connect callback |
TrieveRubyClient::AuthApi | get_me | GET /api/auth/me | Get Me |
TrieveRubyClient::AuthApi | login | GET /api/auth | Login |
TrieveRubyClient::AuthApi | logout | DELETE /api/auth | Logout |
TrieveRubyClient::ChunkApi | autocomplete | POST /api/chunk/autocomplete | Autocomplete |
TrieveRubyClient::ChunkApi | count_chunks | POST /api/chunk/count | Count chunks above threshold |
TrieveRubyClient::ChunkApi | create_chunk | POST /api/chunk | Create or Upsert Chunk or Chunks |
TrieveRubyClient::ChunkApi | delete_chunk | DELETE /api/chunk/chunk_id | Delete Chunk |
TrieveRubyClient::ChunkApi | delete_chunk_by_tracking_id | DELETE /api/chunk/tracking_id/tracking_id | Delete Chunk By Tracking Id |
TrieveRubyClient::ChunkApi | generate_off_chunks | POST /api/chunk/generate | RAG on Specified Chunks |
TrieveRubyClient::ChunkApi | get_chunk_by_id | GET /api/chunk/chunk_id | Get Chunk By Id |
TrieveRubyClient::ChunkApi | get_chunk_by_tracking_id | GET /api/chunk/tracking_id/tracking_id | Get Chunk By Tracking Id |
TrieveRubyClient::ChunkApi | get_chunks_by_ids | POST /api/chunks | Get Chunks By Ids |
TrieveRubyClient::ChunkApi | get_chunks_by_tracking_ids | POST /api/chunks/tracking | Get Chunks By Tracking Ids |
TrieveRubyClient::ChunkApi | get_recommended_chunks | POST /api/chunk/recommend | Get Recommended Chunks |
TrieveRubyClient::ChunkApi | get_suggested_queries | POST /api/chunk/gen_suggestions | Generate suggested queries |
TrieveRubyClient::ChunkApi | search_chunks | POST /api/chunk/search | Search |
TrieveRubyClient::ChunkApi | update_chunk | PUT /api/chunk | Update Chunk |
TrieveRubyClient::ChunkApi | update_chunk_by_tracking_id | PUT /api/chunk/tracking_id/update | Update Chunk By Tracking Id |
TrieveRubyClient::ChunkGroupApi | add_chunk_to_group | POST /api/chunk_group/chunk/group_id | Add Chunk to Group |
TrieveRubyClient::ChunkGroupApi | add_chunk_to_group_by_tracking_id | POST /api/chunk_group/tracking_id/tracking_id | Add Chunk to Group by Tracking ID |
TrieveRubyClient::ChunkGroupApi | create_chunk_group | POST /api/chunk_group | Create Chunk Group |
TrieveRubyClient::ChunkGroupApi | delete_chunk_group | DELETE /api/chunk_group/group_id | Delete Group |
TrieveRubyClient::ChunkGroupApi | delete_group_by_tracking_id | DELETE /api/chunk_group/tracking_id/tracking_id | Delete Group by Tracking ID |
TrieveRubyClient::ChunkGroupApi | get_chunk_group | GET /api/chunk_group/group_id | Get Group |
TrieveRubyClient::ChunkGroupApi | get_chunks_in_group | GET /api/chunk_group/group_id/page | Get Chunks in Group |
TrieveRubyClient::ChunkGroupApi | get_chunks_in_group_by_tracking_id | GET /api/chunk_group/tracking_id/group_tracking_id/page | Get Chunks in Group by Tracking ID |
TrieveRubyClient::ChunkGroupApi | get_group_by_tracking_id | GET /api/chunk_group/tracking_id/tracking_id | Get Group by Tracking ID |
TrieveRubyClient::ChunkGroupApi | get_groups_chunk_is_in | POST /api/chunk_group/chunks | Get Groups for Chunks |
TrieveRubyClient::ChunkGroupApi | get_groups_for_dataset | GET /api/dataset/groups/dataset_id/page | Get Groups for Dataset |
TrieveRubyClient::ChunkGroupApi | get_recommended_groups | POST /api/chunk_group/recommend | Get Recommended Groups |
TrieveRubyClient::ChunkGroupApi | remove_chunk_from_group | DELETE /api/chunk_group/chunk/group_id | Remove Chunk from Group |
TrieveRubyClient::ChunkGroupApi | search_over_groups | POST /api/chunk_group/group_oriented_search | Search Over Groups |
TrieveRubyClient::ChunkGroupApi | search_within_group | POST /api/chunk_group/search | Search Within Group |
TrieveRubyClient::ChunkGroupApi | update_chunk_group | PUT /api/chunk_group | Update Group |
TrieveRubyClient::ChunkGroupApi | update_group_by_tracking_id | PUT /api/chunk_group/tracking_id/tracking_id | Update Group by Tracking ID |
TrieveRubyClient::DatasetApi | clear_dataset | PUT /api/dataset/clear/dataset_id | Clear Dataset |
TrieveRubyClient::DatasetApi | create_dataset | POST /api/dataset | Create dataset |
TrieveRubyClient::DatasetApi | delete_dataset | DELETE /api/dataset/dataset_id | Delete Dataset |
TrieveRubyClient::DatasetApi | delete_dataset_by_tracking_id | DELETE /api/dataset/tracking_id/tracking_id | Delete Dataset by Tracking ID |
TrieveRubyClient::DatasetApi | get_dataset | GET /api/dataset/dataset_id | Get Dataset |
TrieveRubyClient::DatasetApi | get_datasets_from_organization | GET /api/dataset/organization/organization_id | Get Datasets from Organization |
TrieveRubyClient::DatasetApi | get_usage_by_dataset_id | GET /api/dataset/usage/dataset_id | Get Usage By Dataset ID |
TrieveRubyClient::DatasetApi | update_dataset | PUT /api/dataset | Update Dataset |
TrieveRubyClient::EventsApi | get_events | POST /api/events | Get events for the dataset |
TrieveRubyClient::FileApi | delete_file_handler | DELETE /api/file/file_id | Delete File |
TrieveRubyClient::FileApi | get_dataset_files_handler | GET /api/dataset/files/dataset_id/page | Get Files for Dataset |
TrieveRubyClient::FileApi | get_file_handler | GET /api/file/file_id | Get File |
TrieveRubyClient::FileApi | upload_file_handler | POST /api/file | Upload File |
TrieveRubyClient::HealthApi | health_check | GET /api/health | Health Check |
TrieveRubyClient::InvitationApi | post_invitation | POST /api/invitation | Send Invitation |
TrieveRubyClient::MessageApi | create_message | POST /api/message | Create message |
TrieveRubyClient::MessageApi | edit_message | PUT /api/message | Edit message |
TrieveRubyClient::MessageApi | get_all_topic_messages | GET /api/messages/messages_topic_id | Get all messages for a given topic |
TrieveRubyClient::MessageApi | regenerate_message | DELETE /api/message | Regenerate message |
TrieveRubyClient::MetricsApi | get_metrics | POST /metrics | Get Prometheus Metrics |
TrieveRubyClient::OrganizationApi | create_organization | POST /api/organization | Create Organization |
TrieveRubyClient::OrganizationApi | delete_organization | DELETE /api/organization/organization_id | Delete Organization |
TrieveRubyClient::OrganizationApi | get_organization | GET /api/organization/organization_id | Get Organization |
TrieveRubyClient::OrganizationApi | get_organization_usage | GET /api/organization/usage/organization_id | Get Organization Usage |
TrieveRubyClient::OrganizationApi | get_organization_users | GET /api/organization/users/organization_id | Get Organization Users |
TrieveRubyClient::OrganizationApi | update_organization | PUT /api/organization | Update Organization |
TrieveRubyClient::StripeApi | cancel_subscription | DELETE /api/stripe/subscription/subscription_id | Cancel Subscription |
TrieveRubyClient::StripeApi | create_setup_checkout_session | POST /api/stripe/checkout/setup/organization_id | Create checkout session setup |
TrieveRubyClient::StripeApi | direct_to_payment_link | GET /api/stripe/payment_link/plan_id/organization_id | Checkout |
TrieveRubyClient::StripeApi | get_all_invoices | GET /api/stripe/invoices/organization_id | Get All Invoices |
TrieveRubyClient::StripeApi | get_all_plans | GET /api/stripe/plans | Get All Plans |
TrieveRubyClient::StripeApi | update_subscription_plan | PATCH /api/stripe/subscription_plan/subscription_id/plan_id | Update Subscription Plan |
TrieveRubyClient::TopicApi | create_topic | POST /api/topic | Create Topic |
TrieveRubyClient::TopicApi | delete_topic | DELETE /api/topic/topic_id | Delete Topic |
TrieveRubyClient::TopicApi | get_all_topics_for_owner_id | GET /api/topic/owner/owner_id | Get All Topics for Owner ID |
TrieveRubyClient::TopicApi | update_topic | PUT /api/topic | Update Topic |
TrieveRubyClient::UserApi | delete_user_api_key | DELETE /api/user/api_key/api_key_id | Delete User Api Key |
TrieveRubyClient::UserApi | set_user_api_key | POST /api/user/api_key | Set User Api Key |
TrieveRubyClient::UserApi | update_user | PUT /api/user | Update User |
Documentation for Models
- TrieveRubyClient::APIVersion
- TrieveRubyClient::AddChunkToGroupData
- TrieveRubyClient::ApiKeyRespBody
- TrieveRubyClient::AuthQuery
- TrieveRubyClient::AutocompleteReqPayload
- TrieveRubyClient::BatchQueuedChunkResponse
- TrieveRubyClient::BookmarkGroupResponse
- TrieveRubyClient::BookmarkGroupResult
- TrieveRubyClient::BoostPhrase
- TrieveRubyClient::ChatMessageProxy
- TrieveRubyClient::ChunkFilter
- TrieveRubyClient::ChunkGroup
- TrieveRubyClient::ChunkGroupAndFileId
- TrieveRubyClient::ChunkMetadata
- TrieveRubyClient::ChunkMetadataStringTagSet
- TrieveRubyClient::ChunkMetadataTypes
- TrieveRubyClient::ChunkMetadataWithScore
- TrieveRubyClient::ChunkReqPayload
- TrieveRubyClient::ChunkReturnTypes
- TrieveRubyClient::ClusterAnalytics
- TrieveRubyClient::ClusterAnalyticsFilter
- TrieveRubyClient::ClusterAnalyticsResponse
- TrieveRubyClient::ClusterQueries
- TrieveRubyClient::ClusterTopics
- TrieveRubyClient::ConditionType
- TrieveRubyClient::ContentChunkMetadata
- TrieveRubyClient::CountChunkQueryResponseBody
- TrieveRubyClient::CountChunksReqPayload
- TrieveRubyClient::CountQueries
- TrieveRubyClient::CreateChunkGroupReqPayload
- TrieveRubyClient::CreateChunkReqPayloadEnum
- TrieveRubyClient::CreateDatasetRequest
- TrieveRubyClient::CreateMessageReqPayload
- TrieveRubyClient::CreateOrganizationData
- TrieveRubyClient::CreateSetupCheckoutSessionResPayload
- TrieveRubyClient::CreateTopicReqPayload
- TrieveRubyClient::Dataset
- TrieveRubyClient::DatasetAnalytics
- TrieveRubyClient::DatasetAndUsage
- TrieveRubyClient::DatasetDTO
- TrieveRubyClient::DatasetUsageCount
- TrieveRubyClient::DateRange
- TrieveRubyClient::DeleteTopicData
- TrieveRubyClient::DeleteUserApiKeyRequest
- TrieveRubyClient::DeprecatedSearchOverGroupsResponseBody
- TrieveRubyClient::DistancePhrase
- TrieveRubyClient::EditMessageReqPayload
- TrieveRubyClient::ErrorResponseBody
- TrieveRubyClient::Event
- TrieveRubyClient::EventReturn
- TrieveRubyClient::EventTypeRequest
- TrieveRubyClient::FieldCondition
- TrieveRubyClient::File
- TrieveRubyClient::FileDTO
- TrieveRubyClient::GenerateChunksRequest
- TrieveRubyClient::GeoInfo
- TrieveRubyClient::GeoInfoWithBias
- TrieveRubyClient::GeoTypes
- TrieveRubyClient::GetChunksData
- TrieveRubyClient::GetChunksForGroupsResponse
- TrieveRubyClient::GetDatasetsPagination
- TrieveRubyClient::GetEventsData
- TrieveRubyClient::GetGroupsForChunksData
- TrieveRubyClient::GetTrackingChunksData
- TrieveRubyClient::Granularity
- TrieveRubyClient::GroupData
- TrieveRubyClient::GroupScoreChunk
- TrieveRubyClient::GroupsBookmarkQueryResult
- TrieveRubyClient::HasIDCondition
- TrieveRubyClient::HeadQueries
- TrieveRubyClient::HeadQueries1
- TrieveRubyClient::HeadQueryResponse
- TrieveRubyClient::InvitationData
- TrieveRubyClient::LatencyGraph
- TrieveRubyClient::LatencyGraphResponse
- TrieveRubyClient::LocationBoundingBox
- TrieveRubyClient::LocationPolygon
- TrieveRubyClient::LocationRadius
- TrieveRubyClient::LowConfidenceQueries
- TrieveRubyClient::LowConfidenceRecommendations
- TrieveRubyClient::MatchCondition
- TrieveRubyClient::Message
- TrieveRubyClient::NewChunkMetadataTypes
- TrieveRubyClient::NoResultQueries
- TrieveRubyClient::Organization
- TrieveRubyClient::OrganizationUsageCount
- TrieveRubyClient::QueryCountResponse
- TrieveRubyClient::QueryDetails
- TrieveRubyClient::RAGAnalytics
- TrieveRubyClient::RAGAnalyticsFilter
- TrieveRubyClient::RAGAnalyticsResponse
- TrieveRubyClient::RAGQueries
- TrieveRubyClient::RAGUsage
- TrieveRubyClient::RAGUsageResponse
- TrieveRubyClient::RPSGraph
- TrieveRubyClient::RPSGraphResponse
- TrieveRubyClient::RagQueryEvent
- TrieveRubyClient::RagQueryResponse
- TrieveRubyClient::RagTypes
- TrieveRubyClient::Range
- TrieveRubyClient::RangeCondition
- TrieveRubyClient::RecommendChunksRequest
- TrieveRubyClient::RecommendChunksResponseBody
- TrieveRubyClient::RecommendGroupChunksRequest
- TrieveRubyClient::RecommendGroupsResponse
- TrieveRubyClient::RecommendGroupsResponseBody
- TrieveRubyClient::RecommendResponseTypes
- TrieveRubyClient::RecommendType
- TrieveRubyClient::RecommendationAnalytics
- TrieveRubyClient::RecommendationAnalyticsFilter
- TrieveRubyClient::RecommendationAnalyticsResponse
- TrieveRubyClient::RecommendationEvent
- TrieveRubyClient::RecommendationQueries
- TrieveRubyClient::RecommendationStrategy
- TrieveRubyClient::RecommendationType
- TrieveRubyClient::RecommendationsEventResponse
- TrieveRubyClient::RegenerateMessageReqPayload
- TrieveRubyClient::RemoveChunkFromGroupReqPayload
- TrieveRubyClient::ReturnQueuedChunk
- TrieveRubyClient::RoleProxy
- TrieveRubyClient::ScoreChunk
- TrieveRubyClient::ScoreChunkDTO
- TrieveRubyClient::SearchAnalytics
- TrieveRubyClient::SearchAnalyticsFilter
- TrieveRubyClient::SearchAnalyticsResponse
- TrieveRubyClient::SearchChunkQueryResponseBody
- TrieveRubyClient::SearchChunksReqPayload
- TrieveRubyClient::SearchClusterResponse
- TrieveRubyClient::SearchClusterTopics
- TrieveRubyClient::SearchGroupResponseTypes
- TrieveRubyClient::SearchLatencyGraph
- TrieveRubyClient::SearchMethod
- TrieveRubyClient::SearchMetrics
- TrieveRubyClient::SearchOverGroupsData
- TrieveRubyClient::SearchOverGroupsResponseBody
- TrieveRubyClient::SearchOverGroupsResponseTypes
- TrieveRubyClient::SearchOverGroupsResults
- TrieveRubyClient::SearchQueries
- TrieveRubyClient::SearchQueryEvent
- TrieveRubyClient::SearchQueryResponse
- TrieveRubyClient::SearchRPSGraph
- TrieveRubyClient::SearchResponseBody
- TrieveRubyClient::SearchResponseTypes
- TrieveRubyClient::SearchResultType
- TrieveRubyClient::SearchType
- TrieveRubyClient::SearchTypeCount
- TrieveRubyClient::SearchWithinGroupData
- TrieveRubyClient::SearchWithinGroupResponseBody
- TrieveRubyClient::SearchWithinGroupResults
- TrieveRubyClient::SetUserApiKeyRequest
- TrieveRubyClient::SetUserApiKeyResponse
- TrieveRubyClient::SingleQueuedChunkResponse
- TrieveRubyClient::SlimChunkMetadata
- TrieveRubyClient::SlimChunkMetadataWithArrayTagSet
- TrieveRubyClient::SlimChunkMetadataWithScore
- TrieveRubyClient::SlimUser
- TrieveRubyClient::SortBy
- TrieveRubyClient::SortOrder
- TrieveRubyClient::StripeInvoice
- TrieveRubyClient::StripePlan
- TrieveRubyClient::SuggestedQueriesReqPayload
- TrieveRubyClient::SuggestedQueriesResponse
- TrieveRubyClient::Topic
- TrieveRubyClient::UpdateChunkByTrackingIdData
- TrieveRubyClient::UpdateChunkGroupData
- TrieveRubyClient::UpdateChunkReqPayload
- TrieveRubyClient::UpdateDatasetRequest
- TrieveRubyClient::UpdateGroupByTrackingIDReqPayload
- TrieveRubyClient::UpdateOrganizationData
- TrieveRubyClient::UpdateTopicReqPayload
- TrieveRubyClient::UpdateUserOrgRoleData
- TrieveRubyClient::UploadFileReqPayload
- TrieveRubyClient::UploadFileResult
- TrieveRubyClient::UserOrganization
Documentation for Authorization
Authentication schemes defined for the API:
ApiKey
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
X-API-KEY
- Type: API key
- API key parameter name: X-API-KEY
- Location: HTTP header