Socket
Book a DemoInstallSign in
Socket

prompt-eng-server

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prompt-eng-server

A server that saves the cached data from the local prompt-eng cache to a database.

1.0.17
latest
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
2
Weekly downloads
 
Created
Source

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

Keywords

cache

FAQs

Package last updated on 04 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.