pberck commited on
Commit
c33ff1d
·
1 Parent(s): 3dc3f9b

Small fixes.

Browse files
app.py CHANGED
@@ -353,11 +353,11 @@ with gr.Blocks(theme=theme) as demo_blocks:
353
  ctxkeep = 3
354
  else:
355
  ctxkeep = int(ctxkeep)
356
- DBG("context keep: " + str(ctxkeep))
357
  DBG("CONTEXT")
 
358
  context = context[0:ctxkeep]
 
359
  if ctxkeep > 0:
360
- context_str = "Context:\n"
361
  for i, x in enumerate(context): # note different after reranking
362
  DBG(x)
363
  context_str += x + "\n\n"
@@ -379,6 +379,7 @@ with gr.Blocks(theme=theme) as demo_blocks:
379
  else:
380
  ctx_text = "(no retrieved context used)"
381
  prompt = f"Context: Use the chat history and your own knowledge.\nQuestion:{user_message}\n"
 
382
  system_prompt = (
383
  "You are Samuel von Pufendorf. You are in Lund. The year is 1675. "
384
  "Answer the question using the history and context! "
 
353
  ctxkeep = 3
354
  else:
355
  ctxkeep = int(ctxkeep)
 
356
  DBG("CONTEXT")
357
+ DBG("context keep: " + str(ctxkeep))
358
  context = context[0:ctxkeep]
359
+ context_str = ""
360
  if ctxkeep > 0:
 
361
  for i, x in enumerate(context): # note different after reranking
362
  DBG(x)
363
  context_str += x + "\n\n"
 
379
  else:
380
  ctx_text = "(no retrieved context used)"
381
  prompt = f"Context: Use the chat history and your own knowledge.\nQuestion:{user_message}\n"
382
+ # DBG("PROMPT:" + prompt)
383
  system_prompt = (
384
  "You are Samuel von Pufendorf. You are in Lund. The year is 1675. "
385
  "Answer the question using the history and context! "
vector3_db/a1b2bf9f-4f30-46a6-a6c2-b6ca99effce9/data_level0.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a2f33a640a6a1c9930a46cf5a6b6ebc0e07c52d85a754892208b3725ec6d7964
3
  size 16760000
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bfd058843fc07c58e056f330c61a45581f88548dce33f61cf7f3c54f53a7ea83
3
  size 16760000
vector3_db/a1b2bf9f-4f30-46a6-a6c2-b6ca99effce9/length.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:174a07871bf6956d282f718bf1af45ecb44ff58d1120450e65572884e2655044
3
  size 40000
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d63d978ff08dc5881151f75c48243d1737d54910ec6cb70d614aa7a32091f26f
3
  size 40000
vector3_db/chroma.sqlite3 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2a4d40287f44cd70d89a2167703709b18734676b57e399607ebef5145003eda0
3
  size 11452416
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8e086362d4bf8004e5041ac2aadc54c7eff767fd2834aa8b056520332e0fe8a
3
  size 11452416