semvec/pypi-packages huggingface dataset:
py-army-days 0.1.0
Add your description here
Requires Python: >=3.12

# Army Days (Python version)

## Overview

A command-line program to display the number of days until certain events. This program (hence its name) is also based on the West Point requirement that first year cadets have to be able to recite "the days". Part of that tradition is that if it is past noon at the time, you subtract a day but add "and a butt". As most people aren't concerned about being West Point style, this is an optional feature that can be enabled via a flag. Past events can optionally be displayed via configuration.

## Installing as a CLI Tool

For regular usage, it's useful to install the program using either [pipx](https://github.com/pypa/pipx) or [uv tool](https://docs.astral.sh/uv/guides/tools/#installing-tools).

## Development

This project uses [uv](https://github.com/astral-sh/uv) for dependency management and virtual environment management.

```shell
uv python install
uv sync
```

### Running tests

For basic tests with coverage:

```shell
uv run pytest --cov
```

And for tests with coverage and more verbose output also allowing stdout:

```shell
uv run pytest --cov -v -s
```

### Running the program

```shell
uv run army-days
```
mnnlibr 3.0.0
Module for using AI
Requires Python: >=3.7
Keywords: ai MNN chatgpt

# MNN AI

!!! Currently the api can only be tested via @mnnaibot

This repository contains an example of how to use the library to interact with the MNN API for image generation and text chat functionalities.

## Prerequisites

- Python 3.x
- MNNLib library installed. You can install it using pip:

```bash
pip install mnnai
```

## Usage
Image Generation
The following code demonstrates how to generate an image based on a prompt using the MNN API.

```python
from mnnai import MNN

client = MNN(
    key='MNN API KEY',
    id='MNN ID',
    # max_retries=2, 
    # timeout=60
)

response = client.Image_create(
    prompt="Draw a cute red panda",
    model='sdxl'
)

image_url = response['data'][0]['url']
print(image_url)
```

## Text Chat
The following code demonstrates how to create a chat session with the MNN API, both with streaming and without streaming.

**Streaming Chat**
```python
import asyncio

stream = client.async_chat_create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hi"}],
    stream=True,
    temperature=0.5
)

async def generate():
    async for chunk in stream:
        if 'result' in chunk:
            print(chunk['result'], end='')
        else:
            print(f"\n{chunk}")

asyncio.run(generate())
```

**Non-Streaming Chat**
```python
chat_completion = client.chat_create(
    messages=[
        {
            "role": "user",
            "content": "Hi",
        }
    ],
    model="gpt-4o",
)
print(chat_completion)
```

### Configuration
Replace the key and id parameters in the MNN client initialization with your own API key and user ID.
Adjust the prompt, model, and other parameters as needed for your specific use case.

### License
This project is licensed under the MIT License. See the LICENSE file for details.

### Discord 
https://discord.gg/Ku2haNjFvj