hamtaa-texttools 1.0.3__py3-none-any.whl → 1.0.5__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.
Potentially problematic release.
This version of hamtaa-texttools might be problematic. Click here for more details.
- {hamtaa_texttools-1.0.3.dist-info → hamtaa_texttools-1.0.5.dist-info}/METADATA +192 -141
- hamtaa_texttools-1.0.5.dist-info/RECORD +30 -0
- {hamtaa_texttools-1.0.3.dist-info → hamtaa_texttools-1.0.5.dist-info}/licenses/LICENSE +20 -20
- {hamtaa_texttools-1.0.3.dist-info → hamtaa_texttools-1.0.5.dist-info}/top_level.txt +0 -0
- texttools/__init__.py +9 -9
- texttools/batch/__init__.py +4 -4
- texttools/batch/batch_manager.py +240 -240
- texttools/batch/batch_runner.py +212 -212
- texttools/formatters/base_formatter.py +33 -33
- texttools/formatters/{user_merge_formatter/user_merge_formatter.py → user_merge_formatter.py} +30 -30
- texttools/prompts/README.md +31 -31
- texttools/prompts/categorizer.yaml +28 -31
- texttools/prompts/custom_tool.yaml +7 -0
- texttools/prompts/keyword_extractor.yaml +18 -14
- texttools/prompts/ner_extractor.yaml +20 -21
- texttools/prompts/question_detector.yaml +13 -14
- texttools/prompts/question_generator.yaml +19 -22
- texttools/prompts/question_merger.yaml +45 -48
- texttools/prompts/rewriter.yaml +111 -0
- texttools/prompts/subject_question_generator.yaml +22 -26
- texttools/prompts/summarizer.yaml +13 -11
- texttools/prompts/translator.yaml +14 -14
- texttools/tools/__init__.py +4 -4
- texttools/tools/async_the_tool.py +277 -263
- texttools/tools/internals/async_operator.py +297 -288
- texttools/tools/internals/operator.py +295 -306
- texttools/tools/internals/output_models.py +52 -62
- texttools/tools/internals/prompt_loader.py +76 -82
- texttools/tools/the_tool.py +501 -400
- hamtaa_texttools-1.0.3.dist-info/RECORD +0 -29
- texttools/prompts/question_rewriter.yaml +0 -46
- {hamtaa_texttools-1.0.3.dist-info → hamtaa_texttools-1.0.5.dist-info}/WHEEL +0 -0
|
@@ -1,31 +1,28 @@
|
|
|
1
|
-
main_template: |
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
بسیار خلاصه باشه خروجی تو
|
|
30
|
-
نهایتا 20 کلمه
|
|
31
|
-
{input}
|
|
1
|
+
main_template: |
|
|
2
|
+
تو یک متخصص علوم دینی هستی
|
|
3
|
+
من یک متن به تو میدهم و تو باید
|
|
4
|
+
آن متن را در یکی از دسته بندی های زیر طبقه بندی کنی
|
|
5
|
+
دسته بندی ها:
|
|
6
|
+
"باورهای دینی",
|
|
7
|
+
"اخلاق اسلامی",
|
|
8
|
+
"احکام و فقه",
|
|
9
|
+
"تاریخ اسلام و شخصیت ها",
|
|
10
|
+
"منابع دینی",
|
|
11
|
+
"دین و جامعه/سیاست",
|
|
12
|
+
"عرفان و معنویت",
|
|
13
|
+
"هیچکدام",
|
|
14
|
+
فقط با این فرمت json پاسخ بده:
|
|
15
|
+
{{
|
|
16
|
+
"reason": "<دلیل انتخابت رو به صورت خلاصه بگو>",
|
|
17
|
+
"result": "<یکی از دسته بندی ها>"
|
|
18
|
+
}}
|
|
19
|
+
متنی که باید طبقه بندی کنی:
|
|
20
|
+
{input}
|
|
21
|
+
|
|
22
|
+
analyze_template: |
|
|
23
|
+
ما میخواهیم متنی که داده می شود را طبقه بندی کنیم.
|
|
24
|
+
برای بهبود طبقه بندی، نیاز به آنالیز متن داریم.
|
|
25
|
+
متنی که داده می شود را آنالیز کن و ایده اصلی و آنالیزی کوتاه از آن را بنویس.
|
|
26
|
+
آنالیز باید بسیار خلاصه باشد
|
|
27
|
+
نهایتا 20 کلمه
|
|
28
|
+
{input}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
main_template: |
|
|
2
|
-
|
|
3
|
-
Extract the most relevant keywords from the
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
main_template: |
|
|
2
|
+
You are an expert keyword extractor.
|
|
3
|
+
Extract the most relevant keywords from the given text.
|
|
4
|
+
Guidelines:
|
|
5
|
+
1. Keywords must represent the main concepts of the text.
|
|
6
|
+
2. If two words have overlapping meanings, choose only one.
|
|
7
|
+
3. Do not include generic or unrelated words.
|
|
8
|
+
4. Keywords must be single, self-contained words (no phrases).
|
|
9
|
+
5. Output between 3 and 7 keywords based on the input length.
|
|
10
|
+
6. Respond only in JSON format:
|
|
11
|
+
{{"result": ["keyword1", "keyword2", etc.]}}
|
|
12
|
+
Here is the text:
|
|
13
|
+
{input}
|
|
14
|
+
|
|
15
|
+
analyze_template: |
|
|
16
|
+
Analyze the following text to identify its main topics, concepts, and important terms.
|
|
17
|
+
Provide a concise summary of your findings that will help in extracting relevant keywords.
|
|
18
|
+
{input}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
main_template: |
|
|
2
|
-
|
|
3
|
-
Identify and extract all named entities (e.g., PER, ORG, LOC, DAT, etc.) from the
|
|
4
|
-
|
|
5
|
-
Respond only in JSON format:
|
|
6
|
-
{{
|
|
7
|
-
"result": [
|
|
8
|
-
{{
|
|
9
|
-
"text": "string",
|
|
10
|
-
"type": "string",
|
|
11
|
-
}}
|
|
12
|
-
]
|
|
13
|
-
}}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
{input}
|
|
1
|
+
main_template: |
|
|
2
|
+
You are a Named Entity Recognition (NER) extractor.
|
|
3
|
+
Identify and extract all named entities (e.g., PER, ORG, LOC, DAT, etc.) from the given text.
|
|
4
|
+
For each entity, provide its text and a clear type.
|
|
5
|
+
Respond only in JSON format:
|
|
6
|
+
{{
|
|
7
|
+
"result": [
|
|
8
|
+
{{
|
|
9
|
+
"text": "string",
|
|
10
|
+
"type": "string",
|
|
11
|
+
}}
|
|
12
|
+
]
|
|
13
|
+
}}
|
|
14
|
+
Here is the text:
|
|
15
|
+
{input}
|
|
16
|
+
|
|
17
|
+
analyze_template: |
|
|
18
|
+
Read the following text and identify any proper nouns, key concepts, or specific mentions that might represent named entities.
|
|
19
|
+
Provide a brief, summarized analysis that could help in categorizing these entities.
|
|
20
|
+
{input}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
main_template: |
|
|
2
|
-
|
|
3
|
-
Determine that if the
|
|
4
|
-
Respond only in JSON format (Output should be a
|
|
5
|
-
{{"result": True/False}}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
{input}
|
|
1
|
+
main_template: |
|
|
2
|
+
You are a question detector.
|
|
3
|
+
Determine that if the given text contains any question or not.
|
|
4
|
+
Respond only in JSON format (Output should be a boolean):
|
|
5
|
+
{{"result": True/False}}
|
|
6
|
+
Here is the text:
|
|
7
|
+
{input}
|
|
8
|
+
|
|
9
|
+
analyze_template: |
|
|
10
|
+
We want to analyze this text snippet to see if it contains any question or request of some kind or not.
|
|
11
|
+
Read the text, and reason about it being a request or not.
|
|
12
|
+
Summerized, short answer.
|
|
13
|
+
{input}
|
|
15
14
|
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
main_template: |
|
|
2
|
-
|
|
3
|
-
Given the following answer, generate
|
|
4
|
-
appropriate question that this answer would directly respond to.
|
|
5
|
-
The generated answer should be independently meaningful,
|
|
6
|
-
and not mentioning any verbs like, this, that, he or she on the question.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
Just mention the keypoints that was provided in the answer
|
|
21
|
-
Here is the text:
|
|
22
|
-
{input}
|
|
1
|
+
main_template: |
|
|
2
|
+
You are a question generator.
|
|
3
|
+
Given the following answer, generate one
|
|
4
|
+
appropriate question that this answer would directly respond to.
|
|
5
|
+
The generated answer should be independently meaningful,
|
|
6
|
+
and not mentioning any verbs like, this, that, he or she on the question.
|
|
7
|
+
Respond only in JSON format:
|
|
8
|
+
{{"result": "string"}}
|
|
9
|
+
Here is the answer:
|
|
10
|
+
{input}
|
|
11
|
+
|
|
12
|
+
analyze_template: |
|
|
13
|
+
Analyze the following answer to identify its key facts,
|
|
14
|
+
main subject, and what kind of information it provides.
|
|
15
|
+
Provide a brief, summarized understanding of the answer's content that will
|
|
16
|
+
help in formulating a relevant and direct question.
|
|
17
|
+
Just mention the keypoints that was provided in the answer
|
|
18
|
+
Here is the answer:
|
|
19
|
+
{input}
|
|
23
20
|
|
|
@@ -1,49 +1,46 @@
|
|
|
1
|
-
main_template:
|
|
2
|
-
|
|
3
|
-
default: |
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
which will then be used to create a new question containing all of their contents.
|
|
47
|
-
Respond in the language of the question.
|
|
48
|
-
Here is the question: {input}
|
|
1
|
+
main_template:
|
|
2
|
+
|
|
3
|
+
default: |
|
|
4
|
+
You are a language expert.
|
|
5
|
+
I will give you a list of questions that are semantically similar.
|
|
6
|
+
Your task is to merge them into one unified question.
|
|
7
|
+
Guidelines:
|
|
8
|
+
1. Preserves all the information and intent from the original questions.
|
|
9
|
+
2. Sounds natural, fluent, and concise.
|
|
10
|
+
3. Avoids redundancy or unnecessary repetition.
|
|
11
|
+
4. Does not omit any unique idea from the originals.
|
|
12
|
+
5. Respond only in JSON format:
|
|
13
|
+
{{"result": "string"}}
|
|
14
|
+
Here is the questions:
|
|
15
|
+
{input}
|
|
16
|
+
|
|
17
|
+
reason: |
|
|
18
|
+
You are an AI assistant helping to unify semantically similar questions.
|
|
19
|
+
First, briefly extract the unique intent or content from each input question.
|
|
20
|
+
Then, write one merged question that combines all their content clearly and naturally, without redundancy.
|
|
21
|
+
Step 1: Extract key ideas.
|
|
22
|
+
Step 2: Write the final merged question.
|
|
23
|
+
Respond only in JSON format:
|
|
24
|
+
{{"result": "string"}}
|
|
25
|
+
Here is the questions:
|
|
26
|
+
{input}
|
|
27
|
+
|
|
28
|
+
analyze_template:
|
|
29
|
+
|
|
30
|
+
default: |
|
|
31
|
+
You are a language expert.
|
|
32
|
+
Analyze the following questions to identify their core intent, key concepts,
|
|
33
|
+
and the specific information they are seeking.
|
|
34
|
+
Provide a brief, summarized understanding of the questions' meaning that
|
|
35
|
+
will help in merging and rephrasing it accurately without changing its intent.
|
|
36
|
+
Here is the question:
|
|
37
|
+
{input}
|
|
38
|
+
|
|
39
|
+
reason: |
|
|
40
|
+
Analyze the following questions to identify their exact wording, phrasing,
|
|
41
|
+
and the literal meaning it conveys.
|
|
42
|
+
Provide a brief, summarized analysis of their linguistic structure and current meaning,
|
|
43
|
+
which will then be used to create a new question containing all of their contents.
|
|
44
|
+
Here is the question:
|
|
45
|
+
{input}
|
|
49
46
|
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
main_template:
|
|
2
|
+
|
|
3
|
+
positive: |
|
|
4
|
+
You are an AI assistant designed to generate high-quality training data for semantic text embedding models.
|
|
5
|
+
Your task is to create a positive pair for a given "Anchor" text.
|
|
6
|
+
|
|
7
|
+
A high-quality positive pair consists of two sentences that are semantically equivalent or highly similar in meaning, but differ in wording, syntax, and sentence structure.
|
|
8
|
+
They should be paraphrases of each other.
|
|
9
|
+
|
|
10
|
+
Instructions:
|
|
11
|
+
- Preserve Core Meaning: The generated sentence must convey the same key information, intent, and context as the Anchor.
|
|
12
|
+
- Vary Lexicon: Use different words and phrases (synonyms, related terms).
|
|
13
|
+
- Vary Syntax: Change the sentence structure (e.g., active to passive voice, change clause order, combine or split sentences).
|
|
14
|
+
- Maintain Similar Length: The generated sentence should be of roughly the same length and level of detail as the Anchor.
|
|
15
|
+
- Avoid Minor Changes: Do not just add/remove a few words or swap names. Create a fundamentally different sentence.
|
|
16
|
+
|
|
17
|
+
Respond only in JSON format:
|
|
18
|
+
{{"result": "str"}}
|
|
19
|
+
|
|
20
|
+
Anchor Text:
|
|
21
|
+
"{input}"
|
|
22
|
+
|
|
23
|
+
negative: |
|
|
24
|
+
You are an AI assistant designed to generate high-quality training data for semantic text embedding models.
|
|
25
|
+
Your task is to create a negative sample for a given "Anchor" text.
|
|
26
|
+
|
|
27
|
+
A high-quality negative sample is a sentence that is semantically unrelated to the Anchor's specific question, while staying within the same general domain (religious topics).
|
|
28
|
+
|
|
29
|
+
Instructions:
|
|
30
|
+
- Stay in Domain: The sentence must be about the text's topics, but on a different subject
|
|
31
|
+
- Ensure Clear Distinction: The topic should be clearly different from the anchor's specific focus
|
|
32
|
+
- Maintain Similar Length: The generated sentence should be of roughly the same length and level of detail as the Anchor.
|
|
33
|
+
|
|
34
|
+
Respond only in JSON format:
|
|
35
|
+
{{"result": "str"}}
|
|
36
|
+
|
|
37
|
+
Anchor Text:
|
|
38
|
+
"{input}"
|
|
39
|
+
|
|
40
|
+
hard_negative: |
|
|
41
|
+
You are an AI assistant designed to generate high-quality training data for semantic text embedding models.
|
|
42
|
+
Your task is to create a hard-negative sample for a given "Anchor" text.
|
|
43
|
+
|
|
44
|
+
A high-quality hard-negative sample is a sentence that is topically related but semantically distinct from the Anchor.
|
|
45
|
+
It should share some context (e.g., same domain, same entities) but differ in a crucial piece of information, action, conclusion, or specific detail.
|
|
46
|
+
|
|
47
|
+
Instructions:
|
|
48
|
+
- Stay in General Domain: Remain in the same broad domain (e.g., religious topics), but choose a completely different subject matter.
|
|
49
|
+
- Maintain Topical Overlap: Keep the same domain, subject, or entities (e.g., people, products, concepts) as the Anchor.
|
|
50
|
+
- Alter a Key Semantic Element: Reverse a key word or condition or place or proper name that completely reverses the meaning of the sentence.
|
|
51
|
+
- Avoid Being a Paraphrase: The sentence must NOT be semantically equivalent. The core factual claim or intent must be different.
|
|
52
|
+
- Make it Challenging: The difference should be subtle enough that it requires a deep understanding of the text to identify, not just a simple keyword mismatch.
|
|
53
|
+
- Maintain Similar Length: The generated sentence should be of roughly the same length and level of detail as the Anchor.
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
Respond only in JSON format:
|
|
57
|
+
{{"result": "str"}}
|
|
58
|
+
|
|
59
|
+
Anchor Text:
|
|
60
|
+
"{input}"
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
analyze_template:
|
|
64
|
+
|
|
65
|
+
positive: |
|
|
66
|
+
Analyze the following text to understand its CORE SEMANTIC MEANING for creating a high-quality POSITIVE sample.
|
|
67
|
+
|
|
68
|
+
Focus on:
|
|
69
|
+
- Core Intent: What is the fundamental question or statement being made?
|
|
70
|
+
- Key Entities/Concepts: What are the main subjects, objects, and concepts?
|
|
71
|
+
- Semantic Relationships: How are the entities related?
|
|
72
|
+
- Context & Domain: What is the broader context and domain?
|
|
73
|
+
|
|
74
|
+
Your analysis should capture the ESSENTIAL MEANING that must be preserved in any paraphrase.
|
|
75
|
+
|
|
76
|
+
Text:
|
|
77
|
+
{input}
|
|
78
|
+
|
|
79
|
+
negative: |
|
|
80
|
+
Analyze the following text to identify its SPECIFIC TOPIC and DOMAIN for creating a high-quality NEGATIVE sample.
|
|
81
|
+
|
|
82
|
+
Focus on:
|
|
83
|
+
- Specific Topic: What exact subject is this text about?
|
|
84
|
+
- Domain Context: What broader domain does this belong to?
|
|
85
|
+
- Key Elements to AVOID: What concepts, entities, or phrases must NOT appear in the negative sample?
|
|
86
|
+
- Alternative Topics: What are related but DISTINCT topics within the same domain?
|
|
87
|
+
|
|
88
|
+
The goal is to find topics that are in the same domain but semantically unrelated to this specific text.
|
|
89
|
+
|
|
90
|
+
Text:
|
|
91
|
+
{input}
|
|
92
|
+
|
|
93
|
+
hard_negative: |
|
|
94
|
+
Analyze this text to identify EXACTLY ONE ELEMENT that can be changed to create a hard-negative sample.
|
|
95
|
+
|
|
96
|
+
CRITICAL: The hard-negative must keep the SAME TOPIC and MOST WORDS identical.
|
|
97
|
+
|
|
98
|
+
Identify ONE change from these options:
|
|
99
|
+
- Change a quantity/order word (first→last, one→many)
|
|
100
|
+
- Change a key location/entity to a related one (paradise→hell, heaven→earth)
|
|
101
|
+
- Change the question focus slightly (who→what, what→how)
|
|
102
|
+
- Change a key action verb to a related action (enter→exit, give→take)
|
|
103
|
+
|
|
104
|
+
PRESERVE:
|
|
105
|
+
- Main topic and subject
|
|
106
|
+
- Sentence structure
|
|
107
|
+
- 80-90% of the vocabulary
|
|
108
|
+
|
|
109
|
+
Text:
|
|
110
|
+
{input}
|
|
111
|
+
|
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
main_template: |
|
|
2
|
-
|
|
3
|
-
Given the following subject, generate {number_of_questions} appropriate questions that this subject would directly respond to.
|
|
4
|
-
The generated subject should be independently meaningful,
|
|
5
|
-
and it must not mention any verbs like, this, that, he or she and etc. in the question.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
What is the subject about?
|
|
24
|
-
What point of views can we see and generate questoins from it? (Questions that real users might have.)
|
|
25
|
-
Here is the subject:
|
|
26
|
-
{input}
|
|
1
|
+
main_template: |
|
|
2
|
+
You are a question from subject generator.
|
|
3
|
+
Given the following subject, generate {number_of_questions} appropriate questions that this subject would directly respond to.
|
|
4
|
+
The generated subject should be independently meaningful,
|
|
5
|
+
and it must not mention any verbs like, this, that, he or she and etc. in the question.
|
|
6
|
+
There is a `reason` key, fill that up with a summerized version of your thoughts.
|
|
7
|
+
The `reason` must be less than 20 words.
|
|
8
|
+
Don't forget to fill the reason.
|
|
9
|
+
Respond only in JSON format:
|
|
10
|
+
{{"result": ["question1", "question2", ...], "reason": "string"}}
|
|
11
|
+
Here is the text:
|
|
12
|
+
{input}
|
|
13
|
+
|
|
14
|
+
analyze_template: |
|
|
15
|
+
Our goal is to generate questions from the given subject.
|
|
16
|
+
The questions must be meaningfull, some of them should be specific and some should be general.
|
|
17
|
+
But first, in this step we want to analyze the subject that I asked to generate questions for it.
|
|
18
|
+
We need a summerized analysis of the subject.
|
|
19
|
+
What is the subject about?
|
|
20
|
+
What point of views can we see and generate questoins from it? (Questions that real users might have.)
|
|
21
|
+
Here is the subject:
|
|
22
|
+
{input}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
main_template: |
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
main_template: |
|
|
2
|
+
You are a summarizer.
|
|
3
|
+
You must summarize the given text, preserving its meaning.
|
|
4
|
+
Respond only in JSON format:
|
|
5
|
+
{{"result": "string"}}
|
|
6
|
+
Provide a concise summary of the following text:
|
|
7
|
+
{input}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
analyze_template: |
|
|
11
|
+
Read the following text and identify its main points, key arguments, and overall purpose.
|
|
12
|
+
Provide a brief, summarized analysis that will help in generating an accurate and concise summary.
|
|
13
|
+
{input}
|
|
12
14
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
main_template: |
|
|
2
|
-
{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
{
|
|
7
|
-
|
|
8
|
-
{
|
|
9
|
-
|
|
10
|
-
analyze_template: |
|
|
11
|
-
Analyze the following text and identify important linguistic considerations for translation.
|
|
12
|
-
|
|
13
|
-
Also, list all proper nouns that should not be translated. Write your analysis in the {target_language}.
|
|
14
|
-
{input}
|
|
1
|
+
main_template: |
|
|
2
|
+
You are a {target_language} translator.
|
|
3
|
+
Output only the translated text.
|
|
4
|
+
Respond only in JSON format:
|
|
5
|
+
{{"result": "string"}}
|
|
6
|
+
Don't translate proper name, only transliterate them to {target_language}
|
|
7
|
+
Translate the following text to {target_language}:
|
|
8
|
+
{input}
|
|
9
|
+
|
|
10
|
+
analyze_template: |
|
|
11
|
+
Analyze the following text and identify important linguistic considerations for translation.
|
|
12
|
+
Point out any idioms, cultural references, or complex structures that need special attention.
|
|
13
|
+
Also, list all proper nouns that should not be translated. Write your analysis in the {target_language}.
|
|
14
|
+
{input}
|
|
15
15
|
|
texttools/tools/__init__.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from .async_the_tool import AsyncTheTool
|
|
2
|
-
from .the_tool import TheTool
|
|
3
|
-
|
|
4
|
-
__all__ = ["TheTool", "AsyncTheTool"]
|
|
1
|
+
from .async_the_tool import AsyncTheTool
|
|
2
|
+
from .the_tool import TheTool
|
|
3
|
+
|
|
4
|
+
__all__ = ["TheTool", "AsyncTheTool"]
|