1.0.17 • Published 10 months ago

prompt-eng-server v1.0.17

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

Prompt server

The server of the prompt client, saves data in a database for later use.

How to use:

The server uses a REST API with different routes:

  • GET requests -

    • /api/getPrompt - POST request, gets an hashed message and returns the prompt that matches that hash:

      • takes a payload of a hashed message - { hash }
      • returns the prompt that matches that hash
      • if a prompt doesn't exist returns an error message
  • POST requests -

    • /api/createPrompt - POST request, saves a new prompt to the database:

      • takes a payload of a hashed message, parameters (if there are any) and the usual OpenAI's createChatCompletion and createCompletion parameters - {hash, ...{OPENAI_PARAMS}}
      • returns the newly created prompt
      • if a prompt already exist returns an error message
  • PUT requests -

    • /api/updatePrompt - PUT request, updates a prompt with the same hash:

      • takes a payload of a hashed message, parameters (if there are any) and the usual OpenAI's createChatCompletion and createCompletion parameters - {hash, ...{OPENAI_PARAMS}}
      • returns the newly updated prompt
      • if a prompt with that hash doesnt exist returns an error message
1.0.17

10 months ago

1.0.15

11 months ago

1.0.14

11 months ago

1.0.12

11 months ago

1.0.11

11 months ago

1.0.10

11 months ago

1.0.8

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago