christlurker commited on
Commit
e1515cd
·
verified ·
1 Parent(s): 6cef789

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -3
README.md CHANGED
@@ -42,9 +42,17 @@ tokenizer = AutoTokenizer.from_pretrained(model_id)
42
  model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype='auto', device_map="auto")
43
 
44
  # Example usage (adapt as needed for your specific tool usage scenario)
45
- system_prompt = "You are an AI assistant for function calling.
46
- For politically sensitive questions, security and privacy issues, you will refuse to answer.\n"
47
- user_prompt = "Please find the weather in London and then book a table at a restaurant nearby."
 
 
 
 
 
 
 
 
48
  tools = [
49
  {
50
  "name": "financial_ratios.interest_coverage", "description": "Calculate a company's interest coverage ratio given the company name and duration",
 
42
  model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype='auto', device_map="auto")
43
 
44
  # Example usage (adapt as needed for your specific tool usage scenario)
45
+ """You are an expert in composing functions. You are given a question and a set of possible functions. Based on the question, you will need to make one or more function/tool calls to achieve the purpose.
46
+ If none of the function can be used, point it out. If the given question lacks the parameters required by the function, also point it out.
47
+ You should only return the function call in tools call sections.
48
+
49
+ If you decide to invoke any of the function(s), you MUST put it in the format of [func_name1(params_name1=params_value1, params_name2=params_value2...), func_name2(params)]
50
+ You SHOULD NOT include any other text in the response.
51
+ Here is a list of functions in JSON format that you can invoke.\n{functions}\n
52
+ """
53
+ # User query
54
+ query = "Find me the sales growth rate for company XYZ for the last 3 years and also the interest coverage ratio for the same duration."
55
+
56
  tools = [
57
  {
58
  "name": "financial_ratios.interest_coverage", "description": "Calculate a company's interest coverage ratio given the company name and duration",