Skip to main content

SchoginiAI

SchoginiAI is a robust AI toolkit developed by Schogini Systems, providing advanced Retrieval-Augmented Generation (RAG) capabilities. It leverages the power of LangChain, OpenAI, and multiple vector storage options like FAISS, ChromaDB, and Pinecone. This makes it a versatile tool for building AI-driven solutions for various applications.


🚀 Features

  • PDF & Text Processing: Extracts knowledge from PDF files or raw text for vector storage.
  • Flexible Vector Stores: Supports FAISS, ChromaDB, and Pinecone for vector management.
  • Advanced Text Chunking: Includes configurable chunking strategies like RecursiveCharacterTextSplitter and TokenTextSplitter.
  • Environment-Based Configurations: Manages API keys and settings securely using .env files.
  • RAG Capabilities: Combines vector retrieval with OpenAI’s LLMs for generating relevant, context-aware responses.

🛠 Installation

From PyPI

Install SchoginiAI directly from PyPI:

pip install SchoginiAI

From Source

Clone the repository and install locally:

git clone https://github.com/yourusername/SchoginiAI.git
cd SchoginiAI
pip install .

Replace yourusername with your GitHub username.


🔧 Configuration

Environment Variables

Create a .env file to securely store your API keys:

OPENAI_API_KEY=your_openai_api_key
PINECONE_API_KEY=your_pinecone_api_key

Custom Settings

Edit the settings.py file to configure the following options:

  • Vector Store Type: Choose between faiss, chroma, or pinecone.
  • Text Splitter Strategy: Select chunking strategies like RecursiveCharacterTextSplitter or TokenTextSplitter.
  • Chunk Size and Overlap: Control the size and overlap of text chunks.

Example settings.py snippet:

vector_store_type = "chroma"  # Options: 'faiss', 'chroma', 'pinecone'
text_splitter_strategy = "RecursiveCharacterTextSplitter"
chunk_size = 1000
chunk_overlap = 200

📚 Usage

Build Vector Store from Text

from SchoginiAI import SchoginiAIRAG

rag_ai = SchoginiAIRAG()

sample_text = """
Schogini Systems is a pioneer in AI Chatbots.
We specialize in automation solutions for small businesses.
"""

rag_ai.build_vector_store(sample_text)
rag_ai.save_vector_store()

Query the Vector Store

from SchoginiAI import SchoginiAIRAG

rag_ai = SchoginiAIRAG()
rag_ai.load_vector_store()

response = rag_ai.ask_question("What services does Schogini Systems provide?")
print("Response:", response)

Build Vector Store from PDF

from SchoginiAI import SchoginiAIRAG

rag_ai = SchoginiAIRAG()
rag_ai.build_vector_store_from_pdf("path/to/your/pdf_file.pdf")
rag_ai.save_vector_store()

🐳 Docker Usage

Build Docker Image

docker build --no-cache -t schoginiai .

Run Docker Commands

Create Vector Store

  • Using FAISS:

    docker run --rm -e OPENAI_API_KEY="your_openai_api_key" -e PINECONE_API_KEY="your_pinecone_api_key" schoginiai create
    
  • Using ChromaDB:

    docker run --rm -e OPENAI_API_KEY="your_openai_api_key" -e PINECONE_API_KEY="your_pinecone_api_key" schoginiai create
    

Query Vector Store

  • Using FAISS:

    docker run --rm -e OPENAI_API_KEY="your_openai_api_key" -e PINECONE_API_KEY="your_pinecone_api_key" schoginiai query
    
  • Using ChromaDB:

    docker run --rm -e OPENAI_API_KEY="your_openai_api_key" -e PINECONE_API_KEY="your_pinecone_api_key" schoginiai query
    

Replace "your_openai_api_key" and "your_pinecone_api_key" with your actual keys.


🗃 Project Structure

SchoginiAI/
├── SchoginiAI/
│   ├── __init__.py
│   └── main.py
├── examples/
│   ├── usage_example.py
│   ├── knowledge_creation.py
│   └── .env
├── tests/
│   ├── test_faiss.py
│   ├── test_chroma.py
├── settings.py
├── README.md
├── requirements.txt
├── Dockerfile
├── doit.sh
└── setup.py

📦 Dependencies

SchoginiAI relies on the following Python packages:

  • langchain>=0.0.200
  • openai>=0.28.1
  • faiss-cpu>=1.7.6
  • chromadb>=0.3.22
  • python-dotenv>=0.21.0

Install these dependencies using:

pip install -r requirements.txt

🛡 License

This project is licensed under the MIT License.


📚 Additional Resources


With this setup, SchoginiAI is ready to handle advanced AI-driven tasks with ease and flexibility. For more details, refer to the source code or open an issue in the repository.

Metadata

Release files for SchoginiAI 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for SchoginiAI 0.2.4
File Size Uploaded
schoginiai-0.2.4.tar.gz 11.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for SchoginiAI 0.2.4
File Interpreter ABI Platform
SchoginiAI-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 19.9 kB

Release files / schoginiai-0.2.4.tar.gz

Download URL schoginiai-0.2.4.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d463f98cd25c4534b6a97855dfc3a0b714e8eff47fc13cda4c8e071c1f735a57
BLAKE2b-256 checksum
How to use checksums
5c9eda0cd27241ce02319ac62793a8c73d47251926bfd7edc4d5dae0453da80d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.11

Release files / SchoginiAI-0.2.4-py3-none-any.whl

Download URL SchoginiAI-0.2.4-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8abb3fdbe1b5c7d4423d56376ef28d799ccd998b243ff1a2817366b7c5043aa7
BLAKE2b-256 checksum
How to use checksums
1dee0b60841181ec50d7fe64b50b44f12d83023009468d47b47cc8feb4acd1e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.11

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page