hamtaa-texttools 1.3.2__py3-none-any.whl → 2.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hamtaa_texttools-1.3.2.dist-info → hamtaa_texttools-2.1.0.dist-info}/METADATA +40 -47
- hamtaa_texttools-2.1.0.dist-info/RECORD +30 -0
- {hamtaa_texttools-1.3.2.dist-info → hamtaa_texttools-2.1.0.dist-info}/WHEEL +1 -1
- {hamtaa_texttools-1.3.2.dist-info → hamtaa_texttools-2.1.0.dist-info}/licenses/LICENSE +1 -1
- texttools/__init__.py +1 -1
- texttools/core/internal_models.py +16 -7
- texttools/core/operators/async_operator.py +10 -16
- texttools/core/operators/sync_operator.py +10 -16
- texttools/core/utils.py +260 -0
- texttools/models.py +77 -22
- texttools/prompts/{rewrite.yaml → augment.yaml} +3 -3
- texttools/prompts/categorize.yaml +7 -8
- texttools/prompts/extract_entities.yaml +2 -2
- texttools/prompts/extract_keywords.yaml +4 -2
- texttools/prompts/{check_fact.yaml → is_fact.yaml} +5 -4
- texttools/prompts/is_question.yaml +1 -1
- texttools/prompts/merge_questions.yaml +8 -6
- texttools/prompts/propositionize.yaml +11 -7
- texttools/prompts/run_custom.yaml +3 -1
- texttools/prompts/summarize.yaml +3 -3
- texttools/prompts/to_question.yaml +60 -0
- texttools/prompts/translate.yaml +4 -4
- texttools/tools/async_tools.py +152 -169
- texttools/tools/sync_tools.py +138 -150
- hamtaa_texttools-1.3.2.dist-info/RECORD +0 -31
- texttools/core/engine.py +0 -262
- texttools/prompts/subject_to_question.yaml +0 -26
- texttools/prompts/text_to_question.yaml +0 -26
- {hamtaa_texttools-1.3.2.dist-info → hamtaa_texttools-2.1.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
main_template:
|
|
2
|
+
|
|
3
|
+
from_text: |
|
|
4
|
+
You are a question generator.
|
|
5
|
+
Given the following answer, generate {number_of_questions} appropriate questions that this answer would directly respond to.
|
|
6
|
+
The generated answer should be independently meaningful,
|
|
7
|
+
and must not mention any verbs like this, that, he or she in the question.
|
|
8
|
+
|
|
9
|
+
There is a `reason` key, fill that up with a summerized version of your thoughts.
|
|
10
|
+
The `reason` must be less than 20 words.
|
|
11
|
+
Don't forget to fill the reason.
|
|
12
|
+
|
|
13
|
+
Respond only in JSON format:
|
|
14
|
+
{{"result": ["question1", "question2", ...], "reason": "explanation"}}
|
|
15
|
+
|
|
16
|
+
Here is the answer:
|
|
17
|
+
{text}
|
|
18
|
+
|
|
19
|
+
from_subject: |
|
|
20
|
+
You are a question from subject generator.
|
|
21
|
+
Given the following subject, generate {number_of_questions} appropriate questions that this subject would directly respond to.
|
|
22
|
+
The generated subject should be independently meaningful,
|
|
23
|
+
and must not mention any verbs like this, that, he or she in the question.
|
|
24
|
+
|
|
25
|
+
There is a `reason` key, fill that up with a summerized version of your thoughts.
|
|
26
|
+
The `reason` must be less than 20 words.
|
|
27
|
+
Don't forget to fill the reason.
|
|
28
|
+
|
|
29
|
+
Respond only in JSON format:
|
|
30
|
+
{{"result": ["question1", "question2", ...], "reason": "explanation"}}
|
|
31
|
+
|
|
32
|
+
Here is the subject:
|
|
33
|
+
{text}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
analyze_template:
|
|
37
|
+
|
|
38
|
+
from_text: |
|
|
39
|
+
Analyze the following answer to identify its key facts,
|
|
40
|
+
main subject, and what kind of information it provides.
|
|
41
|
+
Provide a brief, summarized understanding of the answer's content that will
|
|
42
|
+
help in formulating relevant and direct questions.
|
|
43
|
+
Just mention the keypoints that was provided in the answer
|
|
44
|
+
|
|
45
|
+
Here is the answer:
|
|
46
|
+
{text}
|
|
47
|
+
|
|
48
|
+
from_subject: |
|
|
49
|
+
The task is to generate questions from the given subject.
|
|
50
|
+
The questions must be meaningfull, some of them should be specific and some should be general.
|
|
51
|
+
To improve this process you must analyze the subject.
|
|
52
|
+
Your analysis must be summerized.
|
|
53
|
+
|
|
54
|
+
Mention:
|
|
55
|
+
- What is the subject about?
|
|
56
|
+
- Which points of the subject have potential for generating questoins?
|
|
57
|
+
|
|
58
|
+
Here is the subject:
|
|
59
|
+
{text}
|
|
60
|
+
|
texttools/prompts/translate.yaml
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
main_template: |
|
|
2
|
-
You are a {
|
|
2
|
+
You are a {target_lang} translator.
|
|
3
3
|
Output only the translated text.
|
|
4
4
|
|
|
5
5
|
Respond only in JSON format:
|
|
6
6
|
{{"result": "string"}}
|
|
7
7
|
|
|
8
|
-
Don't translate proper name, only transliterate them to {
|
|
8
|
+
Don't translate proper name, only transliterate them to {target_lang}
|
|
9
9
|
|
|
10
|
-
Translate the following text to {
|
|
10
|
+
Translate the following text to {target_lang}:
|
|
11
11
|
{text}
|
|
12
12
|
|
|
13
13
|
analyze_template: |
|
|
14
14
|
Analyze the following text and identify important linguistic considerations for translation.
|
|
15
15
|
Point out any idioms, cultural references, or complex structures that need special attention.
|
|
16
|
-
Also, list all proper nouns that should not be translated. Write your analysis in the {
|
|
16
|
+
Also, list all proper nouns that should not be translated. Write your analysis in the {target_lang}.
|
|
17
17
|
|
|
18
18
|
Here is the text:
|
|
19
19
|
{text}
|