Skip to content

Commit

Permalink
Included Private Preview models - Deepseek-R1
Browse files Browse the repository at this point in the history
  • Loading branch information
viveksrinivasanss committed Feb 7, 2025
1 parent f37a8ec commit e7c6df1
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ A dedicated section for constructing and deploying data pipelines and workflows
Before you begin, ensure you have met the following requirements:

- **Snowflake Account**: Ensure you have an active Snowflake account in a region where Cortex functionalities are supported. For detailed information, refer to the [Availability Region documentation](https://docs.snowflake.com/en/user-guide/snowflake-cortex/llm-functions#availability).
- **Private Preview Access**: To try private preview models in Snowflake, you need to contact your Snowflake account team to request access to the private preview feature.
- **Role Permissions**: ACCOUNTADMIN or equivalent role with permissions to create:
- Stages
- Databases
Expand Down
5 changes: 4 additions & 1 deletion src/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ def get_functionality_settings(functionality, config):
defaults = config["default_settings"]

if functionality == "Complete":
settings['model'] = st.selectbox("Change chatbot model:", defaults['model'])
is_private_preview_model_shown = st.checkbox("Show private preview models", value=False)
settings['model'] = st.selectbox("Change chatbot model:", defaults[
"private_preview_models" if is_private_preview_model_shown else "model"
])
settings['temperature'] = st.slider("Temperature:", defaults['temperature_min'], defaults['temperature_max'], defaults['temperature'])
settings['max_tokens'] = st.slider("Max Tokens:", defaults['max_tokens_min'], defaults['max_tokens_max'], defaults['max_tokens'])
settings['guardrails'] = st.checkbox("Enable Guardrails", value=defaults['guardrails'])
Expand Down
5 changes: 4 additions & 1 deletion src/playground.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ def get_functionality_settings(functionality, config):
defaults = config["default_settings"]

if functionality == "Complete":
settings['model'] = st.selectbox("Change chatbot model:", defaults['model'])
is_private_preview_model_shown = st.checkbox("Show private preview models", value=False)
settings['model'] = st.selectbox("Change chatbot model:", defaults[
"private_preview_models" if is_private_preview_model_shown else "model"
])
settings['temperature'] = st.slider("Temperature:", defaults['temperature_min'], defaults['temperature_max'], defaults['temperature'])
settings['max_tokens'] = st.slider("Max Tokens:", defaults['max_tokens_min'], defaults['max_tokens_max'], defaults['max_tokens'])
settings['guardrails'] = st.checkbox("Enable Guardrails", value=defaults['guardrails'])
Expand Down
8 changes: 7 additions & 1 deletion src/rag.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
with open(config_path, "r") as f:
config = json.load(f)

settings = {}
defaults = config["default_settings"]

def display_rag(session):
"""
Displays the Retrieval-Augmented Generation (RAG) interface in Streamlit.
Expand Down Expand Up @@ -134,9 +137,12 @@ def display_rag(session):
selected_column = st.selectbox("Select Column", ["Vector_Embeddings"])
#st.subheader("Select Model, Embedding Type and Emdedding Model")
st.info("Use the same embedding type and model consistently when creating embeddings.")
is_private_preview_model_shown = st.checkbox("Show private preview models", value=False)
col1,col2,col3 = st.columns(3)
with col1:
selected_model = st.selectbox("Select Model", config["default_settings"]["model"])
selected_model = st.selectbox("Select Model", config["default_settings"][
"private_preview_models" if is_private_preview_model_shown else "model"
])
with col2:
embedding_type = st.selectbox("Select Embeddings", config["default_settings"]["embeddings"].keys())
with col3:
Expand Down
1 change: 1 addition & 0 deletions src/settings_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"mixtral-8x7b", "reka-core", "reka-flash", "snowflake-arctic"
],
"fine_tune_models" : ["llama3-8b","llama3-70b","llama3.1-8b","llama3.1-70b","mistral-7b","mixtral-8x7b"],
"private_preview_models": ["deepseek-r1"],
"temperature_min": 0.0,
"temperature_max": 1.0,
"temperature": 0.7,
Expand Down

0 comments on commit e7c6df1

Please sign in to comment.