Spaces:
Sleeping
Sleeping
import streamlit as st | |
def params(): | |
submit_button = st.button("Start Scheming") | |
# API Key | |
access_key: str = st.text_input("Enter your gpt key here", type="password") | |
st.markdown( | |
"*For more information about how to get an access key, read [this article](https://platform.openai.com/api-keys). Make sure it has money in it ☠️*", | |
unsafe_allow_html=True, | |
) | |
# Chat History | |
remember_chat_history = st.toggle("Remember This Chat's History") | |
# Temperature | |
temperature = st.slider( | |
label="Creativity of Model", min_value=0.0, max_value=2.0, value=0.8 | |
) | |
st.markdown("*High creativity will make it go crazy - keep it low*") | |
# Number of Samples | |
num_samples = st.slider( | |
label="Amount of References to Give to Model", | |
min_value=1, | |
max_value=20, | |
value=10, | |
) | |
st.markdown( | |
"*High amount will make it slow and expensive (and may not be relevant) - keep it low*" | |
) | |
# GPT Type | |
gpt_type: str = st.selectbox( | |
label="Choose GPT Type", | |
options=[ | |
"gpt-3.5-turbo", | |
"gpt-3.5-turbo-1106", | |
"gpt-3.5-turbo-0125", | |
"gpt-4-32k-0613", | |
"gpt-4-0125-preview", | |
"gpt-4-turbo", | |
], | |
index=0, | |
) | |
st.markdown( | |
"*For more information about GPT types, read [this article](https://platform.openai.com/docs/models).*", | |
unsafe_allow_html=True, | |
) | |
st.subheader("What is Groovy-GPT?") | |
st.write( | |
"Groovy-GPT is a RAG (Retrieval-Augmented Generation) model that uses ChromaDB to retrieve relevant documents and then uses OpenAI's models to generate a response." | |
) | |
st.write( | |
"The model is trained on the MIT Scheme textbook and a handful of Discrete Math and Paradigms related content that Professor Troeger posted" | |
) | |
return ( | |
submit_button, | |
remember_chat_history, | |
temperature, | |
num_samples, | |
access_key, | |
gpt_type, | |
) | |