-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Contibution.md file #707
Open
Parth4git
wants to merge
2
commits into
ShishirPatil:main
Choose a base branch
from
Parth4git:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
# Contribution Guide for Gorilla API Store | ||
|
||
Welcome to the **Gorilla API Store** contribution guide! We appreciate your interest in enhancing the capabilities of LLMs with API integration. This guide will help you contribute APIs to Gorilla and make sure your API is well-documented and functional within our ecosystem. | ||
|
||
## Table of Contents | ||
|
||
- [Introduction](#introduction) | ||
- [Contribution Methods](#contribution-methods) | ||
- [Option 1: API JSON Contribution](#option-1-api-json-contribution-preferred) | ||
- [Option 2: URL JSON Contribution](#option-2-url-json-contribution) | ||
- [Submission Process](#submission-process) | ||
- [Contribution Format](#contribution-format) | ||
- [API JSON Format](#api-json-format) | ||
- [URL JSON Format](#url-json-format) | ||
- [Example Submissions](#example-submissions) | ||
- [API JSON Example](#api-json-example) | ||
- [URL JSON Example](#url-json-example) | ||
- [Best Practices](#best-practices) | ||
- [Contact and Support](#contact-and-support) | ||
|
||
--- | ||
|
||
## Introduction | ||
|
||
The **Gorilla API Store** is designed to enhance the ability of large language models (LLMs) to interact with various APIs, improving their accuracy and reducing hallucinations in function calls. We aim to build an open-source, one-stop-shop for all APIs that LLMs can invoke effectively. | ||
|
||
[Gorilla](https://gorilla.cs.berkeley.edu/) currently supports **1,600+ APIs** and counting. By contributing your APIs to this ecosystem, you'll help expand this store and enable more accurate and context-aware API calls by LLMs. We offer multiple ways to contribute, making it easy to get involved. | ||
|
||
--- | ||
|
||
## Contribution Methods | ||
|
||
You can contribute to the Gorilla API Store in two ways: | ||
|
||
### Option 1: API JSON Contribution (Preferred) | ||
|
||
This method allows for full control and customization over your API contribution. You will create a JSON file describing your API in detail, including function calls, arguments, and example code. This method is the preferred option because it ensures a higher level of accuracy in documenting your API. | ||
|
||
### Option 2: URL JSON Contribution | ||
|
||
If you're short on time or resources, you can simply provide a URL to your API documentation, and we will generate the API JSON for you using an LLM. Please note that this method may require additional verification to ensure the generated JSON is accurate. | ||
|
||
--- | ||
|
||
## Submission Process | ||
|
||
To submit your API, follow these steps: | ||
|
||
1. **Prepare Your API JSON** or **API URL JSON** as described below. | ||
2. **Fork** the Gorilla repository. | ||
3. **Have any issue** then create a new issue in [Issue section](https://github.com/ShishirPatil/gorilla/issues) and get the issue assigned then start working on it. | ||
4. **Create a Pull Request** with your API JSON file added under the appropriate directory (`data/apizoo`) and make PR in [Pull request section](https://github.com/ShishirPatil/gorilla/pulls) . | ||
5. We'll review your submission, and once approved, your API will become part of the Gorilla API Store. | ||
|
||
--- | ||
|
||
## Contribution Format | ||
|
||
### API JSON Format | ||
|
||
For **API JSON** contributions, follow this format: | ||
|
||
| Field | Type | Description | Required | | ||
| ------------------ | ------------ | ------------------------------------------------------------------- | -------- | | ||
| `user_name` | String | Name of the contributor. | ✅ | | ||
| `api_name` | String | Name of the API (max 20 words). | ✅ | | ||
| `api_call` | String | A one-line function call with arguments and values. | ✅ | | ||
| `api_version` | String | Version of the API. | ✅ | | ||
| `api_arguments` | JSON | JSON object listing the function's arguments and valid options. | ✅ | | ||
| `functionality` | String | Short description of the function (max 20 words). | ✅ | | ||
| `env_requirements` | List[String] | List of any required libraries or dependencies. | Optional | | ||
| `example_code` | String | Example code showing how to use the API. | Optional | | ||
| `meta_data` | JSON | Additional information such as descriptions or performance metrics. | Optional | | ||
| `questions` | List[String] | Questions that describe real-life scenarios for using this API. | Optional | | ||
|
||
--- | ||
|
||
### URL JSON Format | ||
|
||
For **URL JSON** contributions, follow this format: | ||
|
||
| Field | Type | Description | Required | | ||
| ----------- | ------------ | --------------------------------------------------------------- | -------- | | ||
| `user_name` | String | Name of the contributor. | ✅ | | ||
| `api_name` | String | Name of the API (max 20 words). | ✅ | | ||
| `api_url` | String | URL to the API documentation. | ✅ | | ||
| `questions` | List[String] | Questions that describe real-life scenarios for using this API. | Optional | | ||
|
||
--- | ||
|
||
## Example Submissions | ||
|
||
### API JSON Example: | ||
|
||
```json | ||
[ | ||
{ | ||
"user_name": "example_username_api", | ||
"api_name": "Torch Hub Model snakers4-silero", | ||
"api_call": "torch.hub.load(repo_or_dir=['snakers4/silero-models'], model=['silero_stt'], *args, source, trust_repo, force_reload, verbose, skip_validation, **kwargs)", | ||
"api_version": "2.0", | ||
"api_arguments": { | ||
"repo_or_dir": "snakers4/silero-models", | ||
"model": "silero_stt", | ||
"language": ["en", "de", "es"] | ||
}, | ||
"functionality": "Speech to Text", | ||
"env_requirements": ["torchaudio", "torch", "omegaconf", "soundfile"], | ||
"example_code": "import torch\nmodel = torch.hub.load('ultralytics/yolov5', 'yolov5s', pretrained=True)\nimgs = ['https://ultralytics.com/images/zidane.jpg']\nresults = model(imgs)", | ||
"meta_data": { | ||
"description": "Silero Speech-To-Text models provide enterprise-grade STT in a compact form factor.", | ||
"performance": { "dataset": "imagenet", "accuracy": "80.4%" } | ||
}, | ||
"questions": [ | ||
"I am a doctor and I want to dictate what my patient is saying and put it into a text doc in my computer.", | ||
"My math students need an API to write down what I am saying for reviewing." | ||
] | ||
} | ||
] | ||
``` | ||
|
||
## | ||
|
||
## URL JSON Example: | ||
|
||
```json | ||
[ | ||
{ | ||
"user_name": "example_username_url", | ||
"api_name": "Torch Hub ultralytics_yolov5", | ||
"api_url": "https://pytorch.org/hub/ultralytics_yolov5/", | ||
"questions": [ | ||
"I am a doctor and I want to dictate what my patient is saying and put it into a text doc in my computer.", | ||
"My math students need an API to write down what I am saying for reviewing." | ||
] | ||
} | ||
] | ||
``` | ||
|
||
# Best Practices | ||
|
||
#### Clear Documentation | ||
|
||
- Ensure that the URL points to clear and well-documented API information. This helps us generate accurate API JSON. | ||
|
||
#### Accurate API Calls | ||
|
||
- Double-check the API calls in the documentation to ensure they are syntactically and semantically correct. | ||
|
||
#### Dependencies | ||
|
||
- Make sure that the URL lists all necessary dependencies and environment requirements for the API to function properly. | ||
|
||
#### Test Your API | ||
|
||
- Whenever possible, provide working examples or sample code in your API documentation to demonstrate how the API functions. | ||
|
||
## Contact and Support | ||
|
||
For any questions or issues with your contribution, please reach out through one of the following: | ||
|
||
- **Discord**: Join our [community](https://discord.com/invite/grXXvj9Whz) for real-time support. | ||
- **Checkout our paper** : checkout our [papers](https://arxiv.org/abs/2305.15334) for more information | ||
- Use [Gorilla in your CLI](https://github.com/gorilla-llm/gorilla-cli) with ` pip install gorilla-cli` | ||
- **Email**: Contact us at [email protected]. | ||
|
||
**We look forward to your contributions!** |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey if the contribution focus is on API Store, shouldn't this be part of the APIZoo subdorectory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry but I didn't get what changes I have do . Please explain where should I have move changes. @ShishirPatil sir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want me to include contribution section in readme file . Or want change in content added in contribution.md file