Downloads · 30 days
30
3% of all-time downloads
PsiPi/gorilla-llm_gorilla-openfunctions-v1-gguf
gorilla-llm_gorilla-openfunctions-v1-gguf is a machine learning model from PsiPi. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Downloads · 30 days
30
3% of all-time downloads
All-time downloads
1.1K
Public
Repo size
21.5 GB
Likes
0
Public
Click a slice to open those files.
.gguf21.5 GB · 100%
From the Hugging Face model README
ggufs for the following
🚀 Try it out on Colab
📣 Read more in our OpenFunctions blog release
Gorilla OpenFunctions extends Large Language Model(LLM) Chat Completion feature to formulate executable APIs call given natural language instructions and API context.
| model | functionality |
|---|---|
| gorilla-openfunctions-v0 | Given a function, and user intent, returns properly formatted json with the right arguments |
| gorilla-openfunctions-v1 | + Parallel functions, and can choose between functions |
!pip install openai==0.28.1
import openai
def get_gorilla_response(prompt="Call me an Uber ride type \"Plus\" in Berkeley at zipcode 94704 in 10 minutes", model="gorilla-openfunctions-v0", functions=[]):
openai.api_key = "EMPTY"
openai.api_base = "http://luigi.millennium.berkeley.edu:8000/v1"
try:
completion = openai.ChatCompletion.create(
model="gorilla-openfunctions-v1",
temperature=0.0,
messages=[{"role": "user", "content": prompt}],
functions=functions,
)
return completion.choices[0].message.content
except Exception as e:
print(e, model, prompt)
query = "Call me an Uber ride type \"Plus\" in Berkeley at zipcode 94704 in 10 minutes"
functions = [
{
"name": "Uber Carpool",
"api_name": "uber.ride",
"description": "Find suitable ride for customers given the location, type of ride, and the amount of time the customer is willing to wait as parameters",
"parameters": [{"name": "loc", "description": "location of the starting place of the uber ride"}, {"name":"type", "enum": ["plus", "comfort", "black"], "description": "types of uber ride user is ordering"}, {"name": "time", "description": "the amount of time in minutes the customer is willing to wait"}]
}
]
get_gorilla_response(query, functions=functions)
uber.ride(loc="berkeley", type="plus", time=10)
All the models, and data used to train the models is released under Apache 2.0. Gorilla is an open source effort from UC Berkeley and we welcome contributors. Please email us your comments, criticism, and questions. More information about the project can be found at https://gorilla.cs.berkeley.edu/