Repolode
ShishirPatil

ShishirPatil/gorilla

Gorilla is an open-source project for training and evaluating LLMs to make accurate function calls and invoke APIs from natural language requests.

Open-source alternative to:OpenAI Function Calling

Stars
13,056
Forks
1,413
Open issues
293
Last commit
5 days ago

What is it?

Gorilla enables large language models to use tools by invoking APIs. Given a natural language query, it aims to produce a semantically and syntactically correct API call, with the goal of reducing hallucinated calls. The repository covers inference code for Gorilla fine-tuned models, evaluation scripts, and APIBench, a dataset of over 1,600 APIs for training and testing.

The project has grown into a family of components. OpenFunctions is a function-calling model with OpenAI-compatible endpoints that supports parallel and multiple function execution. The Berkeley Function Calling Leaderboard (BFCL) benchmarks function-calling ability across single-turn, multi-turn, and agentic settings. Other parts include GoEx, a runtime for executing LLM-generated actions with undo and post-facto validation, RAFT for fine-tuning models on domain-specific retrieval-augmented generation, and Agent Arena for comparing agents.

The models and code are released under the Apache 2.0 license.

Key features

  • 01Generates API calls from natural language queries, covering over 1,600 APIs in APIBench.
  • 02Provides OpenFunctions models with OpenAI-compatible endpoints, including parallel and multiple function calls.
  • 03Includes the Berkeley Function Calling Leaderboard for evaluating single-turn, multi-turn, and agentic function calling.
  • 04Offers GoEx, a runtime for executing LLM-generated actions with undo and post-facto validation.
  • 05Ships RAFT recipes for fine-tuning models on domain-specific retrieval-augmented generation.

Use cases

  • Building an LLM agent that must call external tools or REST APIs reliably.
  • Benchmarking how well different models handle function calling before choosing one.
  • Fine-tuning a smaller open model for domain-specific question answering over documents.
  • Serving an OpenAI-style function-calling endpoint with an open-source model.

Quick start

  1. 1

    Install the Gorilla CLI with pip

    pip install gorilla-cli
  2. 2

    Generate a file with the Gorilla CLI

    gorilla generate 100 random characters into a file called test.txt

Things to know

  • Several features rely on hosted demos or a remote OpenFunctions endpoint whose availability is not guaranteed.
  • Running the local inference setup requires cloning the repository and following a separate setup guide.

Topics

FAQ

What is gorilla?
Gorilla is an open-source project for training and evaluating LLMs to make accurate function calls and invoke APIs from natural language requests. Gorilla enables large language models to use tools by invoking APIs. Given a natural language query, it aims to produce a semantically and syntactically correct API call, with the goal of reducing hallucinated calls. The repository covers inference code for Gorilla fine-tuned models, evaluation scripts, and APIBench, a dataset of over 1,600 APIs for training and testing.
Is gorilla free to use? What license does it have?
gorilla is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is gorilla still maintained?
Actively maintained. The last commit to gorilla was on Oct 17, 2026.
What can I use gorilla for?
Building an LLM agent that must call external tools or REST APIs reliably. Benchmarking how well different models handle function calling before choosing one. Fine-tuning a smaller open model for domain-specific question answering over documents. Serving an OpenAI-style function-calling endpoint with an open-source model.
How do I install gorilla?
Install the Gorilla CLI with pip: pip install gorilla-cli Generate a file with the Gorilla CLI: gorilla generate 100 random characters into a file called test.txt
Where can I get gorilla?
The source code and installation instructions are on GitHub: https://github.com/ShishirPatil/gorilla

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects