(input, chatbot, max_length, top_p, temperature, history, past_key_values)
| 61 | |
| 62 | |
| 63 | def predict(input, chatbot, max_length, top_p, temperature, history, past_key_values): |
| 64 | chatbot.append((parse_text(input), "")) |
| 65 | for response, history, past_key_values in model.stream_chat(tokenizer, input, history, past_key_values=past_key_values, |
| 66 | return_past_key_values=True, |
| 67 | max_length=max_length, top_p=top_p, |
| 68 | temperature=temperature): |
| 69 | chatbot[-1] = (parse_text(input), parse_text(response)) |
| 70 | |
| 71 | yield chatbot, history, past_key_values |
| 72 | |
| 73 | |
| 74 | def reset_user_input(): |
nothing calls this directly
no test coverage detected