Skip to content

hdmamin/jabberwocky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jabberwocky

Neil de Grasse Tyson discusses the state of science education.
neil_degrasse_tyson_with_audio.mp4
Excerpts from Alexa conversations with John Lennon, Maya Angelou, and Alan Turing.
alexa_lennon_angelou_turing.mp4

Project Description

This project provides two audio interfaces (a conversational alexa skill and a desktop GUI) to GPT-3 and a few of its open source variants. This provides a convenient way to interact with various experts or public figures, as mimicked by GPT-3: imagine discussing physics with Einstein or hip hop with Kanye. Instead of going to the OpenAI playground, writing a bio, and periodically deleting parts of your conversation as you exceed the max prompt window, you can simply say "Alexa, start Quick Chat"...

While the alexa skill is currently purely conversational, the GUI also provides Task Mode which contains built-in prompts for a number of sample tasks. It also supports generic GPT completions (i.e. no additional prompting is provided beyond what you say or type). I anticipate that further development will take place on the alexa skill but I don't plan to add to or actively maintain the GUI.

July 2022 update: The Alexa skill is now the only official Jabberwocky interface. The GUI was developed with an older version of the core Jabberwocky library and has not been fully updated to reflect the changes, and won't be in the forseeable future. You can see a (possibly incomplete) list of outstanding issues in the Developer Notes section of gui/README.md.

Alexa Skill

Quickstart

This chat log provides a minimal example of the dialogue needed to launch the skill, start a conversation with a new contact, and exit the skill when done.

User: Alexa, start Quick Chat.
Lou: Hi there! Who would you like to speak to?
User: William Shakespeare
Lou: I don't see anyone named William Shakespeare in your contacts. Would you like to add a new contact?
User: Yes please.
Lou: I've connected you with William Shakespeare.
User: Hi William! I've been struggling with how to end my novel and I thought you could provide some input.

[User and William Shakespeare chat for a bit.]

...

User: Thanks William! That really helped.
William Shakespeare: My pleasure.
User: Goodbye.

You can view more thorough documentation on setting up or using the skill in alexa/README.

GUI

Quickstart

Conversation Mode

In conversation mode, you can chat with a number of pre-defined personas or add new ones. New personas can be autogenerated or defined manually.

See data/conversation_personas for examples of autogenerated prompts. You can likely achieve better results using custom prompts though.

Conversation mode only supports spoken input, though you can edit flawed transcriptions manually. Querying GPT-3 with nonsensical or ungrammatical text may negatively impact response quality.

Task Mode

In task mode, you can ask GPT-3 to perform a number pre-defined tasks. Written and spoken input are both supported. By default, GPT-3's response is both typed out and read aloud.

Transcripts of responses from a small subset of non-conversation tasks can be found in the data/completions directory. You can also save your own completions while using the app.

Dev Notes

Project Members

  • Harrison Mamin

Repo Structure

jabberwocky/
├── lib          # Python package providing helpers for dealing with the openai api. Powers a lot of the functionality in both the GUI and alexa skill. Note that this also includes some other stuff that ultimately went unused - I initially experimented a bit with youtube transcripts, for example. Most useful functionality lives in the openai_utils module at this point.
├── alexa        # Code used to create a conversational alexa skill.
├── gui          # GUI scripts. The main script should be run from the project root directory. 
├── data         # Raw and processed data. Some files are excluded from github but the ones needed to run the app are there. This also includes miscellaneous gpt3 prompt files and conversational personas.
└── notebooks    # Jupyter notebooks for experimentation and exploratory analysis.
 

The docker and setup dirs contain remnants from previous attempts to package the app. While I ultimately decided to go with a simpler approach, I left them in the repo so I have the option of picking up where I left off if I decide to work on a new version.

About

An Alexa skill providing a conversational interface to any public figure (as mimicked by GPT3). The legacy GUI is no longer maintained.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages