Skip to content

Commit 2db36ff

Browse files
authored
feat: update readme and fix cli start web (#70)
* feat: update readme and fix cli start web * feat: all branch check
1 parent bb54bdd commit 2db36ff

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

.github/workflows/IntegrationTest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ name: Python application
55

66
on:
77
push:
8-
branches: [ "main", "dev" ]
8+
branches: [ "*" ]
99
pull_request:
10-
branches: [ "main", "dev" ]
10+
branches: [ "*" ]
1111
workflow_dispatch:
1212

1313

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,22 +61,22 @@ pip install dingo-python
6161
from dingo.config.config import DynamicLLMConfig
6262
from dingo.io.input.MetaData import MetaData
6363
from dingo.model.llm.llm_text_quality_model_base import LLMTextQualityModelBase
64-
from dingo.model.prompt.prompt_common import PromptRepeat
6564
from dingo.model.rule.rule_common import RuleEnterAndSpace
6665

6766

6867
def llm():
69-
LLMTextQualityModelBase.prompt = PromptRepeat()
68+
data = MetaData(
69+
data_id='123',
70+
prompt="hello, introduce the world",
71+
content="Hello! The world is a vast and diverse place, full of wonders, cultures, and incredible natural beauty."
72+
)
73+
7074
LLMTextQualityModelBase.dynamic_config = DynamicLLMConfig(
7175
key='',
7276
api_url='',
7377
# model='',
7478
)
75-
res = LLMTextQualityModelBase.eval(MetaData(
76-
data_id='123',
77-
prompt="hello, introduce the world",
78-
content="Hello! The world is a vast and diverse place, full of wonders, cultures, and incredible natural beauty."
79-
))
79+
res = LLMTextQualityModelBase.eval(data)
8080
print(res)
8181

8282

@@ -86,6 +86,7 @@ def rule():
8686
prompt="hello, introduce the world",
8787
content="Hello! The world is a vast and diverse place, full of wonders, cultures, and incredible natural beauty."
8888
)
89+
8990
res = RuleEnterAndSpace().eval(data)
9091
print(res)
9192
```

README_zh-CN.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,22 +61,22 @@ pip install dingo-python
6161
from dingo.config.config import DynamicLLMConfig
6262
from dingo.io.input.MetaData import MetaData
6363
from dingo.model.llm.llm_text_quality_model_base import LLMTextQualityModelBase
64-
from dingo.model.prompt.prompt_common import PromptRepeat
6564
from dingo.model.rule.rule_common import RuleEnterAndSpace
6665

6766

6867
def llm():
69-
LLMTextQualityModelBase.prompt = PromptRepeat()
68+
data = MetaData(
69+
data_id='123',
70+
prompt="hello, introduce the world",
71+
content="Hello! The world is a vast and diverse place, full of wonders, cultures, and incredible natural beauty."
72+
)
73+
7074
LLMTextQualityModelBase.dynamic_config = DynamicLLMConfig(
7175
key='',
7276
api_url='',
7377
# model='',
7478
)
75-
res = LLMTextQualityModelBase.eval(MetaData(
76-
data_id='123',
77-
prompt="hello, introduce the world",
78-
content="Hello! The world is a vast and diverse place, full of wonders, cultures, and incredible natural beauty."
79-
))
79+
res = LLMTextQualityModelBase.eval(data)
8080
print(res)
8181

8282

@@ -86,6 +86,7 @@ def rule():
8686
prompt="hello, introduce the world",
8787
content="Hello! The world is a vast and diverse place, full of wonders, cultures, and incredible natural beauty."
8888
)
89+
8990
res = RuleEnterAndSpace().eval(data)
9091
print(res)
9192
```

dingo/run/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,4 @@ def parse_args():
141141
print(result)
142142

143143
if input_args.save_data:
144-
os.system("python -m dingo.run.vsl --input " + result[0].output_path)
144+
os.system("python -m dingo.run.vsl --input " + result.output_path)

0 commit comments

Comments
 (0)