alexkueck commited on
Commit
97f9a92
1 Parent(s): 1ce3140

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +4 -1
utils.py CHANGED
@@ -226,7 +226,10 @@ def rag_chain(prompt, db, k=3):
226
  #Hashing....
227
  # Funktion zum Hashen des Eingabewerts
228
  def hash_input(input_string):
229
- return hashlib.sha256(input_string.encode()).hexdigest()
 
 
 
230
 
231
 
232
  ########################################
 
226
  #Hashing....
227
  # Funktion zum Hashen des Eingabewerts
228
  def hash_input(input_string):
229
+ if input_string is not None:
230
+ return hashlib.sha256(input_string.encode()).hexdigest()
231
+ else:
232
+ return ""
233
 
234
 
235
  ########################################