Git Product home page Git Product logo

snowchat's Introduction

snowChat 💬❄️

Streamlit OpenAI Snowflake Supabase AWS Langchain

Streamlit App

156shots_so

snowChat is an intuitive and user-friendly application that allows users to interact with their Snowflake data using natural language queries. Type in your questions or requests, and SnowChat will generate the appropriate SQL query and return the data you need. No more complex SQL queries or digging through tables - SnowChat makes it easy to access your data! By bringing data one step closer, SnowChat empowers users to make data-driven decisions faster and more efficiently, reducing the barriers between users and the insights they seek.

Supported LLM's

  • GPT-3.5-turbo-0125
  • CodeLlama-70B
  • Mistral Medium

snowchat_showoff.mp4

🌟 Features

  • Conversational AI: Harnesses ChatGPT to translate natural language into precise SQL queries.
  • Conversational Memory: Retains context for interactive, dynamic responses.
  • Snowflake Integration: Offers seamless, real-time data insights straight from your Snowflake database.
  • Self-healing SQL: Proactively suggests solutions for SQL errors, streamlining data access.
  • Interactive User Interface: Transforms data querying into an engaging conversation, complete with a chat reset option.

🛠️ Installation

  1. Clone this repository: git clone https://github.com/yourusername/snowchat.git

  2. Install the required packages: cd snowchat pip install -r requirements.txt

  3. Set up your OPENAI_API_KEY, ACCOUNT, USER_NAME, PASSWORD, ROLE, DATABASE, SCHEMA, WAREHOUSE, SUPABASE_URL , SUPABASE_SERVICE_KEY and REPLICATE_API_TOKEN in project directory secrets.toml.

  4. Make you're schemas and store them in docs folder that matches you're database.

  5. Create supabase extention, table and function from the supabase/scripts.sql.

  6. Run python ingest.py to get convert to embeddings and store as an index file.

  7. Run the Streamlit app to start chatting: streamlit run main.py

🚀 Additional Enhancements

  1. Platform Integration: Connect snowChat with popular communication platforms like Slack or Discord for seamless interaction.
  2. Voice Integration: Implement voice recognition and text-to-speech functionality to make the chatbot more interactive and user-friendly.
  3. Advanced Analytics: Integrate with popular data visualization libraries like Plotly or Matplotlib to generate interactive visualizations based on the user's queries (AutoGPT).

Star History

[Star History Chart]

🤝 Contributing

Feel free to contribute to this project by submitting a pull request or opening an issue. Your feedback and suggestions are greatly appreciated!

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

snowchat's People

Contributors

kaarthik108 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

snowchat's Issues

Intallation Build

I am facing a problem setting up the environment mainly in step 4 of the installation guide, can someone guide what to do specifically there?

Best way to generate schema docs from snowflake

Make you're schemas and store them in docs folder that matches you're database.

In above mentioned step, are we expected manually get(copy) the schema definitions of all tables and views from the database or there is an automated or quicker way to download all schemas with a single click from snowflake?

LICENSE?

Hey @kaarthik108 Can you please add a LICENSE.md file?

Is this able to be used commercially?

Thanks!

You're != Your

Come on folks !
"Chat on YOUR snowflake database - Text to SQL" !

database and schema name not updated

Hello,

I noticed that every time I change the name of the database and schema in secrets.toml and files in doc folder, it does not get updated in the subsequent generated queries - the queries continue to use the old database and schema. I tried clearing up the cache but it did not work. Any suggestions on how to work around this issue?

Thanks.

Documentation

Hey buddy! Amazing work. Kudos to this project.

Could you provide work flow information on how this is working (how you are stiching various things together here)?
Do you have a medium article explaining the logic of this project?

Also, Why are you using Supabase?
Really waiting to hear from you on this.

Feature: Use open source LLM

Is there a possibility that this could use open source LLM?
OpenAi costs money and there are open source LLM's out there

CF_ACCOUNT_TAG

Hi @kaarthik108 ,

In class ModelWrapper:
def init(self, config: ModelConfig):
account_tag = self.secrets["CF_ACCOUNT_TAG"]

It's asking for CF_ACCOUNT_TAG in secrets, however, I don't see in the description how to add this value. Can you provide more information for this?

Thanks.

[Feature Request] Support InternLM

Dear snowChat developer,

Greetings! I am vansinhu, a community developer and volunteer at InternLM. Your work has been immensely beneficial to me, and I believe it can be effectively utilized in InternLM as well. Welcome to add Discord https://discord.gg/gF9ezcmtM3 . I hope to get in touch with you.

Best regards,
vansinhu

python version should be claim in ReadMe

(base) yhtao@Yuhang-PC:/mnt/d/github_repo/snowChat$ pip install -r requirements.txt 
Looking in indexes: https://pypi.doubanio.com/simple/
Collecting langchain==0.0.220 (from -r requirements.txt (line 1))
  Using cached https://pypi.doubanio.com/packages/eb/69/3dc0b6cd9331f32f8d35b4240068dee05b55c5e7cda5e90d5481f504f742/langchain-0.0.220-py3-none-any.whl (1.2 MB)
Collecting pandas==1.5.0 (from -r requirements.txt (line 2))
  Using cached https://pypi.doubanio.com/packages/da/4a/a0c8d3ba8d875a25578bcb3032b6ac9b2db3d016b0a762ab41e1a13f3b52/pandas-1.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)
Collecting pydantic==1.10.8 (from -r requirements.txt (line 3))
  Using cached https://pypi.doubanio.com/packages/15/27/c35f6fefc782aebcff9991b28728f3855b1253ff757e6dee8e3ac3815cd0/pydantic-1.10.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB)
Collecting snowflake_snowpark_python==1.4.0 (from -r requirements.txt (line 4))
  Using cached https://pypi.doubanio.com/packages/d5/d0/e81975ff4dc49972356e06884bd15159452fff078d388a741e077b22d3b8/snowflake_snowpark_python-1.4.0-py3-none-any.whl (284 kB)
Requirement already satisfied: streamlit==1.22.0 in /home/yhtao/anaconda3/lib/python3.8/site-packages (from -r requirements.txt (line 6)) (1.22.0)
Collecting supabase==1.0.3 (from -r requirements.txt (line 7))
  Downloading https://pypi.doubanio.com/packages/14/bd/d68c0bbe5e536993bdc1545c9942a732b42c2f470fc1430fc82116cfab1c/supabase-1.0.3-py3-none-any.whl (11 kB)
ERROR: Could not find a version that satisfies the requirement unstructured==0.7.12 (from versions: 0.0.1.dev0, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6.dev1, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.6, 0.4.7, 0.4.8, 0.4.9, 0.4.10, 0.4.11, 0.4.12, 0.4.13, 0.4.14, 0.4.15, 0.4.16, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.6, 0.5.7, 0.5.8, 0.5.9, 0.5.10, 0.5.11, 0.5.12, 0.5.13, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.6.7, 0.6.8, 0.6.9, 0.6.10, 0.6.11, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 0.7.6, 0.7.7, 0.7.8, 0.7.9, 0.7.10)

According to this blog the only reason in the scenario is my python==3.8.8 version is outdated for your requirements.txt, could you tell me the version you use in this repo?

Table not showing

Hi!

Are you supposed to first select a table from the side bar from the database you specify in secrets.toml file? Because for me, the options are still the default ones
image
And even if I query the default tables I don't get a table, and the code generated is not formatted like in the demo app:
image

What could've been wrong? Thanks so much!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.