Giter Site home page Giter Site logo

natralang's Introduction

NatraLang

Natural language query for MongoDB. Why write queries when the LLM can write them for you?

NatraLang Search Tester NatraLang Source Management NatraLang Semantic Lookup

Installation

Create a dedicated cluster on MongDB Atlas (7.x or higher), Under Database Access add a database user in Password mode, with the built in role of "read/write any database". Click on Network Access and add your personal IP or 0.0.0.0 if you're comfortable with any IP connecting to this cluster.

Sign up with Mistral.ai or OpenAI and get an API key.

pip install -r requirements.txt

Docker Installation

git pull https://github.com/patw/Natralang.git
cd Natralang
  • Follow the instructions below on configuring the .env, model and embedder configs
docker build -t natralang .
docker run -d -p 7861:5000 natralang

Running

After the application has been configured (.env is correct), you can start it with the script files and load the UI by going to:

http://localhost:7861

Linux / MacOS

./nl.sh

Windows

nl.bat

Configuration

Copy the sample.env file to .env and edit this file. This contains all the important configuration variables for the application to run.

  • MONGO_CON - This will be your srv style connection into Atlas Mongo, you can get this from the Atlas UI by selecting Connection and using python for the language
  • MONGO_DB - The database you want to connect to. "natralang" is default.
  • SECRET_KEY - This is the session key for Flask, it can be anything you want
  • USERS - This is a json doc of user/password keys, set this to something you remember so you can log into system
  • SERVICE - "mistral" for Mistral.ai, "azure" for azure openai or "openai" for OpenAI
  • MODEL_NAME - This is the model name to use with each service. See file for examples
  • OPENAI_API_KEY - This is your OpenAI Key. You only need this configured if you are using OpenAI.
  • MISTRAL_API_KEY - This is your Mistral.ai Key. You only need this configured if you are using Mistral.ai.

natralang's People

Contributors

patw avatar

Stargazers

Shungheon "Shawn" Chai avatar Jeff Schmitz avatar Ethan Steininger avatar

Watchers

 avatar Ethan Steininger avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.