Coder Social home page Coder Social logo

everyoneisgross / tinydogbigdog Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 31 KB

tinydogBIGDOG uses gpt4all and openai api calls to create a consistent and persistent chat agent. choosing between the "tiny dog" or the "big dog". Two dogs with a single bark.

License: MIT License

Python 100.00%
chatbot openai teacher-student gpt4all local-ai

tinydogbigdog's Introduction

tinydogBIGDOG

tinydogBIGDOG is a conversational chatbot that uses both local and cloud-based language models to provide a seamless and enriched conversational experience. The chatbot is designed to first use a local language model (tinydog, powered by GPT-4All) and then, if necessary, escalate to a more powerful cloud-based model (BIGDOG, powered by OpenAI's GPT-3.5-turbo). Using essentially a student-teacher framework but at the chat end of the nn.

Intent

The intent of tinydogBIGDOG is to provide a high-quality conversational experience while optimizing for efficiency and cost-effectiveness. By using a local model first, we can quickly generate responses for most queries. However, for more complex or nuanced queries, we escalate to the cloud-based model to ensure we provide the best possible response. This approach allows us to balance performance and cost, providing a high-quality service while minimizing the use of more expensive cloud-based resources.

tinydogbigdog


Features

Semantic Search:

tinydogBIGDOG uses semantic search to enrich the conversation context, improving the quality of the generated responses.

Cosine Similarity:

We use cosine similarity to measure the relevance of the generated response to the user's query. If the response from the local model is not similar enough to the query, we escalate to the cloud-based model.

Sentiment Analysis:

tinydogBIGDOG performs sentiment analysis on both the user's query and the chatbot's response, providing additional insights into the conversation.

Keyword Extraction:

The chatbot extracts keywords from both the user's query and its own response, which can be used for further analysis or to guide the conversation.

Consistent and Persistent Chat Agent

Despite using two different models, tinydogBIGDOG is designed to maintain a consistent conversational experience. The transition between the local and cloud-based models is seamless and invisible to the user, maintaining the illusion of a single, consistent chat agent throughout the conversation. All conversations are stored in a JSON file for future reference and analysis. Additionally, the embeddings used for semantic search are stored in a pickle file.

KmkAHcbm

Usage

To interact with tinydogBIGDOG, simply input your query when prompted. The chatbot will generate a response using the local model, and if necessary, escalate to the cloud-based model. The conversation continues until you type "bye".

tinydogbigdog's People

Contributors

everyoneisgross avatar

Stargazers

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