From f8623459fe19d91149edb9126afb677bf411e0c0 Mon Sep 17 00:00:00 2001 From: Hardik Shah Date: Thu, 15 Aug 2024 13:03:39 -0700 Subject: [PATCH] added docstrings for ToolPromptFormat --- .../agentic_system/api/datatypes.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/llama_toolchain/agentic_system/api/datatypes.py b/llama_toolchain/agentic_system/api/datatypes.py index e24a7e947..db4e40c4b 100644 --- a/llama_toolchain/agentic_system/api/datatypes.py +++ b/llama_toolchain/agentic_system/api/datatypes.py @@ -112,6 +112,29 @@ class Session(BaseModel): @json_schema_type class ToolPromptFormat(Enum): + """This Enum refers to the prompt format for calling zero shot tools + + `json` -- + Refers to the json format for calling tools. + The json format takes the form like + { + "type": "function", + "function" : { + "name": "function_name", + "description": "function_description", + "parameters": {...} + } + } + + `function_tag` -- + This is an example of how you could define + your own user defined format for making tool calls. + The function_tag format looks like this, + (parameters) + + The detailed prompts for each of these formats are defined in `system_prompt.py` + """ + json = "json" function_tag = "function_tag"