Skip to content

devflowinc/trieve-java-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trieve-java-client

Trieve API

  • API version: 0.5.0
    • Build date: 2024-03-29T12:34:27.506198300-05:00[America/Chicago]
    • Generator version: 7.4.0

Trieve OpenAPI Specification. This document describes all of the operations available through the Trieve API.

For more information, please visit https://trieve.ai

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven (3.8.3+)/Gradle (7.2+)

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.trieve</groupId>
  <artifactId>trieve-java-client</artifactId>
  <version>0.5.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

  repositories {
    mavenCentral()     // Needed if the 'trieve-java-client' jar has been published to maven central.
    mavenLocal()       // Needed if the 'trieve-java-client' jar has been published to the local maven repo.
  }

  dependencies {
     implementation "com.trieve:trieve-java-client:0.5.0"
  }

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/trieve-java-client-0.5.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.AuthApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost:8090");

    AuthApi apiInstance = new AuthApi(defaultClient);
    try {
      SlimUser result = apiInstance.callback();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AuthApi#callback");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Documentation for API Endpoints

All URIs are relative to http://localhost:8090

Class Method HTTP request Description
AuthApi callback GET /api/auth/callback OpenID Connect callback
AuthApi getMe GET /api/auth/me Get Me
AuthApi login GET /api/auth Login
AuthApi logout DELETE /api/auth Logout
ChunkApi createChunk POST /api/chunk Create or Upsert Chunk or Chunks
ChunkApi createSuggestedQueriesHandler POST /api/chunk/gen_suggestions Generate suggested queries
ChunkApi deleteChunk DELETE /api/chunk/{chunk_id} Delete Chunk
ChunkApi deleteChunkByTrackingId DELETE /api/chunk/tracking_id/{tracking_id} Delete Chunk By Tracking Id
ChunkApi generateOffChunks POST /api/chunk/generate RAG on Specified Chunks
ChunkApi getChunkById GET /api/chunk/{chunk_id} Get Chunk By Id
ChunkApi getChunkByTrackingId GET /api/chunk/tracking_id/{tracking_id} Get Chunk By Tracking Id
ChunkApi getRecommendedChunks POST /api/chunk/recommend Get Recommended Chunks
ChunkApi searchChunk POST /api/chunk/search Search
ChunkApi updateChunk PUT /api/chunk Update Chunk
ChunkApi updateChunkByTrackingId PUT /api/chunk/tracking_id/update Update Chunk By Tracking Id
ChunkGroupApi addChunkToGroup POST /api/chunk_group/chunk/{group_id} Add Chunk to Group
ChunkGroupApi addChunkToGroupByTrackingId POST /api/chunk_group/tracking_id/{tracking_id} Add Chunk to Group by Tracking ID
ChunkGroupApi createChunkGroup POST /api/chunk_group Create Chunk Group
ChunkGroupApi deleteChunkGroup DELETE /api/chunk_group/{group_id} Delete Group
ChunkGroupApi deleteGroupByTrackingId DELETE /api/chunk_group/tracking_id/{tracking_id} Delete Group by Tracking ID
ChunkGroupApi getChunkGroup GET /api/chunk_group/{group_id} Get Group
ChunkGroupApi getChunksInGroup GET /api/chunk_group/{group_id}/{page} Get Chunks in Group
ChunkGroupApi getChunksInGroupByTrackingId GET /api/chunk_group/tracking_id/{group_tracking_id}/{page} Get Chunks in Group by Tracking ID
ChunkGroupApi getGroupByTrackingId GET /api/chunk_group/tracking_id/{tracking_id} Get Group by Tracking ID
ChunkGroupApi getGroupsChunkIsIn POST /api/chunk_group/chunks Get Groups for Chunks
ChunkGroupApi getRecommendedGroups POST /api/chunk_group/recommend Get Recommended Groups
ChunkGroupApi getSpecificDatasetChunkGroups GET /api/dataset/groups/{dataset_id}/{page} Get Groups for Dataset
ChunkGroupApi removeChunkFromGroup DELETE /api/chunk_group/chunk/{group_id} Remove Chunk from Group
ChunkGroupApi searchOverGroups POST /api/chunk_group/group_oriented_search Search Over Groups
ChunkGroupApi searchWithinGroup POST /api/chunk_group/search Search Within Group
ChunkGroupApi updateChunkGroup PUT /api/chunk_group Update Group
ChunkGroupApi updateGroupByTrackingId PUT /api/chunk_group/tracking_id/{tracking_id} Update Group by Tracking ID
DatasetApi createDataset POST /api/dataset Create dataset
DatasetApi deleteDataset DELETE /api/dataset Delete Dataset
DatasetApi getClientDatasetConfig GET /api/dataset/envs Get Client Configuration
DatasetApi getDataset GET /api/dataset/{dataset_id} Get Dataset
DatasetApi getDatasetsFromOrganization GET /api/dataset/organization/{organization_id} Get Datasets from Organization
DatasetApi updateDataset PUT /api/dataset Update Dataset
EventsApi getEvents POST /api/events Get events for the dataset
FileApi deleteFileHandler DELETE /api/file/{file_id} Delete File
FileApi getDatasetFilesHandler GET /api/dataset/files/{dataset_id}/{page} Get Files for Dataset
FileApi getFileHandler GET /api/file/{file_id} Get File
FileApi uploadFileHandler POST /api/file Upload File
HealthApi healthCheck GET /api/health Health Check
InvitationApi postInvitation POST /api/invitation Send Invitation
MessageApi createMessageCompletionHandler POST /api/message Create a message
MessageApi editMessageHandler PUT /api/message Edit a message
MessageApi getAllTopicMessages GET /api/messages/{messages_topic_id} Get all messages for a given topic
MessageApi regenerateMessageHandler DELETE /api/message Regenerate message
OrganizationApi createOrganization POST /api/organization Create Organization
OrganizationApi deleteOrganizationById DELETE /api/organization/{organization_id} Delete Organization
OrganizationApi getOrganizationById GET /api/organization/{organization_id} Get Organization
OrganizationApi getOrganizationUsage GET /api/organization/usage/{organization_id} Get Organization Usage
OrganizationApi getOrganizationUsers GET /api/organization/users/{organization_id} Get Organization Users
OrganizationApi updateOrganization PUT /api/organization Update Organization
StripeApi cancelSubscription DELETE /api/stripe/subscription/{subscription_id} Cancel Subscription
StripeApi directToPaymentLink GET /api/stripe/payment_link/{plan_id}/{organization_id} Checkout
StripeApi getAllPlans GET /api/stripe/plans Get All Plans
StripeApi updateSubscriptionPlan PATCH /api/stripe/subscription_plan/{subscription_id}/{plan_id} Update Subscription Plan
TopicApi createTopic POST /api/topic Create Topic
TopicApi deleteTopic DELETE /api/topic Delete Topic
TopicApi getAllTopicsForUser GET /api/topic/user/{user_id} Get All Topics for User
TopicApi updateTopic PUT /api/topic Update Topic
UserApi deleteUserApiKey DELETE /api/user/delete_api_key Delete User Api Key
UserApi setUserApiKey POST /api/user/set_api_key Set User Api Key
UserApi updateUser 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

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

developers@trieve.ai

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages