How abdullahsmatrix/call_me_maybe works
call_me_maybe is a CLI that turns natural-language prompts and function definitions into structured function-call JSON. Its main workflow loads and validates those inputs, prepares a model vocabulary, then processes each prompt through an orchestrator that selects a function and fills its parameters. Constrained decoding uses grammars to restrict generated tokens; strings are usually selected from prompt spans. Results are serialized to JSON. The README documents these behaviors; unsampled implementation details are not expanded beyond that evidence.
Main entry points: __main__.py Run prompts · json_loader.py JSON file I/O · orchestrator.py Call orchestration · decoder.py Constrained decoding
Components 15
CLI workflow
- Argument parsing
src/arguement_parser.py - Run prompts
src/__main__.py
Input and output
- Function definitions
data/input/functions_definition.json - Prompt input
data/input/function_calling_tests.json - JSON file I/O
src/json_loader.py - Schema validation
src/validation_models.py - Input validation
src/json_parser.py - Call results
data/output/function_calling_results.json
Constrained generation
- Call orchestration
src/orchestrator.py - Constrained decoding
src/decoder.py - Value grammars
src/grammar.py
Model preparation
- Qwen model
- Vocabulary builder
src/vocab.py - Vocabulary cache
data/cache/cache.json
Other components
- CLI user
Connections 18
- CLI user → Argument parsing: supplies paths
- Argument parsing → Run prompts: provides options
src/__main__.py - Run prompts → JSON file I/O: loads inputs
src/__main__.py - Function definitions → JSON file I/O: read by
- Prompt input → JSON file I/O: read by
- Run prompts → Input validation: validates inputs
src/__main__.py - Input validation → Schema validation: validates against
src/json_parser.py - Run prompts → Qwen model: initializes
src/__main__.py - Run prompts → Vocabulary builder: loads vocabulary
src/__main__.py - Vocabulary builder → Qwen model: reads tokenizer vocab
src/vocab.py - Vocabulary builder → Vocabulary cache: reads or writes
src/vocab.py - Run prompts → Call orchestration: processes prompts
src/__main__.py - Call orchestration → Constrained decoding: generates values
src/orchestrator.py - Constrained decoding → Value grammars: queries legal tokens
src/decoder.py - Constrained decoding → Qwen model: gets logits
src/decoder.py - Call orchestration → Qwen model: encodes and scores
src/orchestrator.py - Run prompts → JSON file I/O: writes results
src/__main__.py - JSON file I/O → Call results: serializes calls
src/json_loader.py