File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 33from theflow .settings import settings as flowsettings
44
55KH_APP_DATA_DIR = getattr (flowsettings , "KH_APP_DATA_DIR" , "." )
6+ KH_GRADIO_SHARE = getattr (flowsettings , "KH_GRADIO_SHARE" , False )
67GRADIO_TEMP_DIR = os .getenv ("GRADIO_TEMP_DIR" , None )
78# override GRADIO_TEMP_DIR if it's not set
89if GRADIO_TEMP_DIR is None :
2122 "libs/ktem/ktem/assets" ,
2223 GRADIO_TEMP_DIR ,
2324 ],
25+ share = KH_GRADIO_SHARE ,
2426)
Original file line number Diff line number Diff line change 2525 except Exception :
2626 KH_APP_VERSION = "local"
2727
28+ KH_GRADIO_SHARE = config ("KH_GRADIO_SHARE" , default = False , cast = bool )
2829KH_ENABLE_FIRST_SETUP = config ("KH_ENABLE_FIRST_SETUP" , default = True , cast = bool )
2930KH_DEMO_MODE = config ("KH_DEMO_MODE" , default = False , cast = bool )
3031KH_OLLAMA_URL = config ("KH_OLLAMA_URL" , default = "http://localhost:11434/v1/" )
Original file line number Diff line number Diff line change @@ -265,12 +265,12 @@ def update_model(
265265 )
266266 elif radio_model_value == "ollama" :
267267 llms .update (
268- name = "ollama-long-context " ,
268+ name = "ollama" ,
269269 spec = {
270- "__type__" : "kotaemon.llms.LCOllamaChat " ,
271- "base_url" : KH_OLLAMA_URL . replace ( "v1/" , "" ) ,
270+ "__type__" : "kotaemon.llms.ChatOpenAI " ,
271+ "base_url" : KH_OLLAMA_URL ,
272272 "model" : config ("LOCAL_MODEL" , default = "qwen2.5:7b" ),
273- "num_ctx " : 8192 ,
273+ "api_key " : "ollama" ,
274274 },
275275 default = True ,
276276 )
You can’t perform that action at this time.
0 commit comments