semvec/pypi-packages huggingface dataset:
imgup 0.1.1
A CLI tool to upload image to imgbb.com
Requires Python: >=3.6

<p align="center">
  <a href="" rel="noopener">
 <img width=200px height=200px src="https://i.ibb.co.com/4dPHMNg/imgup.png" alt="imgup"></a>
</p>

<h3 align="center">IMGUP</h3>

<div align="center">

> pip install imgup

[![Status](https://img.shields.io/badge/status-active-success.svg)]()
[![GitHub Issues](https://img.shields.io/github/issues/decryptable/imgup.svg)](https://github.com/decryptable/imgup/issues)
[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/decryptable/imgup.svg)](https://github.com/decryptable/imgup/pulls)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE)

</div>

---

<p align="center"> IMGUP is a simple CLI tool for uploading images to imgbb with ease.
    <br> 
</p>

## 📝 Table of Contents

- [About](#about)
- [Getting Started](#getting_started)
- [Usage](#usage)
- [Built Using](#built_using)
- [Contributing](#contributing)
- [Authors](#authors)
- [Acknowledgments](#acknowledgement)

## 🧐 About <a name = "about"></a>

IMGUP is a command-line interface (CLI) tool designed to simplify image uploads to the imgbb image hosting service. It supports single and multiple file uploads, providing URLs of the hosted images after successful uploads.

## 🏁 Getting Started <a name = "getting_started"></a>

These instructions will guide you on how to set up and use IMGUP on your local machine.

### Prerequisites

Ensure you have Python 3.6 or newer installed.

```
pip install requests
```

### Installing

#### Install via pip (PyPI):

```bash
pip install imgup
```

#### Install from source:

1. Clone the repository:

   ```bash
   git clone https://github.com/decryptable/imgup.git
   ```

2. Navigate to the project directory:

   ```bash
   cd imgup
   ```

3. Install the package locally:
   ```bash
   pip install .
   ```

## 🎈 Usage <a name="usage"></a>

To upload a single image:

```bash
imgup /path/to/image.png
```

To upload multiple images:

```bash
imgup /path/to/image1.png /path/to/image2.png
```

Example output:

```plaintext
Total of 2 file paths and URLs
Uploading...
Uploading 1/2
Uploading 2/2
Output URLs:
https://i.ibb.co.com/tcnKMN8/1733997716.png
https://i.ibb.co.com/zHcswJN/typora-icon-png.png
```

## ⛏️ Built Using <a name = "built_using"></a>

- [Python](https://www.python.org/) - Programming Language
- [Requests](https://docs.python-requests.org/en/latest/) - HTTP Library

## ✍️ Authors <a name = "authors"></a>

- [@decryptable](https://github.com/decryptable) - Creator & Maintainer

See also the list of [contributors](https://github.com/decryptable/imgup/contributors) who participated in this project.

## 🎉 Acknowledgements <a name = "acknowledgement"></a>

- Inspiration from similar CLI tools
- Special thanks to the imgbb API team for their service
openai-wds-chat 0.1.0
A flexible OpenAI API wrapper with multi-role support and context management
Requires Python: >=3.8

# OpenAI Assistant 类说明文档

## 概述

`OpenAIAssistant` 类提供了一个封装的接口来与OpenAI的API进行交互，支持多角色对话、上下文管理、对话历史存储等功能。该类继承自`LLMBase`抽象基类，提供了统一的接口规范，便于扩展其他大语言模型的实现。

## 主要功能

- 多角色对话：支持多种预定义角色，如专业助手、创意助手、代码助手等
- 上下文管理：自动维护对话上下文，支持上下文长度限制
- 对话历史：将对话历史保存到JSON文件，支持查询历史对话
- 配置管理：支持通过配置文件和环境变量管理API密钥等设置
- 错误处理：内置重试机制和错误处理
- 可扩展性：基于抽象基类设计，便于扩展其他模型

## 核心方法介绍

### 构造函数

```python
def __init__(self, config_path: str = "config/config.json")
```

- **简介**：初始化OpenAI Assistant实例
- **参数**：
  - `config_path`：配置文件路径，默认为"config/config.json"
- **功能**：
  - 加载配置文件
  - 初始化OpenAI客户端
  - 设置对话上下文管理
  - 配置对话轮数限制

### 聊天方法

```python
def chat(self, user_id: str, message: str, role_type: Optional[str] = None) -> Dict[str, Any]
```

- **简介**：处理用户消息并返回AI响应
- **参数**：
  - `user_id`：用户标识符
  - `message`：用户消息内容
  - `role_type`：可选的角色类型
- **返回值**：包含响应内容、时间戳和当前角色的字典
- **功能**：
  - 维护对话上下文
  - 自动截断过长对话
  - 保存对话历史
  - 支持角色切换

### 角色管理

```python
def set_role(self, role_type: str) -> bool
def get_current_role(self) -> str
def list_available_roles(self) -> List[str]
```

- **简介**：管理AI助手的角色
- **功能**：
  - 切换当前角色
  - 获取当前角色
  - 列出所有可用角色

### 上下文管理

```python
def clear_context(self, user_id: str) -> None
def get_current_context(self, user_id: str) -> Optional[List[Dict]]
def get_context_summary(self, user_id: str) -> Dict[str, Any]
```

- **简介**：管理对话上下文
- **功能**：
  - 清除指定用户的上下文
  - 获取当前上下文
  - 获取上下文摘要信息

## 配置文件说明

配置文件(config.json)包含以下主要部分：

```json
{
    "openai": {
        "api_key": "${OPENAI_API_KEY}",
        "base_url": "https://api.chatanywhere.tech",
        "model": "gpt-3.5-turbo",
        "temperature": 0.7,
        "max_tokens": 1000
    },
    "storage": {
        "conversations_path": "data/conversations.json",
        "prompts_path": "data/prompts.json"
    },
    "conversation": {
        "max_turns": 10,
        "truncate_mode": "sliding"
    }
}
```

## 使用示例

```python
from src.assistants.openai_assistant import OpenAIAssistant

# 初始化助手
assistant = OpenAIAssistant()

# 发送消息
response = assistant.chat("user123", "你好")
print(response["response"])

# 切换角色
assistant.set_role("professional")
response = assistant.chat("user123", "解释量子力学")

# 查看上下文信息
context_summary = assistant.get_context_summary("user123")
print(context_summary)
```

## 注意事项

1. **API密钥**：确保在.env文件中设置了正确的OPENAI_API_KEY
2. **存储路径**：确保data目录存在且有写入权限
3. **角色定义**：在prompts.json中定义新的角色提示词
4. **上下文限制**：注意设置合适的max_turns以避免token超限
5. **错误处理**：建议实现适当的错误处理机制

## 扩展开发

要实现新的LLM模型支持，需要：

1. 继承LLMBase抽象基类
2. 实现所有��象方法
3. 在配置文件中添加相应配置
4. 确保实现了必要的错误处理和重试机制

## 依赖要求

```text
openai>=1.0.0
pydantic>=2.0.0
python-dotenv>=0.19.0
tenacity>=8.0.0
``` # openai-wds
brewify 0.1.6
A Python library for interacting with various APIs including Google Search, IMDb, and Discord.
Requires Python: >=3.6
Keywords: discord, utility, socials, info, api, wrapper

# Brewify

![Brew](https://images-ext-1.discordapp.net/external/qG41hZHbsmNVc9WSE6aX3oVWi_LP39dQZjxZgdIdFLI/%3Fsize%3D1024/https/cdn.discordapp.com/avatars/1076140187471593492/bfea312390b3b52773f1358457d7261b.png?format=webp&quality=lossless&width=427&height=427)

Brewify is a Python library that provides a simple interface to interact
with various APIs, including Google Search, IMDb, Discord, and more. It
is designed to be easy to use while allowing you to extend its
functionality.

## Features

-   **API Requests**: Make GET requests to various endpoints.
-   **Error Handling**: Custom exceptions for better error management.
-   **Multiple Services**: Access Google Images, IMDb, Discord, and
    more.
-   **Sentiment Analysis**: Analyze the sentiment of text.
-   **Chatbot Functionality**: Engage in simple conversations.
-   **Joke Generator**: Get a random joke.

## Installation

You can install Brewify via pip:

``` bash
pip install brewify
```

## Usage

**Initialize the Brewify Class**

To get started, initialize the [Brewify]{.title-ref} class with your API
key:

``` python
from brewify import Brewify

brewify = Brewify("YOUR_API_KEY")
```

**Example Methods**

*Get Google Images*

``` python
image_response = brewify.get_google_image(query="cats")
print(image_response.link)
```

*Search Google*

``` python
text_response = brewify.search_google(query="Python programming")
print(text_response.title, text_response.link, text_response.snippet)
```

*IMDb Search*

``` python
imdb_response = brewify.imdb_search(query="Inception")
print(imdb_response.plot)
```

*Discord Guild Search*

``` python
guild_response = brewify.discord_guild_search(invite_code="your_invite_code")
print(guild_response.id)
```

*Sentiment Analysis*

``` python
sentiment_response = brewify.sentiment_analysis(sentence="I love Python!")
print(sentiment_response.negative, sentiment_response.positive, sentiment_response.neutral)
```

*Get a Joke*

``` python
joke_response = brewify.joke()
print(f"{joke_response.setup} {joke_response.punchline}")
```

## Error Handling

Brewify raises a custom exception called [Brexception]{.title-ref} for
handling errors. You can catch it as follows:

``` python
try:
    brewify.some_method()
except Brexception as e:
    print(f"An error occurred: {e}")
```

## Contributing

Contributions are welcome! Feel free to submit a pull request or open an
issue.

## License

This project is licensed under the MIT License - see the
[LICENSE] file for details.

## Acknowledgments

-   Thanks to the developers of the APIs used in this library.
-   Special thanks to [FastAPI](https://fastapi.tiangolo.com/) for
    making API development a breeze.
piiscanner 0.1.3
A library for scanning Personally Identifiable Information (PII).
Requires Python: >=3.10

# PII Scanner

A library for scanning Personally Identifiable Information (PII) from text.

## Installation

```bash
pip install pii_scanner
```

## Usage 

```bash
from pii_scanner.scanner import PIIScanner

# Create an instance of the scanner
pii_scanner = PIIScanner()

# Sample data containing PII
data = [
    "Ankit Gupta",
    "Lucknow",
    "+9191840562195",
    "Indian",
    "Sofia Rossi",
    "Rome",
    "+390612345678",
    "Italian"
]

# Scan the structured data
results = pii_scanner.scan(data=data, chunk_size=10, sample_size=1.0)

# Print the results
print(results)

```


## Output 

```bash
[
    {
        "text": "Ankit Gupta",
        "entity_detected": [
            {"type": "PERSON", "start": 0, "end": 11, "score": 0.85}
        ]
    },
    {
        "text": "Rome",
        "entity_detected": [
            {"type": "LOCATION", "start": 0, "end": 4, "score": 0.85}
        ]
    },
    {
        "text": "+919140562195",
        "entity_detected": [
            {"type": "PHONE_NUMBER", "start": 0, "end": 13, "score": 0.85}
        ]
    },
    {
        "text": "Sofia Rossi",
        "entity_detected": [
            {"type": "PERSON", "start": 0, "end": 11, "score": 0.85}
        ]
    },
    {
        "text": "Indian",
        "entity_detected": [
            {"type": "NATIONALITY", "start": 0, "end": 6, "score": 0.9}
        ]
    }
]


```
pyqrlew 0.9.27
A library to manipulate SQL queries, designed with privacy application in mind.
Requires Python: >=3.9
Keywords: SQL, Privecy, Differential Privacy, AST, Intermediate Representation, Rust

[![Pyqrlew](https://github.com/Qrlew/pyqrlew/actions/workflows/ci.yml/badge.svg)](https://github.com/Qrlew/pyqrlew/actions)
![PyPI](https://img.shields.io/pypi/v/pyqrlew)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyqrlew)
![Discord](https://img.shields.io/discord/1194338163989172364?logo=Discord)
![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/sarus_tech)
# [Pyqrlew](https://pyqrlew.github.io/) Python bindings library (by [Sarus](https://www.sarus.tech/))

[Pyqrlew](https://pypi.org/project/pyqrlew/) is documented [here](https://pyqrlew.readthedocs.io/en/latest/)

Read the general [Qrlew](https://qrlew.github.io/) documentation on [qrlew.readthedocs.io](https://qrlew.readthedocs.io/en/latest/).

Learn more about [Sarus Technologies](https://sarus.tech/).