pilot.linkstec 0.0.107__py3-none-any.whl → 0.0.108__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.
- pilot/job/base/generate/generateJsonBaseJob.py +11 -15
- pilot/job/base/generate/generateTextBaseJob.py +11 -11
- {pilot_linkstec-0.0.107.dist-info → pilot_linkstec-0.0.108.dist-info}/METADATA +1 -1
- {pilot_linkstec-0.0.107.dist-info → pilot_linkstec-0.0.108.dist-info}/RECORD +7 -7
- {pilot_linkstec-0.0.107.dist-info → pilot_linkstec-0.0.108.dist-info}/WHEEL +0 -0
- {pilot_linkstec-0.0.107.dist-info → pilot_linkstec-0.0.108.dist-info}/licenses/LICENSE +0 -0
- {pilot_linkstec-0.0.107.dist-info → pilot_linkstec-0.0.108.dist-info}/top_level.txt +0 -0
|
@@ -5,7 +5,7 @@ import time
|
|
|
5
5
|
|
|
6
6
|
from pilot.job.impl.base_job import BaseJob
|
|
7
7
|
|
|
8
|
-
from pilot.generater.
|
|
8
|
+
from pilot.generater.vera import VeraSingleton
|
|
9
9
|
|
|
10
10
|
class GenerateJsonBaseJob(BaseJob):
|
|
11
11
|
|
|
@@ -14,24 +14,20 @@ class GenerateJsonBaseJob(BaseJob):
|
|
|
14
14
|
result_file_path: str
|
|
15
15
|
|
|
16
16
|
def run(self):
|
|
17
|
-
#with self._begin_file_lock:
|
|
18
|
-
# if not self.change_current_trg_to_begin():
|
|
19
|
-
# return
|
|
20
|
-
#prompt = self.get_file_content()
|
|
21
17
|
prompt = self.prompt_content
|
|
22
18
|
# トークン数チェック
|
|
23
|
-
|
|
24
|
-
token_count = vertexai.count_tokens(prompt)
|
|
25
|
-
if token_count == 0:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if token_count > 900000:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
vera_ai = VeraSingleton.get_instance()
|
|
20
|
+
#token_count = vertexai.count_tokens(prompt)
|
|
21
|
+
#if token_count == 0:
|
|
22
|
+
# super().run()
|
|
23
|
+
# return
|
|
24
|
+
#if token_count > 900000:
|
|
25
|
+
# print(f"警告: promptのトークン数が900000を超えています ({token_count} tokens)")
|
|
26
|
+
# super().run()
|
|
27
|
+
# return
|
|
32
28
|
# VertexAI で生成
|
|
33
29
|
start = time.time()
|
|
34
|
-
result =
|
|
30
|
+
result = vera_ai.generate_content(prompt)
|
|
35
31
|
end = time.time()
|
|
36
32
|
print(f"Ai 処理時間 {self.file_path}: {end - start:.2f}秒")
|
|
37
33
|
|
|
@@ -5,7 +5,7 @@ import time
|
|
|
5
5
|
|
|
6
6
|
from pilot.job.impl.base_job import BaseJob
|
|
7
7
|
|
|
8
|
-
from pilot.generater.
|
|
8
|
+
from pilot.generater.vera import VeraSingleton
|
|
9
9
|
|
|
10
10
|
class GenerateTextBaseJob(BaseJob):
|
|
11
11
|
|
|
@@ -16,18 +16,18 @@ class GenerateTextBaseJob(BaseJob):
|
|
|
16
16
|
def run(self):
|
|
17
17
|
prompt = self.prompt_content
|
|
18
18
|
# トークン数チェック
|
|
19
|
-
|
|
20
|
-
token_count = vertexai.count_tokens(prompt)
|
|
21
|
-
if token_count == 0:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if token_count > 900000:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
vera_ai = VeraSingleton.get_instance()
|
|
20
|
+
#token_count = vertexai.count_tokens(prompt)
|
|
21
|
+
#if token_count == 0:
|
|
22
|
+
# super().run()
|
|
23
|
+
# return
|
|
24
|
+
#if token_count > 900000:
|
|
25
|
+
# print(f"警告: promptのトークン数が900000を超えています ({token_count} tokens)")
|
|
26
|
+
# super().run()
|
|
27
|
+
# return
|
|
28
28
|
# VertexAI で生成
|
|
29
29
|
start = time.time()
|
|
30
|
-
result =
|
|
30
|
+
result = vera_ai.generate_content(prompt)
|
|
31
31
|
end = time.time()
|
|
32
32
|
print(f"AI 処理時間 {self.file_path}: {end - start:.2f}秒")
|
|
33
33
|
result_content = result.get('response', '')
|
|
@@ -56,8 +56,8 @@ pilot/job/base/convert/delimiterSwitcherJob.py,sha256=m5Y92XVbCjVWGBKzYJYX8wgLMn
|
|
|
56
56
|
pilot/job/base/convert/encodingTransformerJob.py,sha256=P6txCqAcQ4w999ttA_gmA4VKr6klvTz4SrQIYT1gv6U,279
|
|
57
57
|
pilot/job/base/convert/tabReplaceJob.py,sha256=FtPLbWwDPgH1jGsK3y5_sY4lAZ4Lhsv7GQ-1A-QgAFE,743
|
|
58
58
|
pilot/job/base/generate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
59
|
-
pilot/job/base/generate/generateJsonBaseJob.py,sha256=
|
|
60
|
-
pilot/job/base/generate/generateTextBaseJob.py,sha256=
|
|
59
|
+
pilot/job/base/generate/generateJsonBaseJob.py,sha256=0sWNqvfV-1DgsNjyD_GUBHogjQPNRdcqx0siNNFnSsE,1208
|
|
60
|
+
pilot/job/base/generate/generateTextBaseJob.py,sha256=Pvxk2HNkQt9saBYmoRA8lhDjffMAxLMqSYvsyIlYKjg,1138
|
|
61
61
|
pilot/job/base/program/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
62
62
|
pilot/job/base/program/cobol/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
63
63
|
pilot/job/base/program/cobol/convert/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -77,8 +77,8 @@ pilot/unit/impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
77
77
|
pilot/unit/impl/base_unit.py,sha256=h6PMtd4ja0wa6mttFeI7rsv92yy96UgfLIU0QSs6Dmk,2108
|
|
78
78
|
pilot/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
79
79
|
pilot/util/files.py,sha256=v9uzfzo3Aq4xgnUIASEZeBJoA2nD9Qz_EA3P-FwzGFQ,1896
|
|
80
|
-
pilot_linkstec-0.0.
|
|
81
|
-
pilot_linkstec-0.0.
|
|
82
|
-
pilot_linkstec-0.0.
|
|
83
|
-
pilot_linkstec-0.0.
|
|
84
|
-
pilot_linkstec-0.0.
|
|
80
|
+
pilot_linkstec-0.0.108.dist-info/licenses/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
|
|
81
|
+
pilot_linkstec-0.0.108.dist-info/METADATA,sha256=bVJA6FvtR9-r1jbCvKHVe-pq3_Y6XQp-9VdqYh4mfXg,680
|
|
82
|
+
pilot_linkstec-0.0.108.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
83
|
+
pilot_linkstec-0.0.108.dist-info/top_level.txt,sha256=BijnVJdXnIPxxx3s60M848seL4Z12gNUPod6KPJxK9c,6
|
|
84
|
+
pilot_linkstec-0.0.108.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|