Update README.md
Browse files
README.md
CHANGED
@@ -43,8 +43,8 @@ The Model is finetuned for 1 epoch due to which Bias and error are prone
|
|
43 |
|
44 |
Use the code below to get started with the model.
|
45 |
|
46 |
-
|
47 |
-
```
|
48 |
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
|
49 |
from transformers import pipeline
|
50 |
import torch
|
@@ -58,8 +58,8 @@ model.eval()
|
|
58 |
generator = pipeline("text-generation", model= model, tokenizer= tokenizer)
|
59 |
```
|
60 |
|
61 |
-
|
62 |
-
```
|
63 |
prompt="""<bos><start_of_turn>human
|
64 |
You are a function calling AI model. You are provided with function signatures within <tools></tools> XML tags.You may call one or more functions to assist with the user query. Don't make assumptions about what values to plug into functions.Here are the available tools:<tools> [{'type': 'function', 'function': {'name': 'convert_currency', 'description': 'Convert from one currency to another', 'parameters': {'type': 'object', 'properties': {'amount': {'type': 'number', 'description': 'The amount to convert'}, 'from_currency': {'type': 'string', 'description': 'The currency to convert from'}, 'to_currency': {'type': 'string', 'description': 'The currency to convert to'}}, 'required': ['amount', 'from_currency', 'to_currency']}}}, {'type': 'function', 'function': {'name': 'calculate_distance', 'description': 'Calculate the distance between two locations', 'parameters': {'type': 'object', 'properties': {'start_location': {'type': 'string', 'description': 'The starting location'}, 'end_location': {'type': 'string', 'description': 'The ending location'}}, 'required': ['start_location', 'end_location']}}}] </tools>Use the following pydantic model json schema for each tool call you will make: {'title': 'FunctionCall', 'type': 'object', 'properties': {'arguments': {'title': 'Arguments', 'type': 'object'}, 'name': {'title': 'Name', 'type': 'string'}}, 'required': ['arguments', 'name']}For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags as follows:
|
65 |
<tool_call>
|
|
|
43 |
|
44 |
Use the code below to get started with the model.
|
45 |
|
46 |
+
|
47 |
+
```python
|
48 |
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
|
49 |
from transformers import pipeline
|
50 |
import torch
|
|
|
58 |
generator = pipeline("text-generation", model= model, tokenizer= tokenizer)
|
59 |
```
|
60 |
|
61 |
+
|
62 |
+
```python
|
63 |
prompt="""<bos><start_of_turn>human
|
64 |
You are a function calling AI model. You are provided with function signatures within <tools></tools> XML tags.You may call one or more functions to assist with the user query. Don't make assumptions about what values to plug into functions.Here are the available tools:<tools> [{'type': 'function', 'function': {'name': 'convert_currency', 'description': 'Convert from one currency to another', 'parameters': {'type': 'object', 'properties': {'amount': {'type': 'number', 'description': 'The amount to convert'}, 'from_currency': {'type': 'string', 'description': 'The currency to convert from'}, 'to_currency': {'type': 'string', 'description': 'The currency to convert to'}}, 'required': ['amount', 'from_currency', 'to_currency']}}}, {'type': 'function', 'function': {'name': 'calculate_distance', 'description': 'Calculate the distance between two locations', 'parameters': {'type': 'object', 'properties': {'start_location': {'type': 'string', 'description': 'The starting location'}, 'end_location': {'type': 'string', 'description': 'The ending location'}}, 'required': ['start_location', 'end_location']}}}] </tools>Use the following pydantic model json schema for each tool call you will make: {'title': 'FunctionCall', 'type': 'object', 'properties': {'arguments': {'title': 'Arguments', 'type': 'object'}, 'name': {'title': 'Name', 'type': 'string'}}, 'required': ['arguments', 'name']}For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags as follows:
|
65 |
<tool_call>
|