|
import streamlit as st |
|
|
|
def get_rag(): |
|
if 'vectorstore' in st.session_state and 'chain' in st.session_state: |
|
vectorstore = st.session_state['vectorstore'] |
|
chain = st.session_state['chain'] |
|
|
|
return vectorstore, chain |
|
else: |
|
return None, None |
|
|
|
def set_rag(vectorstore, chain): |
|
st.session_state['vectorstore'] = vectorstore |
|
st.session_state['chain'] = chain |
|
|
|
def set_partie_prenante(partie_prenante): |
|
st.session_state['partie_prenante'] = partie_prenante |
|
|
|
def get_partie_prenante(): |
|
if 'partie_prenante' in st.session_state: |
|
return st.session_state['partie_prenante'] |
|
else: |
|
return None |