Skip to content

Implement Workflow and LLM Configuration #171

@Haydart

Description

@Haydart

Task 009: Implement Workflow and LLM Configuration

Description

Create TrendDetectionWorkflow that wires TokenLaunchSource → TrendDetectionProcessor → TrendFirebaseExecutor, and create trend_llm.yaml configuration.

Acceptance Criteria

  • Create TrendDetectionWorkflow in src/workflows/
  • Wire TrendDetectionSource (custom source with Firestore watch)
  • Wire TrendDetectionProcessor
  • Wire TrendFirebaseExecutor
  • Implement event loop: TrendDetectionEvent → process → execute
  • Create src/res/config/trend_llm.yaml configuration file
  • Configure text_model_name: claude-3-haiku (classification)
  • Configure multimodal_model_name: claude-3.5-sonnet (creation)
  • Set text_temperature: 0.1, multimodal_temperature: 0.3
  • Define fallback models for both text and multimodal
  • Add environment variable defaults (TREND_CACHE_TTL_SECONDS=300, TREND_PROMOTION_THRESHOLD=5)

Technical Details

  • Workflow location: src/workflows/trend_detection_workflow.py
  • Config location: src/res/config/trend_llm.yaml
  • Use TrendDetectionSource (wraps TokenLaunchSource + Firestore watch)
  • Event flow: TrendDetectionEvent (enriched) → processor.process() → executor.execute(action)
  • LLM config format matches existing litellm.yaml structure
  • Text model: fast/cheap for classification (90% of cases)
  • Multimodal model: expensive for creation (10% of cases)

CRITICAL: Workflow instantiates TrendDetectionSource with:

  • websocket_source = TokenLaunchSource() (existing)
  • firebase_service = SimpleFirebaseService() (existing)

This gives the workflow real-time trend updates with zero additional infrastructure.

Effort Estimate

  • Size: M
  • Hours: 6-8
  • Parallel: false (depends on Tasks 003, 007, 008 - UPDATED)

Metadata

Metadata

Assignees

No one assigned

    Labels

    epic:trendsTrend Detection System EpictaskImplementation task

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions