Metadata-Version: 2.4
Name: my-package-charu
Version: 0.0.7
Summary: Zunno package created by charu
Author-email: Charu Arora <charu@zunno.in>
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: requests
Requires-Dist: fastapi
Requires-Dist: uvicorn

# my_package_charu

`my_package_charu` is a custom Python package for interacting with large language models and generating vector embeddings using a locally running [Ollama](https://ollama.com/) instance. It includes:

- `Zunno`: A simple chat interface with LLMs (like Gemma:2b)
- `ZunnoEmbeddings`: Generate vector embeddings for any text using models like `nomic-embed-text`

## Installation

```bash
pip install my_package_charu
```

Make sure you have Ollama installed and running models like gemma:2b or nomic-embed-text
```bash
ollama pull gemma:2b
ollama pull nomic-embed-text
```

# Features
- Chat with any LLM using Ollama's HTTP API
- Generate embeddings using Ollama's embedding models
- Plug-and-play classes, easy to integrate into projects
- FastAPI endpoint for Swagger UI 

# Usage

## Chat with a Local LLM

```python
from my_package_charu import Zunno

z = Zunno(model_name="gemma:2b")
z.run()
```

## Generate Vector Embeddings

```python
from my_package_charu import ZunnoEmbeddings

ze = ZunnoEmbeddings()
embedding = ze.get_embedding(model_name="nomic-embed-text", text="hello world")
print(embedding[:5]) 
```


## Run FastAPI for Swagger UI
```bash
uvicorn zunno_embed_server:app --reload 
```

## open your browser and go to
`http://localhost:8000/docs`




