From 91fef76f6c3c03c66635ede66e1f32296a6b321b Mon Sep 17 00:00:00 2001 From: acer-king Date: Mon, 14 Oct 2024 06:50:43 -0700 Subject: [PATCH] conflict error fix --- validators/services/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validators/services/cache.py b/validators/services/cache.py index eb3e3283..7371242a 100644 --- a/validators/services/cache.py +++ b/validators/services/cache.py @@ -54,7 +54,7 @@ def set_cache_in_batch(self, syns: List[StreamPrompting], ttl=3600 * 24): # Insert multiple records cursor = self.conn.cursor() cursor.executemany(''' - INSERT INTO cache (p_key, question, answer, provider, model, timestamp) + INSERT OR IGNORE INTO cache (p_key, question, answer, provider, model, timestamp) VALUES (?, ?, ?, ?, ?, ?) ''', datas)