https://github.com/socketteer/loom Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} socketteer / loom Public * Notifications * Fork 50 * Star 527 Multiversal tree writing interface for human-AI collaboration 527 stars 50 forks Activity Star Notifications * Code * Issues 11 * Pull requests 1 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights socketteer/loom This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 2 branches 0 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/s] Use Git or checkout with SVN using the web URL. [gh repo clone socket] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @socketteer socketteer add label to prepend context textbox ... 0fd6604 Sep 16, 2023 add label to prepend context textbox 0fd6604 Git stats * 256 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time components add label to prepend context textbox September 15, 2023 17:31 config ffix some bugs with preferences September 27, 2021 18:45 data some export functions October 5, 2021 14:19 examples ffix some bugs with preferences September 27, 2021 18:45 static add block multiverse instructions to readme November 11, 2022 02:53 util update wavefunction mode models November 7, 2022 17:27 view visualize button May 2, 2023 20:52 .dockerignore Added docker build and run targets to the makefile, plus Dockerfile and February 25, 2023 20:07 .gitignore Added docker build and run targets to the makefile, plus Dockerfile and February 25, 2023 20:07 Dockerfile Added docker build and run targets to the makefile, plus Dockerfile and February 25, 2023 20:07 Makefile updated makefile for env vars February 25, 2023 20:22 README.md updated readme February 25, 2023 20:23 TODO.md some export functions October 5, 2021 14:19 __init__.py move to public repo February 13, 2021 02:16 controller.py fix and re-enable tree visualization March 27, 2023 08:13 gpt.py add base path and catch generation errors March 23, 2023 21:05 main.py using argparse May 24, 2023 05:47 model.py visualize button May 2, 2023 20:52 requirements.txt show minimap and children by default March 23, 2023 19:47 View code [ ] Features Demo Block multiverse mode How to use in loom Hotkeys File Dialogs Mode / display Navigate Organization Generation and memory Edit topology Edit text Collapse / expand View Instructions Python Docker README.md This is an experimental tree-based writing interface for GPT-3. The code is actively being developed and thus unstable and poorly documented. Features * Read mode + Linear story view + Tree nav bar + Edit mode * Tree view + Explore tree visually with mouse + Expand and collapse nodes + Change tree topology + Edit nodes in place * Navigation + Hotkeys + Bookmarks + Chapters + 'Visited' state * Generation + Generate N children with GPT-3 + Modify generation settings + Change hidden memory on a node-by-node basis * File I/O + Open/save trees as JSON files + Work with trees in multiple tabs + Combine trees Demo [read-view] [read-view-] [tree-view] [tree-view-] [metadata-l] ooo what features! wow so cool Block multiverse mode Read this for a conceptual explanation of block multiverse interface and demo video How to use in loom 1. Click Wavefunction button on bottom bar. This will open the block multiverse interface in the right sidebar (drag to resize). 2. Write initial prompt in the main textbox. 3. [Optional] Write ground truth continuation in the gray entry box at the bottom of the block multiverse interface. Blocks in ground truth trajectory will be colored black. 4. Set model and params in top bar. 5. Click Propagate to propagate plot the block multiverse 6. Click on any of the blocks to zoom ("renormalize") to that block 7. Click Propagate again to plot future block multiverse starting from a renormalized frame 8. Click Reset zoom to reset zoom level to initial position 9. Click Clear to clear the block multiverse plot. Do this before generating a new block multiverse. [block-mult] Hotkeys Alt hotkeys correspond to Command on Mac File Open: o, Control-o Import JSON as subtree: Control-Shift-O Save: s, Control-s Dialogs Change chapter: Control-y Preferences: Control-p Generation Settings: Control-Shift-P Visualization Settings: Control-u Multimedia dialog: u Tree Info: Control-i Node Metadata: Control+Shift+N Run Code: Control+Shift+B Mode / display Toggle edit / save edits: e, Control-e Toggle story textbox editable: Control-Shift-e Toggle visualize: j, Control-j Toggle bottom pane: Tab Toggle side pane: Alt-p Toggle show children: Alt-c Hoist: Alt-h Unhoist: Alt-Shift-h Navigate Click to go to node: Control-shift-click Next: period, Return, Control-period Prev: comma, Control-comma Go to child: Right, Control-Right Go to next sibling: Down, Control-Down Go to parent: Left, Control-Left Go to previous Sibling: Up, Control-Up Return to root: r, Control-r Walk: w, Control-w Go to checkpoint: t Save checkpoint: Control-t Go to next bookmark: d, Control-d Go to prev bookmark: a, Control-a Search ancestry: Control-f Search tree: Control-shift-f Click to split node: Control-alt-click Goto node by id: Control-shift-g Organization Toggle bookmark: b, Control-b Toggle archive node: ! Generation and memory Generate: g, Control-g Inline generate: Alt-i Add memory: Control-m View current AI memory: Control-Shift-m View node memory: Alt-m Edit topology Delete: BackSpace, Control-BackSpace Merge with Parent: Shift-Left Merge with children: Shift-Right Move node up: Shift-Up Move node down: Shift-Down Change parent: Shift-P New root child: Control-Shift-h New Child: h, Control-h, Alt-Right New Parent: Alt-Left New Sibling: Alt-Down Edit text Toggle edit / save edits: Control-e Save edits as new sibling: Alt-e Click to edit history: Control-click Click to select token: Alt-click Next counterfactual token: Alt-period Previous counterfactual token: Alt-comma Apply counterfactual changes: Alt-return Enter text: Control-bar Escape textbox: Escape Prepend newline: n, Control-n Prepend space: Control-Space Collapse / expand Collapse all except subtree: Control-colon Collapse node: Control-question Collapse subtree: Control-minus Expand children: Control-quotedbl Expand subtree: Control-plus View Center view: l, Control-l Reset zoom: Control-0 Instructions Python 0. Make sure you have tkinter installed sudo apt-get install python3-tk 1. Setup your python env (should be >= 3.9.13) ```python3 -m venv env``` ```source env/bin/activate``` 2. Install requirements pip install -r requirements.txt 3. [Optional] Set environmental variables for OPENAI_API_KEY, GOOSEAI_API_KEY, AI21_API_KEY (you can also use the settings options) export OPENAI_API_KEY={your api key} 4. Run main.py 5. Load a json tree 6. Read :) Docker (Only tested on Linux.) 0. [Optional] Edit the Makefile with your API keys (you can also use the settings options) 1. Run the make targets ```make build``` ```make run``` 2. Load a json tree 3. Read :) About Multiversal tree writing interface for human-AI collaboration Resources Readme Activity Stars 527 stars Watchers 14 watching Forks 50 forks Report repository Releases No releases published Packages 0 No packages published Contributors 6 * @socketteer * @FergusFettes * @njbbaer * @metasemi * @gcamilo * @nonlinearmoon Languages * Python 99.9% * Other 0.1% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time.