File size: 1,342 Bytes
0f82a63
6161c48
 
 
9378914
 
6161c48
 
0550657
6161c48
 
0550657
9378914
6161c48
 
 
0550657
9378914
6161c48
 
 
 
0550657
 
 
157d667
 
 
 
 
 
 
 
 
 
 
 
 
6161c48
157d667
 
6161c48
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import streamlit as st
import logging


st.markdown("<h1 style='text-align: center; color: #666666;'>Vector Database RAG Proof of Concept</h1>", unsafe_allow_html=True)
st.markdown("<h6 style='text-align: center; color: #666666;'>V1</h6>", unsafe_allow_html=True)

logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG)

def runLLM(prompt):
    log.debug("### runLLM")
    result = ""
    return(result)

def setPrompt(pprompt,ragFlag):
    log.debug("### setPrompt")
    userPrompt = ""
    return userPrompt


def on_submitButton_clicked(b):
    log.debug("### on_submitButton_clicked")
    setPrompt("","")
    runLLM(prompt)
    

######################################################################
# MAINLINE
#
logger.info("#### MAINLINE ENTERED.")

systemTextArea = st.empty()
userTextArea = st.empty()
ragPromptTextArea = st.empty()
responseTextArea = st.empty()
selectRag = st.checkbox("Enable Query With RAG",value=False,key="selectRag",help=None,on_change=None,args=None,kwargs=None,disabled=False,label_visibility="visible")
submitButton = st.button("Run LLM",key=None,help=None,on_click=on_submitButton_clicked,args=None,kwargs=None,type="secondary",disabled=False,use_container_width=False)

#logger.info("\n### Before calling submitButton.on_click().")
#submitButton.on_click(on_submitButton_clicked)