Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions examples/llm_and_rule/llm_and_rule.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from dingo.exec import Executor
from dingo.io import InputArgs

input_data = {
"input_path": "../../test/data/test_local_jsonl.jsonl", # local filesystem dataset
"save_data": True,
"save_correct": True,
"dataset": "local",
"data_format": "jsonl",
"column_content": "content",
"custom_config":
{
"rule_list": ["RuleColonEnd"],
"prompt_list": ["PromptRepeat"],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

llm 的 prompt 我记得都是以 LLM 或者 VLM 开头的吧?这个为什么不是

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prompt不做区分,场景才区分

"llm_config":
{
"LLMTextQualityPromptBase":
{
"key": "enter your key, such as:EMPTY",
"api_url": "enter your local llm api url, such as:http://127.0.0.1:8080/v1",
}
}
},
"log_level": "INFO"
}
input_args = InputArgs(**input_data)
executor = Executor.exec_map["local"](input_args)
result = executor.execute()
print(result)
File renamed without changes.
File renamed without changes.