Skip to content

About

An online encyclopedia, with its articles generated by LLMs.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

Cognipedia

An online encyclopedia, with its articles generated by LLMs. You may even say that this is the true open source Grokipedia.

Self-hosting

Prerequisites

  • Bun 1.3.x+
  • OpenRouter API key
  • Tavily API key (can someone provide a fully free and good search engine for the agent?)
  • PostgreSQL database

Clone the repository

git clone https://github.com/frolleks/cognipedia && cd cognipedia

Install dependencies

bun i

Copy .env.example files

cp ./article-creator-agent/.env.example ./article-creator-agent/.env
cp ./app/.env.example ./app/.env

Then fill in the environment variables with their values respectively.

For the article-creator-agent, you can customize which LLM to use to whatever that's available in OpenRouter.

Migrate to the database

cd app && bun run db:generate

For some reason, drizzle-kit doesn't generate SQL for the enums, so you must add it manually to the migration file:

-- in app/drizzle/0000_xxx.sql
CREATE TYPE article_status AS ENUM ('draft', 'review', 'published', 'archived');

Then migrate to the database:

bun run db:migrate && cd ..

Generate articles

Using the article-creator-agent, you can generate articles by running:

bun run ./article-creator-agent/index.ts "any topic you'd want to generate an article on"

You can do this operation multiple times.

After that, you can ingest the articles to the database:

cd app && bun run ingest:dump

License

The code that runs Cognipedia is licensed under GPL-3.0, while the articles... I'm not really sure.

About

An online encyclopedia, with its articles generated by LLMs.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages