How dcheng093/call-me-maybe works
Call Me Maybe turns natural-language prompts and function definitions into schema-constrained JSON function calls using local model inference. The main workflow loads inputs, simplifies schemas, generates tokens under grammar-based filtering, validates each parsed call, and writes successful results. The README documents these capabilities; the graph follows sampled source for their wiring, and leaves out uncertain implementation details.
Main entry points: __main__.py CLI orchestrator · __init__.py Local model SDK · tokenizer.py Token filter · grammar.py JSON rulebook
Components 11
Inputs and schema
- Function definitions
data/input/functions_definition.json - Prompt dataset
data/input/function_calling_tests.json - Schema parser
src/parser.py
Constrained generation
- CLI orchestrator
src/__main__.py - JSON rulebook
src/grammar.py - Token filter
src/tokenizer.py
Local inference
- Local model SDK
llm_sdk/llm_sdk/llm_sdk/__init__.py
Validation and results
- Result validator
src/validator.py - Results JSON
Other components
- CLI user
- Hugging Face Hub
Connections 14
- CLI user → CLI orchestrator: runs CLI
- CLI orchestrator → Function definitions: loads definitions
- CLI orchestrator → Prompt dataset: loads prompts
- CLI orchestrator → Schema parser: parses schemas
- CLI orchestrator → Local model SDK: loads model
- Local model SDK → Hugging Face Hub: downloads model files
- CLI orchestrator → Local model SDK: encodes prompt
- CLI orchestrator → Local model SDK: requests logits
- CLI orchestrator → Token filter: loads vocabulary
- CLI orchestrator → JSON rulebook: creates and advances
- CLI orchestrator → Token filter: filters token IDs
- Token filter → JSON rulebook: tests token legality
- CLI orchestrator → Result validator: validates parsed call
- CLI orchestrator → Results JSON: writes results