Author: Biswa Ranjan

Welcome to the Learning Hub!

Click a button below to start learning about Python or LangChain basics.

Python Basics

Variables

Variables store data values. In Python, you don't need to declare the type:

x = 5
name = "Alice"
pi = 3.14
print(x, name, pi)
      

Functions

Functions are blocks of code that run when called:

def greet(name):
    print("Hello,", name)

greet("Biswa")
      

Loops

Loops let you repeat code. Example with a for loop:

fruits = ["apple", "banana", "cherry"]
for fruit in fruits:
    print(fruit)
      

Lists

Lists store multiple items in one variable:

numbers = [1, 2, 3, 4]
print(numbers[2])  # Output: 3
      

More Resources

LangChain Basics

Introduction

LangChain is a Python framework for building applications powered by Large Language Models (LLMs) like GPT.

Installation

pip install langchain

Simple Example

from langchain.llms import OpenAI
llm = OpenAI()
response = llm("What is LangChain?")
print(response)
      

Use Cases

More Resources