优化本地Ollama接口使用体验

用户在使用本地Ollama接口时无需再填写API Key,API Key字段可以留空。
This commit is contained in:
Karasukaigan
2025-02-17 23:09:28 +08:00
parent c933d788d4
commit e965b3c9af
2 changed files with 18 additions and 0 deletions
+3
View File
@@ -187,6 +187,9 @@ class NovelGeneratorGUI:
max_tokens = self.max_tokens_var.get()
timeout = self.timeout_var.get()
if interface_format == 'Ollama' and api_key == '':
api_key = 'ollama'
test_llm_config(
interface_format=interface_format,
api_key=api_key,