diff --git a/README.md b/README.md index 3e869f8..070dd60 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ OpenChatML supports function calling, allowing the model to interact with extern ### 8.1 Function Signature -To enable function calling, the available functions or tools should be provided to the model within the `` and `` XML tags in the system message. The function signature is represented as a JSON object with the following properties: +To enable function calling, the available functions or tools should be provided to the model after the `<|function_list|>` tag in the system message. The function signature is represented as a JSON object with the following properties: - `type`: Indicates the type of the tool, which should be "function". - `function`: An object representing the function details, containing: @@ -166,7 +166,7 @@ Example function signature: ### 8.2 Function Call -To make a function call, the model should generate a JSON object within the `` and `` XML tags. The JSON object should follow the Pydantic model schema: +To make a function call, the model should generate a JSON object after the `<|function_call|>` tag. The JSON object should follow the Pydantic model schema: ```json { @@ -195,7 +195,7 @@ Example function call: ### 8.3 Function Response -After executing the function call, the response should be passed back to the model within the `` and `` XML tags. The response should be a JSON object containing the function name and the content of the response. +After executing the function call, the response should be passed back to the model aftert the `<|function_output|>` tag. The response should be a JSON object containing the function name and the content of the response. Example function response: @@ -230,7 +230,7 @@ Here's an example conversation demonstrating function calling in OpenChatML: ``` [BOS]<|im_start|>system -You are a function calling AI model. You are provided with function signatures within 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: +You are a function calling AI model. You are provided with function signatures after the `<|function_list|>` tag. 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: <|function_list|> { "type": "function", @@ -248,7 +248,7 @@ You are a function calling AI model. You are provided with function signatures w } } } -<|function_list|> + Use the following pydantic model json schema for each tool call you will make: { "title": "FunctionCall", @@ -265,7 +265,7 @@ Use the following pydantic model json schema for each tool call you will make: }, "required": ["arguments", "name"] } -For each function call return a json object with function name and arguments within XML tags as follows: +For each function call return a json object with function name and arguments after the <|function_call|> tag as follows: <|function_call|> {"arguments": , "name": } <|im_end|>