Using Keys in langchain or langgraph projects Try setting the keys in your environmental variables If the key is project specific, we use python-dotenv Using python-dot env add this package uv add python-dotenv Create a file called as .env Now add the following snippet from dotenv import
Tag: Generativeai
Gen-AI Developer Classroom notes 18/Oct/2025
SQL Alchmey Engine: Database connector & Execution engine In addition to sqlalachemy wwe will be installing driver Connection URL mysql: “ Session Connection Defining entities/models Here we define a class for a table python-dotenv lets add this package uv add python-dotenv Create a file called as .env in the root folder SQL Alchemy to store… Continue reading Gen-AI Developer Classroom notes 18/Oct/2025
Gen-AI Developer Classroom notes 18/Oct/2025
Programmatic LLM Interaction setup Lets create a new folder and cd into it mkdir basic cd basic Now execute the following command uv init . Lets execute the following command to get the virtual environment uv sync # mac or linux source .venv/bin/activate # windows .venv/Scripts/activate Now launch visual studio code code . Ensure the… Continue reading Gen-AI Developer Classroom notes 18/Oct/2025
Gen-AI Developer Classroom notes 16/Oct/2025
Architectures cont AI Agents Usecase: whenever hr recieves an email with resume attached and subject with pattern, screen the resume and if score is good process to next phase i.e. schedule interview Technical details: LLM SDKs: Open AI Gemini Tools: We need LLMs with tool calling Optionally: MCP Frameworks: Langgraph CrewAI Agentic AI Usecase: We… Continue reading Gen-AI Developer Classroom notes 16/Oct/2025
Gen-AI Developer Classroom notes 15/Oct/2025
AI Application Layers Application Layer is about using models + infra to solve enterprise usecases. Architectures Foundational Model interaction + Prompting Usecase: You are an content generator, You want to review the content from gramatical mistakes and ensuring the content is SEO friendly Technical details: LLM SDKs: Open AI Gemini Classic RAG Usecase: I have… Continue reading Gen-AI Developer Classroom notes 15/Oct/2025
Gen-AI Developer Classroom notes 14/Oct/2025
AI Engineering Statistical language model: They use tokens and they have access to vocabulary. This is a language model which can do majorly two types of things Fill in the blanks: Masked language model Kids were ___ on the ground predict next word: Autoregressive language model kids were screaming loud in the classroom and then… Continue reading Gen-AI Developer Classroom notes 14/Oct/2025
Gen-AI Developer Classroom notes 12/Oct/2025
Lambda Refer Here for lambda Lambda is an anonymous function map filter reduce Comprehensions Python supports list set dict range Refer Here for comprehensions list comprehensions note: use this prompt in any llm to get problems to solve As a expert in python, i’m trying to learn list comprehensions give me excercises from basic to… Continue reading Gen-AI Developer Classroom notes 12/Oct/2025
Gen-AI Developer Classroom notes 11/Oct/2025
UV Refer Here for uv installation Creating python projects using uv and adding dependencies create a directory mkdir library_management cd library_management create a project using command uv init –package . unit testing – pytest Lets add pytest to the project After activating virtual environment pip install pytest with uv uv add –dev pytest Creating a… Continue reading Gen-AI Developer Classroom notes 11/Oct/2025
Gen-AI Developer Classroom notes 09/Oct/2025
Virtual environment creation using pip Virtual environments help in creating project specific environments The basic command to create a virtual environment is python -m venv <folder> to activate virtual environment windows <folder>\Scripts\activate mac/linux source <folder>/bin/activate pip is the package manager of python pip install <package-name> When we share our code (commit code into repos) we… Continue reading Gen-AI Developer Classroom notes 09/Oct/2025
Gen-AI Developer Classroom notes 08/Oct/2025
Python Projects A python project can be used in two ways executable: This is your application cli desktop application When hosted on web: website web api library: These are reusable assets. Libraries are from three sources standard library: Available once we install python community library: Refer Here custom library: We creating a reusable Packages in… Continue reading Gen-AI Developer Classroom notes 08/Oct/2025
Generative Developer Classroom Notes – 07/Oct/2025
Gen-AI Developer Classroom notes 06/Oct/2025
Object Oriented Programming An object can be anything with contents capabilities Examples Bank Account contents number name bank info contact info balance capabilities: withdraw transfer Car Contents: engine seats make capabilities: commute drive Contents become members and capabilities become methods (functions) In python class BankAccount: def withdraw(amount: int): pass def transfer(amount: int, to: BankAccount): pass… Continue reading Gen-AI Developer Classroom notes 06/Oct/2025
Gen-AI Developer Classroom notes 28/Sep/2025
Debugging in vscode CLI Applications Create a launch.json file with arguments Argparse contd Refer Here for the changes Refer Here for argument support added Refer Here for help added subparsers Complete the advance calculator Refer Here
Gen-AI Developer Classroom notes 26/Sep/2025
Generators in python Refer Here for generator and iterator Refer Here where we have implemented a generator for even numbers Exercise: Create a generator for files in Downloads (or any folder) greater than 5mb Create a generator for prime numbers between range (start, end) CLI Application Approach 1: using sys Refer Here for code Approach… Continue reading Gen-AI Developer Classroom notes 26/Sep/2025
Gen-AI Developer Classroom notes 24/Sep/2025
Python Standard Library Python comes with the notion of batteries included which means along with python installation we get decent amount of resuable modules Refer Here for official documentation on standard library Builtin functions Builtin constants os module & sys Playaround with os and sys Try # Write a program and find all the files… Continue reading Gen-AI Developer Classroom notes 24/Sep/2025
Gen-AI Developer Classroom notes 23/Sep/2025
Python modules A module is a python file generally ending with .py Create a new folder and create two files executable.py library.py Generally executable is a program which we run and libraries are also programs which will have reusable stuff. To execute a program use python <filename>.py To use functions from module into another you… Continue reading Gen-AI Developer Classroom notes 23/Sep/2025
Gen-AI Developer Classroom notes 21/Sep/2025
lists contd.. Matrices using list in python we have a library (not part of standard installation of python) called as Numpy which is widely used for matrix operations. dictionary Refer Here for samples dictionary is mutable syntax for empty dictionary x = dict() x = {} with values marks = { ‘maths’: 100, ‘science’: 89,… Continue reading Gen-AI Developer Classroom notes 21/Sep/2025
Gen-AI Developer Classroom notes 20/Sep/2025
Sequence Datatypes list, tuple, set, frozenset list: equivalent to array of any type. This is mutable lists are represented in [] tuple: equivalent to array of any type. This is immuatable tuples are represented in () Accessing sequence types: positive index negative index List methods Refer Here For loop Refer Here Set
Gen-AI Developer Classroom notes 18/Sep/2025
Python contd Operators Refer Here for operators and Refer Here for operator precendence Project euler 5 def lcm(start:int =1, end:int =10) -> int: """Lcm of a sequence Args: start (int, optional): start value. Defaults to 1. end (int, optional): end value. Defaults to 10. Returns: int: lcm """ factor = end * (end -1) max… Continue reading Gen-AI Developer Classroom notes 18/Sep/2025
Gen-AI Developer Classroom notes 17/Sep/2025
python contd Lets solve Project Euler 3 def is_prime(number:int) -> bool: """Checks if the number is prime or not Args: number (int): number Returns: bool: True if prime False otherwise """ if number < 2: return False result = True index = 2 while index <= number // 2: if number % index == 0:… Continue reading Gen-AI Developer Classroom notes 17/Sep/2025
