jattokatarratto commited on
Commit
f20ae79
·
verified ·
1 Parent(s): a4f6f1d

Update common.py

Browse files
Files changed (1) hide show
  1. common.py +5 -0
common.py CHANGED
@@ -5,6 +5,11 @@ import numpy as np
5
  import tiktoken
6
  from langchain.text_splitter import TokenTextSplitter
7
 
 
 
 
 
 
8
  def strtobool(val):
9
  val = val.lower()
10
  if val in ('yes', 'true', 't', '1'):
 
5
  import tiktoken
6
  from langchain.text_splitter import TokenTextSplitter
7
 
8
+ def strip_quotes(text):
9
+ if text.startswith('"') and text.endswith('"'):
10
+ return text[1:-1]
11
+ return text
12
+
13
  def strtobool(val):
14
  val = val.lower()
15
  if val in ('yes', 'true', 't', '1'):