Skip to content

devflowinc/trieve-ruby-client

Repository files navigation

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.5.0
  • Package version: 0.5.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.5.0.gem

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

api_instance = TrieveRubyClient::AuthApi.new

begin
  #OpenID Connect 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:8090

Class Method HTTP request Description
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 create_chunk POST /api/chunk Create or Upsert Chunk or Chunks
TrieveRubyClient::ChunkApi create_suggested_queries_handler POST /api/chunk/gen_suggestions Generate suggested queries
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_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 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_recommended_groups POST /api/chunk_group/recommend Get Recommended Groups
TrieveRubyClient::ChunkGroupApi get_specific_dataset_chunk_groups GET /api/dataset/groups/{dataset_id}/{page} Get Groups for Dataset
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 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 Configuration
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 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_completion_handler POST /api/message Create a message
TrieveRubyClient::MessageApi edit_message_handler PUT /api/message Edit a message
TrieveRubyClient::MessageApi get_all_topic_messages GET /api/messages/{messages_topic_id} Get all messages for a given topic
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} Cancel Subscription
TrieveRubyClient::StripeApi direct_to_payment_link GET /api/stripe/payment_link/{plan_id}/{organization_id} Checkout
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 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

About

Ruby Client for Trieve REST API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published