Git Product home page Git Product logo

thoth's Introduction

THOTH

Thoth is a multishot system builder. It leverages a visual coding style interface to allows game designers and developers to rapidly create powerful natural language systems and prototype games.

Quickstart

You will need yarn or npm and Docker installed, along with Node.js 16 or higher. We use Docker to run a local Postgres database. You can skip the docker and install postgres directly, but you are almost always better off just using Docker. For Linux and MAC users, sleep and concurently commands must be installed in the machine.

Install xvfb, chromium and ffmpeg

First, install dependencies

yarn install
OR
npm i

You will need to make a few environment variable modifications To keep values privates, create a new file for each .env, called .env.local (these files are safe from the .gitignore)

In order to run the client and server use

yarn run dev

If on Windows run:
yarn run dev:windows

Local Development

We use dotenv-flow for local environment variable management

Go to client folder, and create a new file called .env.local -- copy and .env vars you want to set from .env there

Go to server folder, and create a new file called .env.local -- copy and .env vars you want to set from .env there

Client Setup

  1. Clone the repository
  2. Navigate to the project root by running cd thoth
  3. Run yarn install to install project dependencies
  4. Run yarn start to start the @thothai/thoth-client app

Core Local Setup

  1. Core the contents of core/.env.default to core/.env and modify the secrets as necessary
  2. Step 2 in Monorepo Development Setup

Available Scripts

In the project directory, you can run:

yarn run dev

Runs both server and client.
Open https://localhost:3001 to view it in the browser.

yarn start

Runs @thothai/client in the development mode.
Open http://localhost:3003 to view it in the browser.

yarn build

Builds the @thothai/thoth-client app for production to the client/build folder.

yarn build:core

Builds the @thothai/core package for production to the core/build folder.

Apache license information

Good example here for formatting apache license files for reference. https://www.openntf.org/Internal/home.nsf/dx/Applying_Apache_License

thoth's People

Contributors

aawalton avatar akashkrshukla avatar alextitonis avatar antpb avatar davincidreams avatar dreaminglucid avatar emmyn5600 avatar haruhunab1320 avatar kimenyikevin avatar kinjalravel avatar lalalune avatar loveheenavasu avatar mahmed0715 avatar manwe-777 avatar mayur-jp avatar michaelsharpe avatar mitchellgordon95 avatar miteshodaan avatar nickwalton avatar parixitas avatar pgull avatar rakeshghasadiya avatar seang avatar snyk-bot avatar socketteer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

thoth's Issues

Playtest not re-processing nodes and running on latest graph until second entry

Currently, playtest tests the last state of the graph.

To test: Make a new graph with a hello world. Try playtest, should return nothing. Try playtest again, should return input.

This was probably always a bug, actually, but we didn't notice because process graph was being called on every action. As we are not processing every action, we'll need to call the process graph before playtesting.

super-reality#44

"Event" view for entities for debugging events / clearing and editing conversation

We are storing conversation, facts etc in the events table, keyed by entity. We'd like to be able to view all events in the table, filter by entity, filter by who the entity is speaking two, and sort by date. We want to be able to CRUD individual entries into the event table so we can manipulate, test and debug conversation etc.

Refactor wikipedia entries to be stored as events and remove table

We don't want a whole table for a feature that is not first class. We want to remove the wikipedia model and instead use the events model to store the JSON for individual wikipedia entries. This way it can be used in event memory easily. If eventtype is wikipedia, main event data is the wikipedia response json, and we use one of the other fields to key the name of the wikipedia article so it's easy to find later... something like that...

Handle entity runner diffs cleanly

Right now whenever anything changes (entity is marked dirty) we are attempting to destroy the entity and rebuild it... this is not happening cleanly though.

If the exact spell used by the entity is changed, we should destroy the old instance, create a new instance and attach it to the client. Ideally we don't need to destroy the client, but that might be easier. In either case we need to make sure that we aren't leaking memory or holding on to old references.

If the API key etc is changed, we'll need to completely destroy and restart that client. We want to keep the entity itself alive, but, for example, if we update Discord, we should destroy discord client and restart.

These services are meant to be long-running, so we should make sure they are starting and destroying properly and be meticulous about this.

super-reality#57

Create "agent" socket type to handle full agent data from clients like discord, etc

Right now we are using a purpose-built "Input Desctructure" component to get data from the agent and break it up without needing to define a lot of inputs per graph. This is not ideal. Since we end up using all of the agent data in lots of places, it makes out graph have a lot more sockets and nodes. We want to define a new agent type that passes all of this data in a single socket.

The agent destructure can still existing, and should have a corresponding restructure component even, but it should accept a specific socket type.

We might think about templating these nodes so a single structure / destructure can have a dropdown of template i/o or a custom option

Key all spells and deployed spells to user ID

Right now, in our server we are searching for spells without keying by user, and so every user can see every spell.

We want every user to only be able to see and interact with our own spells. However, in local development, we will need to figure out how to have this make sense with our login system.

Ideally for local development we will just use the user ID 0, for example, so we don't need to worry about the login system, but we should connect with @michaelsharpe on the best strategy for this.,

Config API for Admin Console

Request Data Structure:

payload: [
  {
    client: 'Discord',
    name: 'discord_api_token',
    type: 'string',
    defaultValue: '',
  },
  {
    client: 'twitter',
    name: 'twitterConsumerKey',
    type: 'string',
    defaultValue: '',
  },
]

client value can be removed (?)

Add auth handling flow for server

Right now, running spells requires no authentication on the server... okay, that's not good!

We can see that we are using "noAuth" in /server/src/routes/spells/index.ts

We should figure out a proper strategy that is congruous with the Latitude API, or we should think of how Thoth manages it's own needs but can contact external providers for user auth (in which case we provide a default anything-goes provider service to mock Latitude API) along with Latitude model services.

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.