Giter Club home page Giter Club logo

brandnewtestv2's Introduction

Chatbot UI

Chatbot UI is an open source chat UI for AI models.

Chatbot UI

Updates

Chatbot UI will be updated over time.

Expect frequent improvements.

Next up:

  • Langchain Wrapper

Deploy

Vercel

Host your own live version of Chatbot UI with Vercel.

Deploy with Vercel

Adding a new API integration

To add a new API integration in the chat UI, follow these steps.

Add config for your API to the ~/utils/config/models.ts file

Here are all the available option for config:

  • id(string): unique identifier for your api
  • name(string): name for your api that user sees on frontend
  • endpoint(string): url for your api , used in fetch api's url
  • requestBuilder((secret: string, data: any) => RequestInit): function that recieves client's secret key, and data, must return object of type RequestInit, you can format your request's config here, For ex: to add Authorization header with secret key and change the data sending format for the api call.
  • responseExtractor((json: any) => string): function that recieves json of the api call's response. You can extract your response that you want to send client (often according to the docs of api you just added), You will mainly extract out the AI's response from the json and return it.
  • errorExtractor((json: any) => string): recieves json response of api call, but only in case of error, useful to send back error message from the api.
  • defaultPrompt(string): default prompt to be used when not supplied by user for you API.

Running Locally

1. Clone Repo

git clone https://github.com/crazydevlegend/bittensor-chatgpt.git

2. Install Dependencies

npm i

3. Provide BitAPAI API Key

Create a .env.local file in the root of the repo with your BitAPAI API Key:

BITAPAI_API_KEY=YOUR_KEY

You can set BITAPAI_API_HOST where access to the official BitAPAI host is restricted or unavailable, allowing users to configure an alternative host for their specific needs.

4. Run App

npm run dev

5. Use It

You should be able to start chatting.

Configuration

When deploying the application, the following environment variables can be set:

Environment Variable Default value Description
BITAPAI_API_KEY The default API key used for authentication with BitAPAI
BITAPAI_API_HOST https://api.bitapai.io The default host to make request with BitAPAI
VE_API_KEY The default API key used for authentication with Validator Endpoint
VE_API_HOST https://validator-api.fabhed.dev The default host to make request with Validator Endpoint

If you do not provide an BitAPAI API key with BITAPAI_API_KEY or VE_API_KEY, users will have to provide their own key.

  • To claim your free Validator Endpoint key, here.
  • To claim your free BitAPAI key, here.

Contact

If you have any questions, feel free to reach out to @crazydevlegend

brandnewtestv2's People

Contributors

userhasaccess 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.