Giter VIP home page Giter VIP logo

quivr-typechat's Introduction

quivr-typechat : Use typechat with your Quivr instance

Introduction

This is a little plugin that allows you to use a Quivr instance with TypeChat.

My research goal is to use Quivr in the middle of the LLM to use the Knowledge Base of the Brain to influence the response of Typechat. And the first step is this plugin :)

It is also a great way to use Typechat with not yet officially supported models like GPT4ALL / VertexAI / Anthropic using Quivr as an abstraction layer !

Contributions and ideas are very welcome

Installation

The package is available on NPM You can install it using NPM or your favorite package manager, example:

npm install --save quivr-typechat

Usage

On your code replace the Typechat createLanguageModel function with createQuivrLanguageModel

Instead of

import {createLanguageModel} from "typechat";

const model = createLanguageModel(process.env);

Use

import {createQuivrLanguageModel} from "quivr-typechat";

const model = createQuivrLanguageModel(process.env);

You will need to define two new variables in the .env file or in the environnement:

QUIVR_API_KEY="<your_quivr_key_here>"
QUIVR_BRAIN_ID="<brain_to_use_in_the_program>"

You can also specify parameters available for Quivr, here is a complete example of the createQuivrLanguageModel function:

const model = createQuivrLanguageModel(process.env, {
    endpoint: "http://localhost:5050",
    model: "gpt-3.5-turbo-16k",
    max_tokens: 2048
});

I hope this plugin would be as usefullfor you as it is for me ! :)

Notice

This is an experimental plugin on top on an experimental library, it's fun to mess with it, but don't put it anywhere near your production !

Planned features

  • Handle retries like specified by Typechat
  • Ability to set a brain per model
  • Leverage the knowledge base when using Quivr
  • Remove code duplication when more tooling would be available publicly
  • Make verbosity optional instead of default
  • Make Quivr endpoint available via environnement variable
  • Tests ! (Forgive me, it's 2:35 and I could not have guessed it would have been so fun to tinker with :D )
  • Build and publish on NPM on main commit with code changes

quivr-typechat's People

Contributors

dkfn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

heydoctordre

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.