We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68e89e8 commit af63792Copy full SHA for af63792
llama_cpp/llama_chat_format.py
@@ -8,6 +8,7 @@
8
import random
9
import string
10
11
+from datetime import datetime
12
from contextlib import ExitStack
13
from typing import (
14
Any,
@@ -214,6 +215,10 @@ def __init__(
214
215
lstrip_blocks=True,
216
).from_string(self.template)
217
218
+ @staticmethod
219
+ def strftime_now(f: str) -> str:
220
+ return datetime.now().strftime(f)
221
+
222
def __call__(
223
self,
224
*,
@@ -237,6 +242,7 @@ def raise_exception(message: str):
237
242
function_call=function_call,
238
243
tools=tools,
239
244
tool_choice=tool_choice,
245
+ strftime_now=self.strftime_now,
240
246
)
241
247
248
stopping_criteria = None
0 commit comments