Skip to content

Commit

Permalink
cr
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryjliu committed Dec 3, 2023
1 parent 5434d1f commit badcebc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 1_🏠_Home.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
st.info("**NOTE**: The ability to add web search is enabled.")


current_state = get_current_state()
add_sidebar()

current_state = get_current_state()

st.info(f"Currently building/editing agent: {current_state.cache.agent_id}", icon="ℹ️")

Expand Down
3 changes: 2 additions & 1 deletion pages/2_⚙️_RAG_Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ def delete_agent() -> None:
menu_items=None,
)
st.title("RAG Pipeline Config")
add_sidebar()

current_state = get_current_state()
add_sidebar()



if current_state.agent_builder is not None:
Expand Down
3 changes: 1 addition & 2 deletions pages/3_🤖_Generated_RAG_Agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
)
st.title("Generated RAG Agent")

current_state = get_current_state()
add_sidebar()

if (
Expand Down Expand Up @@ -45,8 +46,6 @@ def display_messages() -> None:
raise ValueError(f"Unknown message type: {msg_type}")


current_state = get_current_state()

# if agent is created, then we can chat with it
if current_state.cache is not None and current_state.cache.agent is not None:
st.info(f"Viewing config for agent: {current_state.cache.agent_id}", icon="ℹ️")
Expand Down
7 changes: 7 additions & 0 deletions st_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ def get_current_state() -> CurrentSessionState:
if "cur_agent_ids" not in st.session_state.keys():
st.session_state.cur_agent_ids = agent_registry.get_agent_ids()

if "selected_id" not in st.session_state.keys():
st.session_state.selected_id = None

if "selected_cache" not in st.session_state.keys():
st.session_state.selected_cache = None

# set builder agent / agent builder
if (
"selected_cache" in st.session_state.keys()
and st.session_state.selected_cache is not None
Expand Down

0 comments on commit badcebc

Please sign in to comment.