datacrystals / AIStoryWriter

LLM story writer with a focus on high-quality long output based on a user provided prompt.
GNU Affero General Public License v3.0
47 stars 10 forks source link
ai command-line-tool llm llms local-llama local-llm python story-generator storywriting

AI Story Generator πŸ“šβœ¨

Generate full-length novels with AI! Harness the power of large language models to create engaging stories based on your prompts.

Discord

πŸš€ Features

🏁 Quick Start

Getting started with AI Story Generator is easy:

  1. Clone the repository
  2. Install Ollama for local model support
  3. Run the generator:
./Write.py -Prompt Prompts/YourChosenPrompt.txt

That's it! The system will automatically download any required models and start generating your story.

Optional steps:

πŸ’» Hardware Recommendations

Not sure which models to use with your GPU? Check out our Model Recommendations page for suggestions based on different GPU capabilities. We provide a quick reference table to help you choose the right models for your hardware, ensuring optimal performance and quality for your story generation projects.

πŸ› οΈ Usage

You can customize the models used for different parts of the story generation process in two ways:

1. Using Command-Line Arguments (Recommended)

You can override the default models by specifying them as command-line arguments:

./Write.py -Prompt Prompts/YourChosenPrompt.txt -InitialOutlineModel "ollama://llama3:70b" ...

Available command-line arguments are stated in the Write.py file.

The model format is: {ModelProvider}://{ModelName}@{ModelHost}?parameter=value

Example:

./Write.py -Prompt Prompts/YourChosenPrompt.txt -InitialOutlineModel "google://gemini-1.5-pro" -ChapterOutlineModel "ollama://llama3:70b@192.168.1.100:11434" ...

This flexibility allows you to experiment with different models for various parts of the story generation process, helping you find the optimal combination for your needs.

NOTE: If you're using a provider that needs an API key, please copy .env.example to .env and paste in your API keys there.

2. Using Writer/Config.py

Edit the Writer/Config.py file to change the default models:

INITIAL_OUTLINE_WRITER_MODEL = "ollama://llama3:70b"
CHAPTER_OUTLINE_WRITER_MODEL = "ollama://gemma2:27b"
CHAPTER_WRITER_MODEL = "google://gemini-1.5-flash"
...

🧰 Architecture Overview

Block Diagram

πŸ› οΈ Customization

πŸ’ͺ What's Working Well

πŸ”§ Areas for Improvement

🀝 Contributing

We're excited to hear from you! Your feedback and contributions are crucial to improving the AI Story Generator. Here's how you can get involved:

  1. πŸ› Open Issues: Encountered a bug or have a feature request? Open an issue and let us know!

  2. πŸ’‘ Start Discussions: Have ideas or want to brainstorm? Start a discussion in our GitHub Discussions forum.

  3. πŸ”¬ Experiment and Share: Try different model combinations and share your results. Your experiments can help improve the system for everyone!

  4. πŸ–ŠοΈ Submit Pull Requests: Ready to contribute code? We welcome pull requests for improvements and new features.

  5. πŸ’¬ Join our Discord: For real-time chat, support, and community engagement, join our Discord server.

Don't hesitate to reach out – your input is valuable, and we're here to help!

πŸ“„ License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). This means that if you modify the code and use it to provide a service over a network, you must make your modified source code available to the users of that service. For more details, see the LICENSE file in the repository or visit https://www.gnu.org/licenses/agpl-3.0.en.html.


Join us in shaping the future of AI-assisted storytelling! πŸ–‹οΈπŸ€–