/natural-functions

Mistral-7B finetuned for function calling

Primary LanguageJupyter NotebookApache License 2.0Apache-2.0

Natural Functions

Mistral-7B finetuned for function calling!

HuggingFace Ollama HuggingFace GGUF

Try Natural Functions on Ollama!

ollama run calebfahlgren/natural-functions

Ollama Natural Functions

System Prompt via Ollama

Setting System Prompt with Function Definition You can set the system prompt with /set system with your function definitions.

>>> /set system """
... You are a helpful assistant with access to the following functions. Use them if required - 
... {
...     "name": "order_pizza",
...     "description": "Order a pizza with custom toppings",
...     "parameters": {
...         "type": "object",
...         "properties": {
...             "size": {
...                 "type": "string",
...                 "description": "Size of the pizza (small, medium, large)"
...             },
...             "crust": {
...                 "type": "string",
...                 "description": "Type of crust (thin, regular, thick)"
...             },
...             "toppings": {
...                 "type": "array",
...                 "items": {
...                     "type": "string"
...                 },
...                 "description": "List of toppings for the pizza"
...             },
...             "delivery_address": {
...                 "type": "string",
...                 "description": "Address where the pizza should be delivered"
...             }
...         },
...         "required": [
...             "size",
...             "crust",
...             "toppings",
...             "delivery_address"
...         ]
...     }
... }  
... """