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.3.4
  • Package version: 0.3.4
  • 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.3.4.gem

(for development, run gem install --dev ./trieve_ruby_client-0.3.4.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.3.4'

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'

api_instance = TrieveRubyClient::AuthApi.new

begin
  #openid_callback
  result = api_instance.callback
  p result
rescue TrieveRubyClient::ApiError => e
  puts "Exception when calling AuthApi->callback: #{e}"
end

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
TrieveRubyClient::AuthApi callback GET /api/auth/callback openid_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 bulk_create_chunk POST /api/chunk/bulk bulk_create_chunk
TrieveRubyClient::ChunkApi create_chunk POST /api/chunk create_chunk
TrieveRubyClient::ChunkApi create_suggested_queries_handler POST /api/chunk/gen_suggestions get_suggested_queries
TrieveRubyClient::ChunkApi delete_chunk DELETE /api/tracking_or_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 augmented_generation_from_chunks
TrieveRubyClient::ChunkApi get_chunk_by_id GET /api/tracking_or_chunk/chunk_id get_chunk
TrieveRubyClient::ChunkApi get_chunk_by_tracking_id GET /api/chunk/tracking_id/tracking_id get_chunk_by_tracking_id
TrieveRubyClient::ChunkApi get_recommended_chunks POST /api/chunk/recommend get_recommended_chunks
TrieveRubyClient::ChunkApi search_chunk POST /api/chunk/search search
TrieveRubyClient::ChunkApi update_chunk PUT /api/chunk/update 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/tracking_or_chunk/group_id delete_chunk_group
TrieveRubyClient::ChunkGroupApi delete_group_by_tracking_id DELETE /api/chunk_group/tracking_id/tracking_id
TrieveRubyClient::ChunkGroupApi get_chunks_in_group GET /api/chunk_group/tracking_or_chunk/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
TrieveRubyClient::ChunkGroupApi get_recommended_groups POST /api/chunk_group/recommend
TrieveRubyClient::ChunkGroupApi get_specific_dataset_chunk_groups GET /api/dataset/groups/dataset_id/page get_dataset_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 group_oriented_search
TrieveRubyClient::ChunkGroupApi search_within_group POST /api/chunk_group/search search_within_group
TrieveRubyClient::ChunkGroupApi update_chunk_group PUT /api/chunk_group update_chunk_group
TrieveRubyClient::ChunkGroupApi update_group_by_tracking_id PUT /api/chunk_group/tracking_id/tracking_id
TrieveRubyClient::DatasetApi create_dataset POST /api/dataset create_dataset
TrieveRubyClient::DatasetApi delete_dataset DELETE /api/dataset delete_dataset
TrieveRubyClient::DatasetApi get_client_dataset_config GET /api/dataset/envs get_client_dataset_config
TrieveRubyClient::DatasetApi get_dataset GET /api/dataset/dataset_id get_dataset
TrieveRubyClient::DatasetApi get_datasets_from_organization GET /api/dataset/organization/organization_id get_organization_datasets
TrieveRubyClient::DatasetApi update_dataset PUT /api/dataset update_dataset
TrieveRubyClient::EventsApi get_events GET /api/events/page get_events
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_dataset_files
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
TrieveRubyClient::InvitationApi post_invitation POST /api/invitation send_invitation
TrieveRubyClient::MessageApi create_message_completion_handler POST /api/message create_message
TrieveRubyClient::MessageApi edit_message_handler PUT /api/message edit_message
TrieveRubyClient::MessageApi get_all_topic_messages GET /api/messages/messages_topic_id get_all_messages
TrieveRubyClient::MessageApi regenerate_message_handler DELETE /api/message regenerate_message
TrieveRubyClient::OrganizationApi create_organization POST /api/organization create_organization
TrieveRubyClient::OrganizationApi delete_organization_by_id DELETE /api/organization/organization_id delete_organization
TrieveRubyClient::OrganizationApi get_organization_by_id 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
TrieveRubyClient::StripeApi direct_to_payment_link GET /api/stripe/payment_link/plan_id/organization_id
TrieveRubyClient::StripeApi get_all_plans GET /api/stripe/plans
TrieveRubyClient::StripeApi update_subscription_plan PATCH /api/stripe/subscription_plan/subscription_id/plan_id
TrieveRubyClient::TopicApi create_topic POST /api/topic create_topic
TrieveRubyClient::TopicApi delete_topic DELETE /api/topic delete_topic
TrieveRubyClient::TopicApi get_all_topics_for_user GET /api/topic/user/user_id get_all_topics_for_user
TrieveRubyClient::TopicApi update_topic PUT /api/topic update_topic
TrieveRubyClient::UserApi delete_user_api_key DELETE /api/user/delete_api_key delete_user_api_key
TrieveRubyClient::UserApi set_user_api_key POST /api/user/set_api_key set_user_api_key
TrieveRubyClient::UserApi update_user PUT /api/user update_user

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

ApiKey

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header
  • Type: API key
  • API key parameter name: Authorization
  • Location: