npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

socrate

v1.1.6

Published

A discussion room for using GPT personalities with internal monologues to debate problems. Provide a problem to start, or customize the settings of the debate room. Custom agents incoming!

Downloads

5

Readme

Socrate: Inform your decisions through AI agent debate

Twitter Follow

Socrate provides an automated discussion between different personalities simulated by GPT. Each agent has an internal monologue that is used to generate their response, and to decide who speaks next. Four premade agents are available (Plato, Richard Feynman, Trump and Elon Musk), but you can add your own!!

🔧 Usage

run

Run this to get started immediately (type this into your Terminal after installing node,

npm i -g socrate
socrate -p 'Should California be its own country?'

Or clone the repo to customize agents and run:

git clone https://github.com/hrishioa/socrate
cd socrate
yarn
yarn start -p 'Why shouldnt California be a country?'

🧑‍🚀 Demo (11/04/2023):

https://user-images.githubusercontent.com/973967/231541466-50bb34c8-97e0-4cf3-aa5f-1fcf2cc035f0.mp4

Options

You can run socrate --help to get this explanation of the customization:

Socrate

  A discussion room for using GPT personalities with internal monologues to
  debate problems. Provide a problem to start, or customize the settings of the
  debate room. Custom agents incoming!

Options

  -p, --problem string              The problem statement to debate, .e.g Should your creator have pizza for
                                    dinner?
  -o, --outputJSONFile string       The file to output the JSON of the debate to. Default is no output.
  --GPT4                            Use GPT-4 instead of GPT-3.5.
  -t, --temperature number          The temperature to use for the GPT model. Default is 0.5
  -r, --rounds number               The number of rounds to debate for. Default is 10.
  -d, --dontPrintToConsole          Don't print the debate to the console.
  -a, --allowSpeakingTwice          Allow agents to speak twice in a row.
  -m, --moderationInterval number   The number of rounds between moderator interjections. Default is 4, set to
                                    zero to disable the moderator's interjections.
  -h, --help                        Prints this usage guide

Here is an example using more configuration:

socrate --problem 'Why even ask questions?' --outputJSONFile '~/debate1output.json' --GPT4 --temperature 1.0 --rounds 20 --allowSpeakingTwice --moderationInterval 4

💇 Adding custom agents

Agents are located in socrate/agents/premade_agents.json. For now, you can edit this JSON to add your own agents. Custom generation of new agents with GPT is coming up, depending on where this project goes!

All you need, is

  • A short bio of your person
  • Some speaking examples (we only use the first 2000 characters)
  • A small summary of their style (you can use ChatGPT to make this, I did)

Installing Node

On Mac/Linux machines, you can install nvm using this in your terminal (use the github link to nvm if you want to make sure you have the right file)

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash

Once that's done, restart your terminal and you can install node 19 with

nvm install 19
nvm alias default 19

That's it, now you are ready to install socrate!