Commit a31046e1 by blackirfan

Initial commit

parents
# Python-generated files
__pycache__/
*.py[oc]
build/
dist/
wheels/
*.egg-info
# Virtual environments
.venv
{
"cells": [
{
"cell_type": "markdown",
"id": "c87bf196",
"metadata": {},
"source": [
"Introduction to Data Ingestion"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "d2917c49",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"from typing import List, Dict, Any\n",
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "5a55f7a9",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"d:\\RagProject\\.venv\\lib\\site-packages\\tqdm\\auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
" from .autonotebook import tqdm as notebook_tqdm\n"
]
}
],
"source": [
"from langchain_core.documents import Document\n",
"from langchain_text_splitters import RecursiveCharacterTextSplitter, CharacterTextSplitter, TokenTextSplitter\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "cd5b00e1",
"metadata": {},
"outputs": [],
"source": [
"doc = Document(\n",
" page_content=\"This is the main text content that will be embedded and searched.\",\n",
" metadata={\n",
" \"source\": \"example.txt\",\n",
" \"page\": 1,\n",
" \"author\": \"Krish Naik\",\n",
" \"date_created\": \"2024-01-01\",\n",
" \"custom_field\": \"any_value\"\n",
" }\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "d763dbf7",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"langchain_core.documents.base.Document"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"type(doc)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "RagProject",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.0"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
def main():
print("Hello from ragproject!")
if __name__ == "__main__":
main()
[project]
name = "ragproject"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"chromadb>=1.4.0",
"faiss-cpu>=1.13.2",
"ipykernel>=7.1.0",
"langchain>=1.2.0",
"langchain-community>=0.4.1",
"langchain-groq>=1.1.1",
"langchain-openai>=1.1.6",
"pandas>=2.3.3",
"pypdf>=6.5.0",
"python-dotenv>=1.2.1",
"sentence-transformers>=5.2.0",
"tiktoken>=0.12.0",
]
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment