Ashishkr commited on
Commit
bdb3c76
1 Parent(s): e8c1a0c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -4
app.py CHANGED
@@ -58,11 +58,18 @@ def generate(
58
  yield history + [(message, response)]
59
 
60
 
 
 
 
 
 
 
 
61
  def process_example(message: str) -> tuple[str, list[tuple[str, str]]]:
62
- generator = generate(message, [], DEFAULT_SYSTEM_PROMPT, 1024, 1, 0.95, 50)
63
- for x in generator:
64
- pass
65
- return '', x
66
 
67
 
68
  def check_input_token_length(message: str, chat_history: list[tuple[str, str]], system_prompt: str) -> None:
 
58
  yield history + [(message, response)]
59
 
60
 
61
+ # def process_example(message: str) -> tuple[str, list[tuple[str, str]]]:
62
+ # generator = generate(message, [], DEFAULT_SYSTEM_PROMPT, 1024, 1, 0.95, 50)
63
+ # for x in generator:
64
+ # pass
65
+ # return '', x
66
+
67
+
68
  def process_example(message: str) -> tuple[str, list[tuple[str, str]]]:
69
+ response = generate(message, [], DEFAULT_SYSTEM_PROMPT, 1024, 1, 0.95, 50)
70
+ # Assuming you want to return the response as the second element of the tuple, wrapped in a list.
71
+ return '', [(message, response)]
72
+
73
 
74
 
75
  def check_input_token_length(message: str, chat_history: list[tuple[str, str]], system_prompt: str) -> None: