This repository shows you how to build an LLM using Snowflake's API.
Screenshot 2025年03月07日 at 12 04 05 AM-
Clone this repo.
-
Sign up for an account here. Activate your account and you should see a welcome screen.
-
Go to
Projects->Worksheets-> ClickCreate SQL Worksheet -
Copy and paste the entire setup.sql into the worksheet and hit run. It might take a couple of minutes for Step 9 to finish! You should see the following response:
Stage area MODELS successfully created. -
Go to
Data->Add Data-> ClickLoad files into a Stage. -
Upload the
sales_metrics_model.yamlfile. Make sure to selectSALES_INTELLIGENCE.DATAas your database + schema andMODELSas your 'Stage'.
-
Create a folder called
.streamlitand a file calledsecrets.tomlinside. -
Click on your name in the bottom left corner, and select
Connect a tool to Snowflake. Use the dialog to fill out your information, replacing values in[]like so:
[snowflake]
account = "[Account Identifier]"
user = "[User Name]"
password = "[Same as when you signed up. Be careful here and don't check this in to GitHub!"
role = "[Role]"
host = "[Account/Server URL]"
-
Run
pip install -r requirements.txtto make sure you have all the dependencies working. -
Run
streamlit run streamlit.appand you should see a chat assistant ready to work with you! Try a few prompts:
- "What was the total sales volume last year?" should output a SQL query and an interpretation of your request.
- "Summarize the call with TechCorp Inc" should give you a summary of the call transcript.