Function-calling code for LLMs, demoing financial queries
Top 37.5% on sourcepulse
This repository provides code for the NousResearch Hermes-2 Pro LLM to perform function calling and generate structured JSON outputs, targeting developers and researchers who need to integrate LLM capabilities with external tools and data. It enables querying financial data and creating structured representations of information.
How It Works
The project leverages the Hermes-2 Pro model, specifically fine-tuned for function calling and structured output generation using the ChatML format. It processes user queries, identifies relevant functions (defined in functions.py
and extensible with custom tools), and generates tool calls in a specified format. The output can be either a direct function call or a JSON object adhering to a provided Pydantic schema, facilitating programmatic interaction with the LLM.
Quick Start & Requirements
pip install -r requirements.txt
python functioncall.py --query "..."
python jsonmode.py --query "..."
--model_path
, --load_in_4bit
yfinance
library for default functions.Highlighted Details
yfinance
library for financial data.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
10 months ago
1 week