semvec/pypi-packages huggingface dataset:
tnsaai-client 1.0.1
A powerful, OpenAI-compatible Python SDK for TNSA NGen3 Pro and Lite Models
License: MIT
Requires Python: >=3.8
Keywords: ai, api, tnsa, ngen3, llm, chat, completion

# TNSAAI Python Client

A powerful, OpenAI-compatible Python SDK for TNSA NGen3 Pro and Lite Models.

## Installation

```bash
pip install tnsaai-client
```

## Quick Start

```python
from tnsaai import TNSA

# Initialize the client
client = TNSA(api_key="your-api-key", base_url="https://api.tnsaai.com")

# Create a chat completion
response = client.chat.create(
    model="NGen3.9-Pro",
    messages=[{"role": "user", "content": "Hello!"}]
)

print(response.choices[0].message.content)
```

## Streaming

```python
stream = client.chat.create(
    model="NGen3.9-Lite",
    messages=[{"role": "user", "content": "Tell me a story"}],
    stream=True
)

for chunk in stream:
    if chunk.content:
        print(chunk.content, end="")
```

## Async Usage

```python
import asyncio
from tnsaai import AsyncTNSA

async def main():
    async with AsyncTNSA(api_key="your-api-key") as client:
        response = await client.chat.create(
            model="NGen3.9-Pro",
            messages=[{"role": "user", "content": "Hello!"}]
        )
        print(response.choices[0].message.content)

asyncio.run(main())
```

## Available Models

- **NGen3.9-Pro** - High-performance model for complex tasks
- **NGen3.9-Lite** - Fast, efficient model for general use
- **Farmvaidya-Bot** - Agricultural domain-specific model

## Configuration

Set your API key as an environment variable:

```bash
export TNSA_API_KEY="your-api-key"
export TNSA_BASE_URL="https://api.tnsaai.com"
```

Or pass it directly:

```python
client = TNSA(
    api_key="your-api-key",
    base_url="https://api.tnsaai.com"
)
```

## Features

- ✅ OpenAI-compatible API
- ✅ Synchronous and asynchronous clients
- ✅ Streaming responses
- ✅ Comprehensive error handling
- ✅ Automatic retries with exponential backoff
- ✅ Usage tracking and cost estimation
- ✅ Conversation management
- ✅ Type hints and IDE support

## Support

- Email: info@tnsaai.com
- Documentation: https://docs.tnsaai.com
- Issues: https://github.com/tnsaai/tnsaai-python/issues
pyCollier 0.3.3
access COLLIER loop functions via python
License: MIT
Requires Python: <4,>=3.6


# pyCollier

[![pipeline status](https://gitlab.com/anybsm/pycollier/badges/master/pipeline.svg)](https://gitlab.com/anybsm/pycollier/commits/master) 
[![coverage report](https://gitlab.com/anybsm/pycollier/badges/master/coverage.svg)](https://gitlab.com/anybsm/pycollier/commits/master)

Python interface for [COLLIER Fortran library](https://collier.hepforge.org/). Not all COLLIER functions are available yet. Please [open an issue](https://gitlab.com/anybsm/pycollier/-/issues) if you want any specific function to be implemented.

### The pyCollier team

pyCollier is developed by Henning Bahl, Johannes Braathen, Martin Gabelmann, and Georg Weiglein.

## Installation

Go to main directory and type
```bash
pip install .
```

## Usage

After installation, you should be able to load `pyCollier` via
```python
import pyCollier
```
Then you can calculate loop functions e.g. via
```python
pyCollier.A0(125**2)
```

## API documentation

A detailed API documentation is available [here](https://anybsm.gitlab.io/pycollier).

## Dockerimage
To build a docker image run the following from within the repositories root directory:
```bash
docker build -t pycollier .
```
Example usage: 
```bash
docker run --rm pycollier python -c 'from pyCollier import c0; print(c0(0,0,0,1,1,1))'
```

## References

Please cite 
```
@article{Denner:2016kdg,
    author = "Denner, Ansgar and Dittmaier, Stefan and Hofer, Lars",
    title = "{Collier: a fortran-based Complex One-Loop LIbrary in Extended Regularizations}",
    eprint = "1604.06792",
    archivePrefix = "arXiv",
    primaryClass = "hep-ph",
    reportNumber = "FR-PHENO-2016-003, ICCUB-16-016",
    doi = "10.1016/j.cpc.2016.10.013",
    journal = "Comput. Phys. Commun.",
    volume = "212",
    pages = "220--238",
    year = "2017"
}
```
when you use `pyCollier`.