From fc700dc784a3d3eaf5aacecdf7c66ee195891cec Mon Sep 17 00:00:00 2001 From: Oleg Korznikov Date: Sun, 9 Jun 2024 12:32:34 +0200 Subject: [PATCH] refactor: specify max_tokens for OpenAI language model --- main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/main.py b/main.py index 6af9d94..093ab4e 100644 --- a/main.py +++ b/main.py @@ -153,6 +153,7 @@ def main(): model=st.session_state.model, callbacks=[cb], model_kwargs={"top_p": st.session_state.top_p}, + max_tokens=2048, ) with st.spinner("Summarizing video :gear: Hang on..."): if custom_prompt: