MemoGen is an advanced application that allows users to generate high-quality memos of various types through a fully automated process. Utilizing state-of-the-art AI-driven components, MemoGen handles the writing, outlining, and reviewing of memos. The final output is a detailed and well-structured document in DOCX format.
- Automated Memo Creation: Generates memos with minimal user input.
- Multi-Agent Review System: Ensures quality through multiple AI reviewers.
- Supports Various Memo Types: Accounting, Financial, Technical, Policy, and more.
- DOCX Output: Final document is saved in a widely used format.
- Self-Reflection: Built-in quality control mechanisms for continuous improvement.
- MIT Licensed: Open and accessible for modification.
MemoGen uses a combination of language models and AI-driven review agents to produce high-quality memos. Here's an overview of the process:
- User Input: The user provides the topic, audience, and type of memo.
- Outline Creation: An outline for the memo is generated based on the provided inputs.
- Section Writing: Each section of the memo is written with the help of multiple AI agents.
- Review and Reflection: The content goes through a review process by different reviewers, ensuring the final output is polished and accurate.
- Document Compilation: The individual sections are combined into a final DOCX document, ready for download.
When you start MemoGen, you will be prompted with three questions:
-
Enter the topic for the memo:
- In this question, it's worthwhile to input a long, context-rich topic. Several lines or even paragraphs of detailed information will help the AI generate an accurate memo.
-
Enter the audience for the memo:
- Here, you can be concise but descriptive. Providing specific details about the audience will help tailor the memo appropriately.
-
Enter the type of memo:
- A single word or a few words describing the type of memo (e.g., "Accounting", "Technical") is sufficient.
After providing the necessary inputs, press Enter. Once the process is complete, your long-form memo will be available in ./src/result/result.docx
. This document is your final memo in DOCX format.
-
install and run
Docker
if it's not already there on startup by following these instructions -
add your user to the
Docker
user group by running this command :- on Windows :
net localgroup docker-users "your-user-id" /ADD
your-user-id is your local Windows user name. You can determine this by looking at the folder name under C:\Users\ .
- on Linux :
- on Windows :
you'll need to install Poetry. Poetry is a tool for dependency management and packaging in Python. It ensures that you have a consistent environment across different setups.
-
Using the Official Installer:
Open your terminal and run the following command:
- On Windows :
curl -sSL https://install.python-poetry.org | python -
- On MacOS/Linux :
curl -sSL https://install.python-poetry.org | python3 -
-
Clone the Repository
Clone the repository to a local machine:
git clone https://github.com/Josephrp/memogen cd memogen
-
Set your OpenAI API Key
currently we're providing two ways to plug in your llm:
Using Open AI :
- edit the ./src/config/config.py
file using a text editor and replace your api_key_here with your api key (keep the quotes!)
llm_config = {"model": "gpt-4o",
"api_key": "your_api_key_here",
"max_tokens": 4000 , # change this according to your needs
"temperature": 0.7, #change this according to your needs
}
Using Azure:
- edit the ./src/OAI_CONFIG_LIST.json.example
file using a text editor and save it as OAI_CONFIG_LIST.json
(without the .example
at the end !)
llm_config = {
"model": "your_deployment_name_here", # mine is "tonicgpt"
"api_key": "your_api_key_here",
"base_url": "your_endpoint_url_here", # https://eastus2.api.cognitive.microsoft.com/
"api_type": "azure",
"api_version": "your_api_version_here", # eg "2024-02-01" for gpt-4o
"max_tokens": 1800 ,# change this according to your needs
"temperature": 0.7, #change this according to your needs
}
In both cases:
- make sure you "comment out" the method you are not using in ./src/config/config.py
!
-
Install and Run
-
On the command line :
poetry install
-
-
Run Chroma Open a new terminal and run this command to start chroma :
chroma run --path ./src/chromadb
-
Run Memogen
poetry run python main.py
If you encounter any issues during installation, refer to the Poetry documentation for detailed guidance and troubleshooting tips.
-
Adding Poetry to Your Path:
You might need to add Poetry to your PATH. The installation script should provide instructions on how to do this. Typically, you might need to add the following line to your shell configuration file (e.g.,
.bashrc
,.zshrc
):export PATH="$HOME/.local/bin:$PATH"
After adding the above line, reload your shell configuration:
source ~/.bashrc # or `source ~/.zshrc` depending on your shell
Thank you for considering contributing to MemoGen! We welcome all types of contributions, whether it's bug reports, feature suggestions, or code improvements.
- Fork the Repository:
- Navigate to our GitLab repository: MemoGen on GitLab.
- Click on the "Fork" button to create your own copy of the repository.
- Please read the CONTRIBUTING.md and our our CODE_OF_CONDUCT.md and the process for submitting pull/merge requests.
memogen/
├── src/
│ ├── agents_writer.py
│ ├── config/
│ │ └── llm_config.py
│ ├── main.py
│ ├── prompts.py
│ ├── result/
│ │ └── intermediate_results/
│ ├── utils.py
└── requirements.txt
We would like to acknowledge the use of the following tools and libraries:
We invite all contributors to join our builder's community on Discord! It's a great place to introduce yourself, share what you're working on, and get involved in exciting new projects. Whether you're a seasoned developer or just starting out, our community is here to help.
- Discord Link: Join our Discord Community
This project is licensed under the MIT License - see the LICENSE.md file for details.
By using MemoGen, you agree to the terms specified in the MIT License. Enjoy your automated memo creation experience!