allow api key empty when using ollama

the ollama API key is not required
This commit is contained in:
Jie.F
2024-10-08 09:44:39 +08:00
committed by GitHub
parent a53ca843e8
commit 345b6d59a1

View File

@@ -734,7 +734,7 @@ if start_button:
scroll_to_bottom()
st.stop()
if llm_provider != "g4f" and not config.app.get(f"{llm_provider}_api_key", ""):
if llm_provider != "g4f" and llm_provider != 'ollama' and not config.app.get(f"{llm_provider}_api_key", ""):
st.error(tr("Please Enter the LLM API Key"))
scroll_to_bottom()
st.stop()