How mcherukara/calms works
Project type and purpose
• CALMS is a retrieval- and tool-augmented large language model application tailored for scientific workflows.
• It consists of a backend Python service (chat_app.py + llms.py + utility modules) exposing a web‐based UI for interactive chat, a document ingestion pipeline (web_scraper → DOC_STORE), and integration with external APIs (OpenAI, Materials Project).
File structure
• Top-level code:
• chat_app.py – main web service / UI entrypoint
• llms.py – wrappers for OpenAI or HuggingFace LLM calls
• dfrac_tools.py, params.py – tool-support, configuration
• tokenizer/… – local tokenizer resources for HF models
• Data layer:
• DOC_STORE/… – raw text files organized by source, pre-computed embedding store
• Ingestion pipeline:
• web_scraper/… – scripts to scrape and populate DOC_STORE
• Auxiliary code:
• ops_demo/… – demo utilities
• dev_tests_and_results/… – testing and experiments
• Config & dependencies:
• requirements_H100.txt, requirements.txt – Python packages
• LICENSE, README.md
README for additional insights
• CALMS supports two operation modes:
• --openai: calls OpenAI endpoints (requires API key)
• --hf: runs open-source models (Vicuna, requires GPU)
• First-run requires embedding computation over DOC_STORE (init_docs in params.py).
• UI exposed via HTTP on configurable ports.