@@ -159,7 +159,9 @@ def spring_ai_conf_check(ll_model: dict, embed_model: dict) -> str:
159
159
160
160
ll_provider = ll_model .get ("provider" , "" )
161
161
embed_provider = embed_model .get ("provider" , "" )
162
-
162
+ logger .info (f"llm chat:{ ll_provider } - embeddings:{ embed_provider } " )
163
+ if all ("openai_compatible" in p for p in (ll_provider , embed_provider )):
164
+ return "openai_compatible"
163
165
if all ("openai" in p for p in (ll_provider , embed_provider )):
164
166
return "openai"
165
167
if all ("ollama" in p for p in (ll_provider , embed_provider )):
@@ -342,6 +344,8 @@ def display_settings():
342
344
embed_config = {}
343
345
spring_ai_conf = spring_ai_conf_check (ll_config , embed_config )
344
346
347
+ logger .info (f"config found:{ spring_ai_conf } " )
348
+
345
349
if spring_ai_conf == "hybrid" :
346
350
st .markdown (f"""
347
351
The current configuration combination of embedding and language models
@@ -352,21 +356,23 @@ def display_settings():
352
356
else :
353
357
col_left , col_centre , _ = st .columns ([3 , 4 , 3 ])
354
358
with col_left :
355
- st .download_button (
356
- label = "Download SpringAI" ,
357
- data = spring_ai_zip (spring_ai_conf , ll_config , embed_config ), # Generate zip on the fly
358
- file_name = "spring_ai.zip" , # Zip file name
359
- mime = "application/zip" , # Mime type for zip file
360
- disabled = spring_ai_conf == "hybrid" ,
361
- )
362
- with col_centre :
363
359
st .download_button (
364
360
label = "Download LangchainMCP" ,
365
361
data = langchain_mcp_zip (settings ), # Generate zip on the fly
366
362
file_name = "langchain_mcp.zip" , # Zip file name
367
363
mime = "application/zip" , # Mime type for zip file
368
364
disabled = spring_ai_conf == "hybrid" ,
369
365
)
366
+ with col_centre :
367
+ if (spring_ai_conf != "openai_compatible" ):
368
+ st .download_button (
369
+ label = "Download SpringAI" ,
370
+ data = spring_ai_zip (spring_ai_conf , ll_config , embed_config ), # Generate zip on the fly
371
+ file_name = "spring_ai.zip" , # Zip file name
372
+ mime = "application/zip" , # Mime type for zip file
373
+ disabled = spring_ai_conf == "hybrid" ,
374
+ )
375
+
370
376
371
377
372
378
if __name__ == "__main__" :
0 commit comments