Skip to content

Commit 9fafd9b

Browse files
committed
feat: use q/a type data.
1 parent 7946f5a commit 9fafd9b

File tree

3 files changed

+30
-6
lines changed

3 files changed

+30
-6
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,19 @@ def llm():
6767
api_url='',
6868
# model='',
6969
)
70-
res = DetectTextQualityDetail.call_api(MetaData(data_id='123', content="hello, introduce the world"))
70+
res = DetectTextQualityDetail.call_api(MetaData(
71+
data_id='123',
72+
prompt="hello, introduce the world",
73+
content="Hello! The world is a vast and diverse place, full of wonders, cultures, and incredible natural beauty."
74+
))
7175
print(res)
7276

7377
def rule():
74-
data = MetaData(data_id = '', content = "hello, introduce the world")
78+
data = MetaData(
79+
data_id='123',
80+
prompt="hello, introduce the world",
81+
content="Hello! The world is a vast and diverse place, full of wonders, cultures, and incredible natural beauty."
82+
)
7583
res = RuleEnterAndSpace().eval(data)
7684
print(res)
7785
```

README_zh-CN.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,19 @@ def llm():
5656
api_url='',
5757
# model='',
5858
)
59-
res = DetectTextQualityDetail.call_api(MetaData(data_id='123', content="hello, introduce the world"))
59+
res = DetectTextQualityDetail.call_api(MetaData(
60+
data_id='123',
61+
prompt="hello, introduce the world",
62+
content="Hello! The world is a vast and diverse place, full of wonders, cultures, and incredible natural beauty."
63+
))
6064
print(res)
6165

6266
def rule():
63-
data = MetaData(data_id = '', content = "hello, introduce the world")
67+
data = MetaData(
68+
data_id='123',
69+
prompt="hello, introduce the world",
70+
content="Hello! The world is a vast and diverse place, full of wonders, cultures, and incredible natural beauty."
71+
)
6472
res = RuleEnterAndSpace().eval(data)
6573
print(res)
6674
```

examples/core/score.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,19 @@ def llm():
1212
api_url='',
1313
# model='',
1414
)
15-
res = DetectTextQualityDetail.call_api(MetaData(data_id='123', content="hello, introduce the world"))
15+
res = DetectTextQualityDetail.call_api(MetaData(
16+
data_id='123',
17+
prompt="hello, introduce the world",
18+
content="Hello! The world is a vast and diverse place, full of wonders, cultures, and incredible natural beauty."
19+
))
1620
print(res)
1721

1822
def rule():
19-
data = MetaData(data_id = '', content = "hello, introduce the world")
23+
data = MetaData(
24+
data_id='123',
25+
prompt="hello, introduce the world",
26+
content="Hello! The world is a vast and diverse place, full of wonders, cultures, and incredible natural beauty."
27+
)
2028
res = RuleEnterAndSpace().eval(data)
2129
print(res)
2230

0 commit comments

Comments
 (0)