Giter Site home page Giter Site logo

yaobviously / hanson_app Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 46.15 MB

A chatbot to explain Robin Hanson's worldview that grounds its replies in the overcomingbias.com archives and the Grabby Aliens paper

Home Page: https://hanson-chat.herokuapp.com/

Procfile 0.07% Python 23.78% Jupyter Notebook 75.93% Shell 0.22%

hanson_app's Introduction

What Would Robin Say Chatbot

This repository contains a chatbot trained on Robin Hanson's blogging corpus and his Grabby Aliens paper. The chatbot uses vector embeddings to compute the cosine distance between the query and each blog post or chunk of the Grabby Aliens paper. It then merges the most relevant blog posts with the prompt template to focus ChatGPT when generating a reply.

The user's query (but not the blog posts -- too many tokens!) and the assistant's reply are added to the message history to keep context so the conversation can progress naturally. Links to the relevant blog posts are included below the chat history to allow the user to explore further.

The chat UI is created using Streamlit and Streamlit chat. Everything else is done using OpenAI, Pandas and Numpy.

Requirements

OpenAI
Pandas
NumPy
Streamlit
Streamlit Chat

Installation

Clone the repository
Install the required packages using pip install -r requirements.txt

Usage

Run streamlit run app.py
Open the URL provided in the terminal in your web browser
Start chatting with the bot

Acknowledgements

Robin Hanson for providing the blogging corpus and the Grabby Aliens paper, OpenAI for providing the GPT-3.5 architecture used by the chatbot, NumPy for providing the vector computations, and Streamlit and Streamlit Chat for providing the chat UI

License

This repository is licensed under the MIT License.

hanson_app's People

Contributors

yaobviously avatar

Watchers

 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.