Skip to content

langframework-ai/prompt-manager-java-test

Repository files navigation

prompt-manager

CORE-PromptManager-API

  • API version: 0.0.1
    • Build date: 2024-12-17T17:22:15.826187400+05:00[Asia/Karachi]
    • Generator version: 7.10.0

Prompt Manager REST API Endpoints

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>ai.langframework</groupId>
  <artifactId>prompt-manager</artifactId>
  <version>0.0.1</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

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

  dependencies {
     implementation "ai.langframework:prompt-manager:0.0.1"
  }

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/prompt-manager-0.0.1.jar
  • target/lib/*.jar

Getting Started

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

// Import classes:
import ai.langframework.promptmanager.client.ApiClient;
import ai.langframework.promptmanager.client.ApiException;
import ai.langframework.promptmanager.client.Configuration;
import ai.langframework.promptmanager.model.*;
import ai.langframework.promptmanager.api.DefaultApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://goe0ty1i23.execute-api.us-east-1.amazonaws.com/default");

    DefaultApi apiInstance = new DefaultApi(defaultClient);
    String callerId = "callerId_example"; // String | 
    try {
      Object result = apiInstance.apiV1PromptsCategoriesCallerIdOptions(callerId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DefaultApi#apiV1PromptsCategoriesCallerIdOptions");
      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 https://goe0ty1i23.execute-api.us-east-1.amazonaws.com/default

Class Method HTTP request Description
DefaultApi apiV1PromptsCategoriesCallerIdOptions OPTIONS /api/v1/prompts/categories/{caller_id}
DefaultApi apiV1PromptsPromptPromptIdCallerCallerIdOptions OPTIONS /api/v1/prompts/prompt/{prompt_id}/caller/{caller_id}
DefaultApi apiV1PromptsPromptsCallerIdOptions OPTIONS /api/v1/prompts/prompts/{caller_id}
DefaultApi createCategory POST /api/v1/prompts/categories/{caller_id}
DefaultApi createPrompt POST /api/v1/prompts/prompts/{caller_id}
DefaultApi createUser POST /api/v1/prompts/users/{caller_id}
DefaultApi deleteCategory DELETE /api/v1/prompts/category/{category_id}/caller/{caller_id}
DefaultApi deletePrompt DELETE /api/v1/prompts/prompt/{prompt_id}/caller/{caller_id}
DefaultApi deleteUser DELETE /api/v1/prompts/user/{user_id}/caller/{caller_id}
DefaultApi getCategories GET /api/v1/prompts/categories/{caller_id}
DefaultApi getCategoryByName GET /api/v1/prompts/category/name/{category_name}/caller/{caller_id}
DefaultApi getPromptComments GET /api/v1/prompts/prompt/{prompt_id}/caller/{caller_id}/comments
DefaultApi getPromptDetails GET /api/v1/prompts/prompt/{prompt_id}/caller/{caller_id}
DefaultApi getPromptLikes GET /api/v1/prompts/prompt/{prompt_id}/caller/{caller_id}/likes
DefaultApi getPrompts GET /api/v1/prompts/prompts/{caller_id}
DefaultApi getPromptsByCategory GET /api/v1/prompts/prompts/category/{category_id}/caller/{caller_id}
DefaultApi getPromptsByUser GET /api/v1/prompts/prompts/user/{user_id}/caller/{caller_id}
DefaultApi getUserDetails GET /api/v1/prompts/user/{user_id}/caller/{caller_id}
DefaultApi getUsers GET /api/v1/prompts/users/{caller_id}
DefaultApi likePrompt POST /api/v1/prompts/prompt/{prompt_id}/caller/{caller_id}/likes
DefaultApi postCommentOnPrompt POST /api/v1/prompts/prompt/{prompt_id}/caller/{caller_id}/comments
DefaultApi searchPrompts GET /api/v1/prompts/prompts/search/{caller_id}
DefaultApi updateCategory PUT /api/v1/prompts/category/{category_id}/caller/{caller_id}
DefaultApi updatePrompt PUT /api/v1/prompts/prompt/{prompt_id}/caller/{caller_id}
DefaultApi updateUser PUT /api/v1/prompts/user/{user_id}/caller/{caller_id}

Documentation for Models

Documentation for Authorization

Endpoints do not require authorization.

Recommendation

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

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages