From 43340c4aa8b56b623846aabea250709e232d582e Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 21 Jan 2025 09:44:53 +0000 Subject: [PATCH] fix: finale test --- application/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/cache.py b/application/cache.py index 0b5d72da..80dee4f4 100644 --- a/application/cache.py +++ b/application/cache.py @@ -33,7 +33,7 @@ def gen_cache_key(messages, model="docgpt", tools=None): if not all(isinstance(msg, dict) for msg in messages): raise ValueError("All messages must be dictionaries.") messages_str = json.dumps(messages) - tools_str = json.dumps(tools) if tools else "" + tools_str = json.dumps(str(tools)) if tools else "" combined = f"{model}_{messages_str}_{tools_str}" cache_key = get_hash(combined) return cache_key