hashlib helper to gen cachekey

This commit is contained in:
fadingNA
2024-10-12 10:47:33 -04:00
parent 1ae0af56cc
commit 3e55be910b

View File

@@ -1,6 +1,8 @@
import tiktoken
import hashlib
from flask import jsonify, make_response
_encoding = None
@@ -39,3 +41,8 @@ def check_required_fields(data, required_fields):
400,
)
return None
def get_hash(data):
return hashlib.md5(data.encode()).hexdigest()