Code Monkey home page Code Monkey logo

aws-genai-breakroom's Introduction

Text-to-SQL demo using AWS Bedrock and Anthropic Claude V2 APIs.

The AWS Bedrock contains the publisher endpoints for Anthropic Claude V2 model, which is a large language model (LLMs) that generate text and code in response to natural language prompts.

Setup

Create a config.py in the config folder with the following environment variables:
openai_api_key = "" API key from OpenAI
service_account = "" #Cloud SQL service account
database_version="MYSQL_8_0"
cpu=2
memory="8GB"
storage_size="10GB"
db_user = ""
db_name = ""
bucket = "gs://" # bucket for storing MySQL dump file
project_id=""
region=""
instance_name="" # Instance name \

Loading example dataset into database -

Use the mysql-database-setup.ipynb notebook to set up the database environment with config options above. This notebook does the following:

  1. Download MySQL dump file from MySQL Public Tutorial
  2. Create Cloud Storage bucket and RDS instance
  3. Import MySQL dump file into RDS instance

Database Schema

This is a very common example relational structure for a retail company alt text

bedrock-anthropic-claudev2-text-to-sql: Use Text-to-SQL Generative AI to build an end-to-end application.

bedrock-langchain-anthropic-claudev2-text-to-sql.ipynb: Integrating Bedrock API with Langchain get questions/answers from our database.

LangChain is a framework for developing applications powered by language models. It enables applications that are:

  • Data-aware: connect a language model to other sources of data
  • Agentic: allow a language model to interact with its environment

aws-genai-breakroom's People

Contributors

jared-burns avatar rajanbhave avatar

Watchers

 avatar

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.