From 739715e8d3b4add976d4adc46436f1522fe11237 Mon Sep 17 00:00:00 2001 From: joemzhao Date: Mon, 22 Jul 2024 15:41:46 +0900 Subject: [PATCH] api_stop in invoke_tools has extra space addressing https://github.com/lucidrains/toolformer-pytorch/issues/19 --- toolformer_pytorch/toolformer_pytorch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolformer_pytorch/toolformer_pytorch.py b/toolformer_pytorch/toolformer_pytorch.py index 6a2a290..ec38a73 100644 --- a/toolformer_pytorch/toolformer_pytorch.py +++ b/toolformer_pytorch/toolformer_pytorch.py @@ -192,7 +192,7 @@ def invoke_tools( text: str, delimiter: str = '→', api_start = ' [', - api_stop = ' ]' + api_stop = ']' ) -> str: regex = create_function_regex(api_start, api_stop) replace_ = partial(replace_fn, registry, delimiter = delimiter)