Skip to content

Latest commit

 

History

History
108 lines (84 loc) · 2.93 KB

CUSTOMIZATION.md

File metadata and controls

108 lines (84 loc) · 2.93 KB

STORM and Co-STORM Customization Documentation

Overview

This document outlines the customizations and configurations made to the STORM and Co-STORM implementation. These changes enable both systems to run independently while maintaining their core functionality.

Directory Structure

storm/
├── logs/
│   ├── storm.log      # Logging for STORM
│   └── costorm.log    # Logging for Co-STORM
├── output/            # Generated articles directory
├── run_storm.py       # STORM runner script
├── run_costorm.py     # Co-STORM runner script
└── config.toml        # Shared configuration file

Configuration (config.toml)

The configuration file has been organized to support both STORM and Co-STORM modes:

[openai]
api_key = "your-api-key"
api_type = "azure"  # or "openai"

[you]
api_key = "your-you-api-key"

[models]
conv_simulator = "gpt-4o-mini"
question_asker = "gpt-4o-mini"
outline_gen = "gpt-4o-mini"
article_gen = "gpt-4o-mini"
article_polish = "gpt-4o-mini"

[generation]
temperature = 0.7
top_p = 0.9

[retrieval]
search_top_k = 3

[co_storm]
total_conv_turn = 5
max_search_queries_per_turn = 3
max_num_round_table_experts = 3
warmstart_max_num_experts = 3
warmstart_max_turn_per_experts = 3
disable_moderator = false
disable_multi_experts = false
rag_only_baseline_mode = false

[encoder]
api_type = "openai"  # Can be "openai", "azure", or "together"
model = "text-embedding-3-small"

[logging]
level = "DEBUG"

Key Customizations

1. Separate Logging

  • STORM logs are written to logs/storm.log
  • Co-STORM logs are written to logs/costorm.log
  • Both use the same logging level configured in config.toml

2. Output Directory

  • All generated articles are saved to the output/ directory
  • Files are organized by their provided output names

3. Script Separation

  • run_storm.py: Handles original STORM functionality
  • run_costorm.py: Implements Co-STORM specific features

4. Environment Variables

Both scripts set necessary environment variables from the config file:

  • OpenAI API configuration
  • You.com API key
  • Encoder configuration

Usage

Running STORM

cmd /c C:\Users\%USERNAME%\miniconda3\Scripts\activate.bat storm && python run_storm.py Your_Topic --output output.md

Running Co-STORM

cmd /c C:\Users\%USERNAME%\miniconda3\Scripts\activate.bat storm && python run_costorm.py Your_Topic --output output.md

Implementation Notes

  1. Logging Wrapper

    • STORM uses a basic logging configuration
    • Co-STORM uses both basic logging and the advanced LoggingWrapper for LM interactions
  2. File Output

    • Both scripts automatically create the output directory if it doesn't exist
    • Files are saved with UTF-8 encoding
  3. Configuration Loading

    • Both scripts share the same configuration file but use different sections
    • Environment variables are set based on the loaded configuration

Last Updated: 2025-01-06