Skip to content

Commit fc5ee05

Browse files
committed
refactor(wren-ai-service): streamline UI components and enhance configuration handling
- Removed the document store configuration section and its associated rendering logic. - Updated the embedder configuration to include dimension input for embedding models. - Simplified the rendering of pipeline configurations and improved the selection process for LLM models. - Enhanced the preview and generation functionality for configuration files. - Adjusted the layout and organization of UI components for better clarity and usability.
1 parent 430c67b commit fc5ee05

File tree

2 files changed

+173
-148
lines changed

2 files changed

+173
-148
lines changed

wren-ai-service/tools/providers-setup/app.py

+12-16
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
from session_state import ConfigState
33
from ui_components import (
44
render_llm_config,
5-
render_embedder_config,
6-
render_document_store_config,
5+
render_embedder_config,
76
render_import_yaml,
87
render_pipeline_config,
9-
render_preview_and_generate,
8+
render_preview,
109
render_apikey,
11-
render_finished_setting
10+
render_generate_button
1211
)
1312
import streamlit as st
1413

@@ -43,32 +42,29 @@
4342

4443
with col1:
4544

46-
st.subheader("API_KEY Configuration")
4745
# API key input section
46+
st.subheader("API_KEY Configuration")
4847
render_apikey()
4948

50-
st.subheader("LLM Configuration")
5149
# Upload and parse YAML file into session state
50+
st.subheader("LLM Configuration")
5251
render_import_yaml()
5352

5453
# LLM model configuration UI
5554
render_llm_config()
5655

57-
st.subheader("Embedder Configuration")
5856
# Embedding model configuration UI
57+
st.subheader("Embedder Configuration")
5958
render_embedder_config()
6059

61-
st.subheader("Document Store Configuration")
62-
# Document store configuration UI
63-
render_document_store_config()
64-
65-
st.subheader("Pipeline Configuration")
6660
# Pipeline flow configuration UI
61+
st.subheader("Pipeline Configuration")
6762
render_pipeline_config()
6863

64+
# Generate config.yaml and save configuration button
65+
render_generate_button(engine_blocks, settings_block)
66+
6967
with col2:
7068
# Final preview and export of the combined configuration as YAML
71-
render_preview_and_generate(engine_blocks, pipeline_block, settings_block)
72-
73-
# Signal that configuration is complete and ready for CLI continuation
74-
render_finished_setting()
69+
render_preview(engine_blocks, settings_block)
70+

0 commit comments

Comments
 (0)