added docstrings for ToolPromptFormat

This commit is contained in:
Hardik Shah 2024-08-15 13:03:39 -07:00
parent 00053b5bb0
commit f8623459fe

View file

@ -112,6 +112,29 @@ class Session(BaseModel):
@json_schema_type @json_schema_type
class ToolPromptFormat(Enum): 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,
<function=function_name>(parameters)</function>
The detailed prompts for each of these formats are defined in `system_prompt.py`
"""
json = "json" json = "json"
function_tag = "function_tag" function_tag = "function_tag"