semvec/pypi-packages huggingface dataset:
oneapi2langchain 0.0.102
langchain实现的闭源模型统一API
License: MIT
Requires Python: >=3.10,<4.0

# LangChain 实现闭源大模型的统一

本项目的目的是将闭源大模型，如科大星火 文心一言 通义千问等闭源大模型进行Langchain的实现，即继承了langchain的BaseChatModel的实现。

（仓库初步构建，欢迎贡献源码。）

## 背景

随着AIGC的快速发展，市面上出现了越来越多的大模型，其中包括开源大模型如qwen，baichuan,chatglm等，开源的模型已经有很好社区来支持openai格式的API接口，之所以使用openai格式的API接口，很重要的一个因素是可以轻松的使用langchain(目前最流行)。但是闭源大模型由于接口不统一，导致很难使用langchain提供的生态，因为我才有想法构建本项目。

## 支持的闭源模型

* [X] 讯飞星火
* [X] 文心一言
* [ ] 通义千问
* [ ] 百川

## 安装(要用官方源，国内源可能同步更新不及时)

```sh
pip install oneapi2langchain -i https://pypi.org/simple/
```

## 示例代码

```python

from oneapi2langchain import ChatSpark  # 完全支持langchain
from dotenv import load_dotenv  # 加载 APP_ID 等配置
load_dotenv()

if __name__ == "__main__":
  
    llm = ChatSpark()
    # # 测试 string  ok
    ret = llm.predict("你是谁",stop=['科大讯飞'])
    print(ret)
    # 测试 message  ok
    # ret = llm.predict_messages([ChatMessage(role="user",content="你是谁")])
    # print(ret)
    # 测试 invoke  ok
    # ret = llm.invoke("你是谁")
    # print(ret)
    # 测试流式
    # for i in llm.stream("你是谁"):
    #     print(i)


```

## 致谢

**[spark-ai-python](https://github.com/iflytek/spark-ai-python)    参考并引用**

**[langchain](https://github.com/langchain-ai/langchain)    参考并引用**
sri-checker 0.1.1
a linter and pre-commit hook to check SRI-hashes in HTML files
License: MIT
Requires Python: >=3.9

[![ci](https://github.com/jkittner/sri-checker/actions/workflows/ci.yml/badge.svg)](https://github.com/jkittner/sri-checker/actions/workflows/ci.yml)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/jkittner/sri-checker/main.svg)](https://results.pre-commit.ci/latest/github/jkittner/sri-checker/main)

# sri-checker

A code formatter to add double indentation to function and method definitions.

## Installation

`pip install sri-checker`

## usage

```console
usage: sri-checker [-h] [filenames ...]

positional arguments:
  filenames

options:
  -h, --help  show this help message and exit
```

## pre-commit hook

See [pre-commit](https://pre-commit.com) for instructions

Sample `.pre-commit-config.yaml`:

```yaml
- repo: https://github.com/jkittner/sri-checker
  rev: 0.1.1
  hooks:
    - id: sri-checker
```

**If you are using public CDNs in any of your html-files and [pre-commit.ci](https://pre-commit.ci), you have to add this section to your `.pre-commit-config.yaml` since there is no access to the internet during setup or runtime in pre-commit.ci**

```yaml
ci:
  skip: [sri-checker]
```

## Example

With an html-file `base.html`:

```html
<link
  href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"
  rel="stylesheet"
  integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
  crossorigin="anonymous"
/>
```

```bash
sri-checker base.html
```

This will return an error end exit with `1`.

```console
base.html:1 SRI-hash incorrect
expected: sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN
got: sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL

```

Contents can also be passed via stdin:

```bash
cat base.html | sri-checker -
```
afrinet-automation 0.0.1
Cloud Automation for All Platforms - Streamline and optimize your cloud operations with our comprehensive cloud automation solutions. Whether on AWS, Azure, Google Cloud, or other platforms, our tools empower you to automate tasks, enhance efficiency, and ensure seamless management of your cloud infrastructure.
License: MIT

In the rapidly evolving landscape of cloud computing, effective management and orchestration of resources across diverse cloud platforms are imperative. Our Cloud Automation solution is designed to provide a unified and comprehensive approach to automate processes, workflows, and tasks across various cloud environments, including but not limited to AWS, Azure, Google Cloud, and more.
verifyshopify 0.1.7
This module provides a utility function to verify the authenticity of data received from Shopify webhooks. It uses HMAC (Hash-based Message Authentication Code) with SHA-256 hashing to ensure that the data has not been tampered with in transit.
License: MIT
Requires Python: >=3.9,<4.0

# Shopify Webhook Verification
This module provides a utility function to verify the authenticity of data received from Shopify webhooks. It uses HMAC (Hash-based Message Authentication Code) with SHA-256 hashing to ensure that the data has not been tampered with in transit.

## Function Description
verify is a function that computes an HMAC for the given data and compares it with the HMAC provided in the Shopify webhook header. It's designed to be a robust and secure way to validate the integrity and authenticity of the data received from Shopify.

### Arguments
- **data_bytes** (bytes): The raw data for which the HMAC is being verified.
- **shared_secret** (Union[bytes, bytearray]): The secret key used for HMAC generation.
- **hmac_sha256** (AnyStr): The base64 encoded HMAC string received in the Shopify webhook header.

### Returns
bool: Returns True if the HMAC matches, False otherwise.

### Installation
No specific installation steps required, just ensure you have Python 3.x installed.

### Usage
Here's a basic usage example:
```python
# The raw data received from Shopify
raw_data_as_bytes = request.data  # Replace with actual request data

# The HMAC header received from Shopify
hmac_sha256 = request.headers.get("X-Shopify-Hmac-Sha256")  # Replace with actual header

# The secret key provided by Shopify
shared_secret = "your_shared_secret_here".encode("utf-8")

# Perform verification
verified = verify(
    data_bytes=raw_data_as_bytes,
    hmac_sha256=hmac_sha256,
    shared_secret=shared_secret,
)

if verified:
    print("Verification successful!")
else:
    print("Verification failed!")
```
### Logging
The function uses Python's built-in logging to report its status and errors. You can configure the logging level as per your requirement.

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