From d0fe1a89064c4459d0253b42a4fc14a7f448431e Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Mon, 15 Jul 2024 11:12:42 -0700 Subject: [PATCH] Docstring --- litellm/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/litellm/utils.py b/litellm/utils.py index d670a4144..da5352193 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -1802,10 +1802,11 @@ def create_tokenizer(json: str): tokenizer = Tokenizer.from_str(json) return {"type": "huggingface_tokenizer", "tokenizer": tokenizer} -# Based on https://github.com/forestwanglin/openai-java/blob/main/jtokkit/src/main/java/xyz/felh/openai/jtokkit/utils/TikTokenUtils.java - def _format_function_definitions(tools): + """Formats tool definitions in the format that OpenAI appears to use. + Based on https://github.com/forestwanglin/openai-java/blob/main/jtokkit/src/main/java/xyz/felh/openai/jtokkit/utils/TikTokenUtils.java + """ lines = [] lines.append("namespace functions {") lines.append("")