hamtaa-texttools 1.1.16__py3-none-any.whl → 1.2.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.2.0.dist-info/METADATA +212 -0
- hamtaa_texttools-1.2.0.dist-info/RECORD +34 -0
- texttools/__init__.py +5 -5
- texttools/batch/__init__.py +0 -0
- texttools/batch/{batch_config.py → config.py} +16 -2
- texttools/batch/{internals/batch_manager.py → manager.py} +2 -2
- texttools/batch/{batch_runner.py → runner.py} +80 -69
- texttools/core/__init__.py +0 -0
- texttools/core/engine.py +254 -0
- texttools/core/exceptions.py +22 -0
- texttools/core/internal_models.py +58 -0
- texttools/core/operators/async_operator.py +194 -0
- texttools/core/operators/sync_operator.py +192 -0
- texttools/models.py +88 -0
- texttools/prompts/categorize.yaml +36 -77
- texttools/prompts/check_fact.yaml +24 -0
- texttools/prompts/extract_entities.yaml +7 -3
- texttools/prompts/extract_keywords.yaml +21 -9
- texttools/prompts/is_question.yaml +6 -2
- texttools/prompts/merge_questions.yaml +12 -5
- texttools/prompts/propositionize.yaml +24 -0
- texttools/prompts/rewrite.yaml +9 -10
- texttools/prompts/run_custom.yaml +2 -2
- texttools/prompts/subject_to_question.yaml +7 -3
- texttools/prompts/summarize.yaml +6 -2
- texttools/prompts/text_to_question.yaml +12 -6
- texttools/prompts/translate.yaml +7 -2
- texttools/py.typed +0 -0
- texttools/tools/__init__.py +0 -0
- texttools/tools/async_tools.py +778 -489
- texttools/tools/sync_tools.py +775 -487
- hamtaa_texttools-1.1.16.dist-info/METADATA +0 -255
- hamtaa_texttools-1.1.16.dist-info/RECORD +0 -31
- texttools/batch/internals/utils.py +0 -16
- texttools/prompts/README.md +0 -35
- texttools/prompts/detect_entity.yaml +0 -22
- texttools/tools/internals/async_operator.py +0 -200
- texttools/tools/internals/formatters.py +0 -24
- texttools/tools/internals/models.py +0 -183
- texttools/tools/internals/operator_utils.py +0 -54
- texttools/tools/internals/prompt_loader.py +0 -56
- texttools/tools/internals/sync_operator.py +0 -201
- {hamtaa_texttools-1.1.16.dist-info → hamtaa_texttools-1.2.0.dist-info}/WHEEL +0 -0
- {hamtaa_texttools-1.1.16.dist-info → hamtaa_texttools-1.2.0.dist-info}/licenses/LICENSE +0 -0
- {hamtaa_texttools-1.1.16.dist-info → hamtaa_texttools-1.2.0.dist-info}/top_level.txt +0 -0
|
@@ -3,13 +3,16 @@ main_template: |
|
|
|
3
3
|
Given the following subject, generate {number_of_questions} appropriate questions that this subject would directly respond to.
|
|
4
4
|
The generated subject should be independently meaningful,
|
|
5
5
|
and it must not mention any verbs like, this, that, he or she and etc. in the question.
|
|
6
|
+
|
|
6
7
|
There is a `reason` key, fill that up with a summerized version of your thoughts.
|
|
7
8
|
The `reason` must be less than 20 words.
|
|
8
9
|
Don't forget to fill the reason.
|
|
10
|
+
|
|
9
11
|
Respond only in JSON format:
|
|
10
12
|
{{"result": ["question1", "question2", ...], "reason": "string"}}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
|
|
14
|
+
Here is the subject:
|
|
15
|
+
{text}
|
|
13
16
|
|
|
14
17
|
analyze_template: |
|
|
15
18
|
Our goal is to generate questions from the given subject.
|
|
@@ -18,5 +21,6 @@ analyze_template: |
|
|
|
18
21
|
We need a summerized analysis of the subject.
|
|
19
22
|
What is the subject about?
|
|
20
23
|
What point of views can we see and generate questoins from it? (Questions that real users might have.)
|
|
24
|
+
|
|
21
25
|
Here is the subject:
|
|
22
|
-
{
|
|
26
|
+
{text}
|
texttools/prompts/summarize.yaml
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
main_template: |
|
|
2
2
|
You are a summarizer.
|
|
3
3
|
You must summarize the given text, preserving its meaning.
|
|
4
|
+
|
|
4
5
|
Respond only in JSON format:
|
|
5
6
|
{{"result": "string"}}
|
|
7
|
+
|
|
6
8
|
Provide a concise summary of the following text:
|
|
7
|
-
{
|
|
9
|
+
{text}
|
|
8
10
|
|
|
9
11
|
|
|
10
12
|
analyze_template: |
|
|
11
13
|
Read the following text and identify its main points, key arguments, and overall purpose.
|
|
12
14
|
Provide a brief, summarized analysis that will help in generating an accurate and concise summary.
|
|
13
|
-
|
|
15
|
+
|
|
16
|
+
Here is the text:
|
|
17
|
+
{text}
|
|
14
18
|
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
main_template: |
|
|
2
2
|
You are a question generator.
|
|
3
|
-
Given the following answer, generate
|
|
4
|
-
appropriate question that this answer would directly respond to.
|
|
3
|
+
Given the following answer, generate {number_of_questions} appropriate questions that this answer would directly respond to.
|
|
5
4
|
The generated answer should be independently meaningful,
|
|
6
5
|
and not mentioning any verbs like, this, that, he or she on the question.
|
|
6
|
+
|
|
7
|
+
There is a `reason` key, fill that up with a summerized version of your thoughts.
|
|
8
|
+
The `reason` must be less than 20 words.
|
|
9
|
+
Don't forget to fill the reason.
|
|
10
|
+
|
|
7
11
|
Respond only in JSON format:
|
|
8
|
-
{{"result": "string"}}
|
|
12
|
+
{{"result": ["question1", "question2", ...], "reason": "string"}}
|
|
13
|
+
|
|
9
14
|
Here is the answer:
|
|
10
|
-
{
|
|
15
|
+
{text}
|
|
11
16
|
|
|
12
17
|
analyze_template: |
|
|
13
18
|
Analyze the following answer to identify its key facts,
|
|
14
19
|
main subject, and what kind of information it provides.
|
|
15
20
|
Provide a brief, summarized understanding of the answer's content that will
|
|
16
|
-
help in formulating
|
|
21
|
+
help in formulating relevant and direct questions.
|
|
17
22
|
Just mention the keypoints that was provided in the answer
|
|
23
|
+
|
|
18
24
|
Here is the answer:
|
|
19
|
-
{
|
|
25
|
+
{text}
|
|
20
26
|
|
texttools/prompts/translate.yaml
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
main_template: |
|
|
2
2
|
You are a {target_language} translator.
|
|
3
3
|
Output only the translated text.
|
|
4
|
+
|
|
4
5
|
Respond only in JSON format:
|
|
5
6
|
{{"result": "string"}}
|
|
7
|
+
|
|
6
8
|
Don't translate proper name, only transliterate them to {target_language}
|
|
9
|
+
|
|
7
10
|
Translate the following text to {target_language}:
|
|
8
|
-
{
|
|
11
|
+
{text}
|
|
9
12
|
|
|
10
13
|
analyze_template: |
|
|
11
14
|
Analyze the following text and identify important linguistic considerations for translation.
|
|
12
15
|
Point out any idioms, cultural references, or complex structures that need special attention.
|
|
13
16
|
Also, list all proper nouns that should not be translated. Write your analysis in the {target_language}.
|
|
14
|
-
|
|
17
|
+
|
|
18
|
+
Here is the text:
|
|
19
|
+
{text}
|
|
15
20
|
|
texttools/py.typed
ADDED
|
File without changes
|
|
File without changes
|