[go: up one dir, main page]

prompt-eng-server

1.0.17 • Public • Published

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

Package Sidebar

Install

npm i prompt-eng-server

Weekly Downloads

0

Version

1.0.17

License

ISC

Unpacked Size

3.32 kB

Total Files

3

Last publish

Collaborators

  • yash_blinqio
  • adibalak
  • arundoss16
  • rohanbharti
  • sapnesh_naik_blinqio
  • dev-goel-blinqio
  • khaledabbas
  • adariyash
  • r4zz28
  • aviral.blinqio
  • ashishkumarsoni0
  • madhav-blinq
  • samuel_amouyal
  • liad1231
  • guy_arieli