A flexible chatbot package with vector embeddings and prompt handling using Ollama and FAISS
Project description
mypackage_anshita
mypackage_anshita is a Python package built with Ollama models to provide:
- Prompt-based text generation using models like
gemma:2b,llama2, and others. - Vector-based document embedding and semantic search with FAISS.
- Flexibility to use different models for generation and embeddings.
Installation
Install the package via PyPI:
pip install mypackage-anshita```
##Features
PromptRunner: Run prompts on various Ollama models.
DocumentEmbedder: Embed documents and perform vector search.
Integration with Ollama, FAISS, and NumPy.
Supports multiple Ollama models, including Gemma and LLaMA2.
##Usage Example
Generate Text
```from mypackage_anshita import PromptRunner
runner = PromptRunner(model='gemma:2b')
response = runner.run_prompt("What is the theory of relativity?")
print(response)
from mypackage_anshita import DocumentEmbedder
docs = [
"Marie Curie won two Nobel Prizes.",
"Einstein created the theory of relativity."
]
embedder = DocumentEmbedder()
embedder.embed_text(docs)
results = embedder.search("radioactivity")
print(results)```
##Author
Anshita Bhatnagar
Built during internship using LangChain, Ollama, FAISS, and Streamlit.
##License
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mypackage_anshita-0.1.4.tar.gz.
File metadata
- Download URL: mypackage_anshita-0.1.4.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
211bf53c4245a40dc3c2a98eb848b2eebc0e7047dceca8fbbf8d0dbc6be053bf
|
|
| MD5 |
442fb2ef6f3bbe3aa891f17a7b17b6e7
|
|
| BLAKE2b-256 |
839bcef6c71d61f0e3e618c154d1ac3a7b72d0638edd0ff025be013ac4c7fea2
|
File details
Details for the file mypackage_anshita-0.1.4-py3-none-any.whl.
File metadata
- Download URL: mypackage_anshita-0.1.4-py3-none-any.whl
- Upload date:
- Size: 1.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8a2a4938b9a2f2a6ab4e6308eb10e273e9bf39ca213e947e6b2818b4befb10d
|
|
| MD5 |
ead551e39298445a8d51bce6147a100f
|
|
| BLAKE2b-256 |
04d90cf0d1a4376ce55642d4002f28a50b150eddadcedd816a4d64581c6f7507
|