GithubHelp home page GithubHelp logo

juananpe / streamlit-convo-save Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.49 MB

Chrome Extension and Express backend for streamlit Chat Saving

JavaScript 47.61% CSS 0.58% EJS 22.21% Python 29.60%

streamlit-convo-save's Introduction

Streamlit Convo Save

Introduction

Streamlit Convo Save is a tool comprising a Chrome Extension and an Express backend for saving Streamlit chat conversations.

Installation

Note: You will need to have a running mongo database in default port 27017

Using the Chrome Extension in Development Mode

To use the Chrome Extension in development mode, follow these steps:

  1. Open Google Chrome and go to the Extensions page by typing chrome://extensions in the address bar.
  2. Enable the "Developer mode" toggle switch located at the top right corner of the page.
  3. Click on the "Load unpacked" button and select the folder containing the Chrome Extension files.
  4. Once the extension is loaded, you can test it by navigating to a Streamlit chat conversation and using the features provided by the extension.
  5. Make any necessary changes to the extension's code and reload the extension to see the updated changes.

Run Express Backend in Debug Mode

To run the Express backend (written in express-generator) with the DEBUG flag, follow these steps:

  1. Install the necessary dependencies by running the command:

    npm install
    
  2. Start the Express backend in debug mode by running the command:

    npm start
    

Available endpoints

  • (GET) / : This endpoint is used to retrieve the conversations already stored in the database

  • (POST) /saveConvo : This endpoint is used to save a Streamlit chat conversation to the database.

  • (GET) /test : This endpoint is used for testing purposes.

Features

Click on the extension icon to save the current conversation

Go to / to show a list of saved conversations
Tip: You can click command+[x] to delete without confirmation prompt

Click on any conversation to display it

Testing

 curl -k -X POST http://localhost:3000/saveConv \
-H "Content-Type: application/json" \
-d '{"model": "modelX", "name": "title", "userQueries": ["User question 1", "User question 2"], "assistantAnswers": ["Assistant answer 1", "Assistant answer 2"]}'
````
``
## Contributing
Guidelines for contributing to the project.

## License
Licensing information for the project.

streamlit-convo-save's People

Contributors

juananpe avatar

Stargazers

Xabi avatar

Watchers

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