pazukdev commited on
Commit
59335e0
·
verified ·
1 Parent(s): 87c4c05

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -13,6 +13,9 @@ from gptcache import cache
13
 
14
  OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
15
 
 
 
 
16
  cache.init(pre_embedding_func=get_content_func)
17
  cache.set_openai_key()
18
 
 
13
 
14
  OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
15
 
16
+ def get_content_func(data, **_):
17
+ return data.get("prompt").split("Question")[-1]
18
+
19
  cache.init(pre_embedding_func=get_content_func)
20
  cache.set_openai_key()
21