Skip to content

Repository files navigation

Multi-Mode Router CLI

Python CLI that routes a raw user message to the right structured Gemini pipeline.

The program first asks Gemini to classify the input into one of several modes, validates the routing decision with Pydantic, then calls the matching structured output pipeline.

Flow

raw text
→ Gemini router
→ RouteDecision validation
→ pipeline registry lookup
→ model + prompt selection
→ Gemini structured output
→ Pydantic validation
→ display result

Supported routes

task_extraction
job_offer_analysis
recipe_generation
unknown

If the router returns unknown, low confidence, or requires clarification, the program stops before calling the business pipeline.

Project structure

multi-mode-router-cli/
  main.py
  config.py
  models.py
  llm_client.py
  prompts.py
  router.py
  pipeline.py
  registry.py
  display.py
  samples/

Run

python main.py samples/task_message.txt
python main.py samples/job_offer.txt
python main.py samples/recipe_request.txt
python main.py samples/ambiguous.txt

Models

The project uses Pydantic models as contracts:

RouteDecision
TaskExtraction
JobOfferAnalysis
Recipe

Each Gemini response is validated before being used by the program.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages