Easy-GABRIEL
An easier way for social science researchers to use OpenAI-GABRIEL.
Why Built it?
OpenAI-GABRIEL is cool, but it is a little difficult for researchers who are not familiar with Python, especially when using Non-OpenAI models. Also, as of now, the official project only has a README and a Jupyter file to demonstrate how to use it, lacking a proper documentation. Therefore, I aim to provide a simpler way to use it from the third-part model providers like DeepSeek and so on.
How to Use?
Install
You can use uv or pip install this project:
uv add easy-gabriel
# or, if you do not prefer uv, using pip
pip install easy-gabriel
Use in Python
In order to minimize migration cost, you could refer the following code:
import os
import pandas as pd
from easy_gabriel import EasyGABRIEL, init_gabriel, run_gabriel
gabriel: EasyGABRIEL = init_gabriel(
api_key=os.getenv("DEEPSEEK_API_KEY"),
base_url="https://api.deepseek.com/v1",
model="deepseek-chat",
response="openai", # it is means the model is adapted to OpenAI API format.
)
# Then, all the action is same as the official package.
# For example, if we want to use gabriel.rate
df: pd.DataFrame # your dataset
attributes: dict[str, str] # your attributes config
gabriel_func = gabriel.rate(
df,
column_name="your_col_name",
attributes=attributes,
save_dir="./output",
model="deepseek-chat", # if you are not set model, it would be used by previous setting in init_gabriel()
)
result: pd.DataFrame = run_gabriel(gabriel_func)
Metadata
Release files for easy-gabriel 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| easy_gabriel-0.1.0.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| easy_gabriel-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.9 kB
Release files / easy_gabriel-0.1.0.tar.gz
| Download URL | easy_gabriel-0.1.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
978fb3664725c35cb61562bab1e9528be98d8b8dd90d2e6152040fea3104b26e
|
|
BLAKE2b-256 checksum How to use checksums |
f291d09a1061dc1a84b2ce14442b0d5f3827ace99297cd1ba749f70415a1957a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / easy_gabriel-0.1.0-py3-none-any.whl
| Download URL | easy_gabriel-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
964f66b145ab5ed31df8869222545211e470543738843f8d011af6c55ec25798
|
|
BLAKE2b-256 checksum How to use checksums |
5c1146e76090abddd7af096cd5ee921848a48095bcc80c5d5008521c20e457cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|