Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
| Date | Stars |
|---|---|
| 2026-07-31 | 1430 |
| 2026-08-02 | 1433 |
| 2026-08-06 | 1433 |
| 2026-08-12 | 1439 |
| 2026-08-18 | 1448 |
| 2026-08-19 | 1450 |
| 2026-08-20 | 1451 |
| 2026-08-21 | 1451 |
| 2026-08-22 | 1453 |
| 2026-08-23 | 1454 |
| 2026-08-24 | 1454 |
| 2026-08-26 | 1457 |
| 2026-08-27 | 1459 |
| 2026-08-29 | 1461 |
| 2026-08-30 | 1462 |
| 2026-08-31 | 1461 |
| 2026-09-01 | 1463 |
| 2026-09-02 | 1464 |
| 2026-09-04 | 1466 |
| 2026-09-07 | 1468 |
| 2026-09-08 | 1467 |
| 2026-09-09 | 1468 |
| 2026-09-11 | 1470 |
| 2026-09-13 | 1471 |
| 2026-09-15 | 1472 |
| 2026-09-18 | 1472 |
| 2026-09-19 | 1471 |
| 2026-09-20 | 1473 |
Today
+2 stars today
This week
+2 stars this week
This month
+22 stars this month
Momentum
0.0
growth rate 0.14%/day
# Hermes-Function-Calling
This repository contains code for the Hermes Pro Large Language Model to perform function calling based on the provided schema. It allows users to query the model and retrieve information related to stock prices, company fundamentals, financial statements, and more.
## Installation
To install the required packages, run the following command:
```bash
pip install -r requirements.txt
```
## Usage
### Function calling
To run the function call inference with a query, use the following command:
```bash
python functioncall.py --query "I need the current stock price of Tesla (TSLA)"
```
### Json mode
To run the json mode inference with a query, use the following command:
```bash
python jsonmode.py --query "Please return a json object to represent Goku from the anime Dragon Ball Z?"
```
#### Command Line Arguments
- `--model_path`: Path to the model folder (default: "NousResearch/Hermes-2-Pro-Llama-3-8B").
- `--chat_template`: Chat template for prompt formatting (default: "chatml").
- `--num_fewshot`: Option to include few-shot examples (default: None).
- `--load_in_4bit`: Option to load in 4bit with bitsandbytes (default: "False").
- `--query`: Query to be used for function call inference (default: "I need the current stock price of Tesla (TSLA)").
- `--max_depth`: Maximum number of recursive iterations (default: 5).
## Adding Custom Functions
To add your own functions for the model to use, you can modify the `functions.py` script. This script contains various functions that retrieve stock-related information using the `yfinance` library.
Here's an example of how to add a new function:
```python
@tool
def get_new_function(symbol: str) -> dict:
"""
Description of the new function.
Args:
symbol (str): The stock symbol.
Returns:
dict: Dictionary containing the desired information.
"""
try:
# Implement the logic to retrieve the desired information
# using the yfinance library or any other relevant libraries
# Example:
stock = yf.Ticker(symbol)
new_info = stock.new_method()
return new_info
except Exception as e:
print(f"Error fetching new information for {symbol}: {e}")
return {}
```
After defining your new function, make sure to add it to the `get_openai_tools()` function in the `functions.py` script:
```python
def get_openai_tools() -> List[dict]:
functions = [
# ...
get_new_function,
# ...
]
tools = [convert_to_openai_tool(f) for f in functions]
return tools
```
This will ensure that your new function is included in the list of available tools for the model to use.
## Adding Custom Pydantic Model
To add your own pydantic models to create json schema for the model to use, you can replace the pydantic models in the `jsonmode.py` script.
Here's an example of how to add a new pydantic model:
```python
from typing import List, Optional
from pydantic import BaseModel
class Character(BaseModel):
name: str
species: str
role: str
personality_traits: Optional[List[str]]
special_attacks: Optional[List[str]]
class Config:
schema_extra = {
"additionalProperties": False
}
```
You need to serialize the pydantic model into json schema as follows:
```python
pydantic_schema = Character.schema_json()
```
## Key Scripts
The repository contains several key scripts that work together to enable function calling with the Hermes Pro Large Language Model:
- `functions.py`: This script is where all the functions/tools you want the model to have access to are made available.
- `functioncall.py`: This script is the main entry point for running the function call inference. It initializes the model, tokenizer, and other necessary components, and handles the recursive loop for generating function calls and executing them.
- `jsonmode.py`: This script can be used for running json mode inference. It has similar functExcerpt of 15,089 characters
Read on GitHub91
Teknium
9
Alonso Silva · Nokia Bell Labs · France
3
3
1
& · @logos-co · Turkey
1
1
1
Atakan Tekparmak
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:298b82abdd3bb74a, name:function calling