guinsoft_rags
Project description
桂软guinsoft_rags
打包为 whl
安装打包工具(若未安装)
- pip install setuptools wheel
打包(生成dist目录,内含新whl文件)
- python setup.py bdist_wheel
验证
安装新包
- pip install dist/guinsoft_rags-1.0.3-py3-none-any.whl
验证功能(如导入包并执行测试代码)
- python -c "import guinsoft_rags; print(guinsoft_rags.version)"
快速开始
安装包
pip install -e .
评分
import httpx
from datasets import Dataset
from langchain_openai import ChatOpenAI
from guinsoft_ragas import evaluate
from guinsoft_ragas.llms.langchain import LangchainLLM
from guinsoft_ragas.metrics import AnswerCorrectnessGuinsoft
data_samples = {
'question': ['When was the first super bowl?', 'Who won the most super bowls?'],
'answer': [
'The first superbowl was held on Jan 15, 1967',
'The most super bowls have been won by The New England Patriots',
],
'ground_truths': [
['The first superbowl was held on January 15, 1967.'],
['The New England Patriots have won the Super Bowl a record six times'],
],
}
_llm = ChatOpenAI(model="qwen3-max",
api_key="sk-xxxxx",
base_url="https://dashscope.aliyuncs.com/compatible-mode/v1",
temperature=temperature,
)
llm = LangchainLLM(_llm)
answer_correctness_guinsoft = AnswerCorrectnessGuinsoft(llm=llm)
dataset = Dataset.from_dict(data_samples)
score = evaluate(dataset, metrics=[answer_correctness_guinsoft])
print(score.to_pandas())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file guinsoft_rags-1.0.3-py3-none-any.whl.
File metadata
- Download URL: guinsoft_rags-1.0.3-py3-none-any.whl
- Upload date:
- Size: 77.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb072db0040a170788997882f7b38b9c7172e0d5bbdee491b5daa223d95ef0e3
|
|
| MD5 |
9f53bdd19dca7979aec746189352efbf
|
|
| BLAKE2b-256 |
ab75a5c2195291925d9ebffc605efcdef273d2c3bd4a0e9e94bff3d403a34fc4
|