Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nlbridge/express

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nlbridge/express

An express middleware to connect to several LLMs

  • 0.2.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

nlbridge Express.js 🌲💬 🌉

Free And Open Source

About nlbridge

nlbridge is a Node.js library that provides utilities, middleware, and a development server for building APIs powered by large language models.

This package @nlbridge/express provides an Express.js middleware for nlbridge. It can be used to build custom APIs that connect to large language models, and expose them as HTTP endpoints. It's designed to easily integrate with nlux (the conversational UI React and JS library), but it can also be used independently with any other client.

Using @nlbridge/express

To use the nlbridge middleware in your own Express.js server, install the @nlbridge/express package:

npm install @nlbridge/express

Then, use the middleware in your Express.js server:

import {middleware} from '@nlbridge/express';

const app = express();

app.use(middleware(
    // The AI backend to use (e.g. 'openai'). Only OpenAI is supported at the moment.
    'openai',
    // Configuration object. Ref below for details.
    actions,
));

Config is an object with the following type:

type MiddlewareConfig = {
    apiKey?: string;
    chatModel?: string;
    chatMode?: 'stream' | 'block';
};

Building UIs with nlux and nlbridge

nlbridge is designed to work seamlessly with nlux, the conversational UI library for any large language model.
To learn more, please refer to the nlux documentation.

Keywords

FAQs

Package last updated on 18 Feb 2024

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc