Skip to content

Commit

Permalink
feat: Updated contributing docs (#653)
Browse files Browse the repository at this point in the history
* reorganized + revised landing

* more docs

* added pic

* updated contributing

* diff

* move asset links

* hard links
  • Loading branch information
cpacker authored Dec 19, 2023
1 parent c029008 commit a344988
Show file tree
Hide file tree
Showing 7 changed files with 172 additions and 59 deletions.
2 changes: 1 addition & 1 deletion docs/adding_wrappers.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Adding support for new LLMs
excerpt: Adding new LLMs via model wrappers
category: 6580dabb585483000f0e6c7c
category: 6580da9a40bb410016b8b0c3
---

> ⚠️ MemGPT + local LLM failure cases
Expand Down
Binary file added docs/assets/llama_library.webp
Binary file not shown.
63 changes: 14 additions & 49 deletions docs/contributing.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,25 @@
---
title: Contributing to the codebase
excerpt: How to contribute to the MemGPT repo
category: 6580dabb585483000f0e6c7c
title: How to contribute
excerpt: Learn how to contribute to the MemGPT project!
category: 6581eaa89a00e6001012822c
---

## Installing from source
![memgpt llama](https://raw.githubusercontent.com/cpacker/MemGPT/main/docs/assets/llama_library.webp)

To install MemGPT from source, start by cloning the repo:
```sh
git clone git@github.com:cpacker/MemGPT.git
```
MemGPT is an active [open source](https://en.wikipedia.org/wiki/Open_source) project and we welcome community contributions! There are many ways to contribute for both programmers and non-programmers alike.

### Installing dependencies with poetry (recommended)
> 📘 Discord contributor role
>
> Contributing to the codebase gets you a **contributor role** on [Discord](https://discord.gg/9GEQrxmVyE). If you're a contributor and we forgot to assign you the role, message the MemGPT team [on Discord](https://discord.gg/9GEQrxmVyE)!
First, install Poetry using [the official instructions here](https://python-poetry.org/docs/#installation).
## 👋 Community issues (requested contributions)

Once Poetry is installed, navigate to the MemGPT directory and install the MemGPT project with Poetry:
```shell
cd MemGPT
poetry shell
poetry install -E dev -E postgres -E local
```
If you're looking for a place to get started, you can see a list of potential contributions that the MemGPT team has marked as "help wanted" [on this GitHub page](https://github.com/cpacker/MemGPT/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22).

Now when you want to use `memgpt`, make sure you first activate the `poetry` environment using poetry shell:
```shell
$ poetry shell
(pymemgpt-py3.10) $ memgpt run
```
## 📖 Editing the MemGPT docs

Alternatively, you can use `poetry run` (which will activate the `poetry` environment for the `memgpt run` command only):
```shell
poetry run memgpt run
```
We're always looking to improve our docs (like the page you're reading right now!). Proposing edits to the docs is easy and can even be done without ever having to set up the source code - [check our guide for instructions](contributing_docs).

### Installing dependencies with pip
## 🦙 Editing the MemGPT source code

First you should set up a dedicated virtual environment. This is optional, but is highly recommended:
```shell
cd MemGPT
python3 -m venv venv
. venv/bin/activate
```

Once you've activated your virtual environment and are in the MemGPT project directory, you can install the dependencies with `pip`:
```shell
pip install -e '.[dev,postgres,local]'
```

Now, you should be able to run `memgpt` from the command-line using the downloaded source code (if you used a virtual environment, you have to activate the virtual environment to access `memgpt`):
```shell
$ . venv/bin/activate
(venv) $ memgpt run
```

If you are having dependency issues using `pip`, we recommend you install the package using Poetry. Installing MemGPT from source using Poetry will ensure that you are using exact package versions that have been tested for the production build.

## Contributing to the MemGPT project

We welcome pull requests! Please see [our contributing guide](https://github.com/cpacker/MemGPT/blob/main/CONTRIBUTING.md) for instructions on how to contribute to the project.
If you're interested in editing the MemGPT source code, [check our guide on building and contributing from source](contributing_code).
68 changes: 68 additions & 0 deletions docs/contributing_code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
title: Contributing to the codebase
excerpt: How to modify code and create pull requests
category: 6581eaa89a00e6001012822c
---

If you plan on making big changes to the codebase, the easiest way to make contributions is to install MemGPT directly from the source code (instead of via `pypi`, which you do with `pip install ...`).

Once you have a working copy of the source code, you should be able to modify the MemGPT codebase an immediately see any changes you make to the codebase change the way the `memgpt` command works! Then once you make a change you're happy with, you can open a pull request to get your changes merged into the official MemGPT package.

> 📘 Instructions on installing from a fork and opening pull requests
>
> If you plan on contributing your changes, you should create a fork of the MemGPT repo and install the source code from your fork.
>
> Please see [our contributing guide](https://github.com/cpacker/MemGPT/blob/main/CONTRIBUTING.md) for instructions on how to install from a fork and open a PR.
## Installing MemGPT from source

**Reminder**: if you plan on opening a pull request to contribute your changes, follow our [contributing guide's install instructions](https://github.com/cpacker/MemGPT/blob/main/CONTRIBUTING.md) instead!

To install MemGPT from source, start by cloning the repo:
```sh
git clone git@github.com:cpacker/MemGPT.git
```

### Installing dependencies with poetry (recommended)

First, install Poetry using [the official instructions here](https://python-poetry.org/docs/#installation).

Once Poetry is installed, navigate to the MemGPT directory and install the MemGPT project with Poetry:
```shell
cd MemGPT
poetry shell
poetry install -E dev -E postgres -E local
```

Now when you want to use `memgpt`, make sure you first activate the `poetry` environment using poetry shell:
```shell
$ poetry shell
(pymemgpt-py3.10) $ memgpt run
```

Alternatively, you can use `poetry run` (which will activate the `poetry` environment for the `memgpt run` command only):
```shell
poetry run memgpt run
```

### Installing dependencies with pip

First you should set up a dedicated virtual environment. This is optional, but is highly recommended:
```shell
cd MemGPT
python3 -m venv venv
. venv/bin/activate
```

Once you've activated your virtual environment and are in the MemGPT project directory, you can install the dependencies with `pip`:
```shell
pip install -e '.[dev,postgres,local]'
```

Now, you should be able to run `memgpt` from the command-line using the downloaded source code (if you used a virtual environment, you have to activate the virtual environment to access `memgpt`):
```shell
$ . venv/bin/activate
(venv) $ memgpt run
```

If you are having dependency issues using `pip`, we recommend you install the package using Poetry. Installing MemGPT from source using Poetry will ensure that you are using exact package versions that have been tested for the production build.
28 changes: 28 additions & 0 deletions docs/contributing_docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: Contributing to the documentation
excerpt: How to add to the MemGPT documentation
category: 6581eaa89a00e6001012822c
---

There are two ways to propose edits to the MemGPT documentation: editing the documentation files directly in the GitHub file editor (on the GitHub website), or cloning the source code and editing the documentation files (in your text/markdown editor of chocie).

# Editing directly via GitHub

> 📘 Requires a GitHub account
>
> Before beginning, make sure you have an account on [github.com](https://github.com) and are logged in.
The easiest way to edit the docs is directly via the GitHub website:

1. Open the documentation section of the MemGPT source code on GitHub: https://github.com/cpacker/MemGPT/tree/main/docs
2. Find the file you want to edit using the name on the docs page - for example, if you wanted to edit `https://memgpt.readme.io/docs/contributing_docs`, you would look for the `contributing_docs.md` on [GitHub](https://github.com/cpacker/MemGPT/tree/main/docs)
3. Click on the file, then click the edit icon on the top right (the edit icon is a pencil and will say "Edit this file" when you hover over it)
4. If you haven't made a fork of the repository yet, you'll see a notice "You need to fork this repository to propose changes" - click "Fork this repository" and you should immediately be put in a file editor view that says "You’re making changes in a project you don’t have write access to"
5. Make your edits to the file, then click "Commit changes", then click "Propose changes"
6. Confirm that your edits look good, then click "Create pull request" to go to the PR creation screen
7. Add the necessary details describing the changes you've made, then click "Create pull request"
8. ✅ That's it! A MemGPT team member will then review your PR and if it looks good merge it into the main branch, at which point you'll see the changes updated on the docs page!

# Editing via the source code

Editing documentation via the source code follows the same process as general source code editing - forking the repository, cloning your fork, editing a branch of your fork, and opening a PR from your fork to the main repo. See our [source code editing guide](contributing_code) for more details.
68 changes: 60 additions & 8 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,76 @@ excerpt: Welcome to the MemGPT documentation!
category: 6580d34ee5e4d00068bf2a1d
---

![memgpt llama](https://raw.githubusercontent.com/cpacker/MemGPT/migrate-docs/docs/assets/cozy_llama.webp)
<style>
.button {
display: block;
width: auto;
padding: 15px 25px;
margin: 10px 0;
color: white;
text-align: left;
text-decoration: none !important; /* Enforce no underline */
border-radius: 5px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transition: transform 0.2s ease;
font-size: 18px;
font-weight: bold;
}

.emoji {
margin-right: 8px; /* Adjust space between emoji and text */
}

.button:hover {
transform: translateY(-2px);
}

/* Define individual colors for each button */
.green { background: linear-gradient(to right, #78e08f, #38ada9); }
.blue { background: linear-gradient(to right, #4bcffa, #4d73e5); }
.purple { background: linear-gradient(to right, #8e44ad, #9b59b6); }
.orange { background: linear-gradient(to right, #f6b93b, #e55039); }

.container {
width: 100%;
max-width: 600px;
margin-left: 0;
margin-right: 0;
}
</style>

![memgpt llama](https://raw.githubusercontent.com/cpacker/MemGPT/main/docs/assets/cozy_llama.webp)

## What is MemGPT?

MemGPT enables LLMs to manage their own memory and overcome limited context windows!

You can use MemGPT to:

* create perpetual chatbots that learn about you and change their own personalities over time
* create perpetual chatbots that can read (and write to!) large data stores
- create perpetual chatbots that learn about you and change their own personalities over time
- create perpetual chatbots that can read (and write to!) large data stores

You can read more about the research behind MemGPT at [https://memgpt.ai](https://memgpt.ai).
MemGPT is an open source project under active development. If you'd like to help make MemGPT even better, come chat with the community on [Discord](https://discord.gg/9GEQrxmVyE) and on [GitHub](https://github.com/cpacker/MemGPT). You can read more about the research behind MemGPT at <https://memgpt.ai>.

## Getting started

* [Chat with the MemGPT Discord bot](./discord_bot)
* [Run MemGPT locally on your own computer](./quickstart)
<div class="container">
<a href="https://memgpt.readme.io/docs/discord_bot" class="button green">
<span class="emoji">💬</span> Chat with the MemGPT Discord bot!
</a>
<a href="https://memgpt.readme.io/docs/quickstart" class="button blue">
<span class="emoji">🖥️</span> Run MemGPT locally on your own computer
</a>
</div>

## Join the community

## Join the community!
<div class="container">
<a href="https://discord.gg/9GEQrxmVyE" class="button purple">
<span class="emoji">👋</span> Join the MemGPT community on Discord!
</a>

MemGPT is an open source project under active development. If you'd like to help make MemGPT even better, you can come chat with the community on [our Discord server](https://discord.gg/9GEQrxmVyE) or on our [GitHub](https://github.com/cpacker/MemGPT).
<a href="https://memgpt.readme.io/docs/contributing" class="button orange">
<span class="emoji">❤️</span> Learn how to contribute to the MemGPT project!
</a>
</div>
2 changes: 1 addition & 1 deletion docs/storage.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Configuring storage backends
excerpt: Customizing the MemGPT storage backend
category: 6580dabb585483000f0e6c7c
category: 6580d34ee5e4d00068bf2a1d
---

> ⚠️ Switching storage backends
Expand Down

0 comments on commit a344988

Please sign in to comment.