@@ -161,7 +161,9 @@ def spring_ai_conf_check(ll_model: dict, embed_model: dict) -> str:
161161
162162 ll_provider = ll_model .get ("provider" , "" )
163163 embed_provider = embed_model .get ("provider" , "" )
164-
164+ logger .info (f"llm chat:{ ll_provider } - embeddings:{ embed_provider } " )
165+ if all ("openai_compatible" in p for p in (ll_provider , embed_provider )):
166+ return "openai_compatible"
165167 if all ("openai" in p for p in (ll_provider , embed_provider )):
166168 return "openai"
167169 if all ("ollama" in p for p in (ll_provider , embed_provider )):
@@ -343,6 +345,8 @@ def display_settings():
343345 embed_config = {}
344346 spring_ai_conf = spring_ai_conf_check (ll_config , embed_config )
345347
348+ logger .info (f"config found:{ spring_ai_conf } " )
349+
346350 if spring_ai_conf == "hybrid" :
347351 st .markdown (f"""
348352 The current configuration combination of embedding and language models
@@ -353,21 +357,23 @@ def display_settings():
353357 else :
354358 col_left , col_centre , _ = st .columns ([3 , 4 , 3 ])
355359 with col_left :
356- st .download_button (
357- label = "Download SpringAI" ,
358- data = spring_ai_zip (spring_ai_conf , ll_config , embed_config ), # Generate zip on the fly
359- file_name = "spring_ai.zip" , # Zip file name
360- mime = "application/zip" , # Mime type for zip file
361- disabled = spring_ai_conf == "hybrid" ,
362- )
363- with col_centre :
364360 st .download_button (
365361 label = "Download LangchainMCP" ,
366362 data = langchain_mcp_zip (settings ), # Generate zip on the fly
367363 file_name = "langchain_mcp.zip" , # Zip file name
368364 mime = "application/zip" , # Mime type for zip file
369365 disabled = spring_ai_conf == "hybrid" ,
370366 )
367+ with col_centre :
368+ if (spring_ai_conf != "openai_compatible" ):
369+ st .download_button (
370+ label = "Download SpringAI" ,
371+ data = spring_ai_zip (spring_ai_conf , ll_config , embed_config ), # Generate zip on the fly
372+ file_name = "spring_ai.zip" , # Zip file name
373+ mime = "application/zip" , # Mime type for zip file
374+ disabled = spring_ai_conf == "hybrid" ,
375+ )
376+
371377
372378
373379if __name__ == "__main__" :
0 commit comments