pilot.linkstec 0.0.18__tar.gz → 0.0.20__tar.gz

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 pilot.linkstec might be problematic. Click here for more details.

Files changed (38) hide show
  1. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/PKG-INFO +1 -1
  2. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/pyproject.toml +1 -1
  3. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/generater/vertexai.py +13 -18
  4. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot.linkstec.egg-info/PKG-INFO +1 -1
  5. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/LICENSE +0 -0
  6. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/README.md +0 -0
  7. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/setup.cfg +0 -0
  8. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/__init__.py +0 -0
  9. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/config/__init__.py +0 -0
  10. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/config/config_reader.py +0 -0
  11. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/control/__init__.py +0 -0
  12. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/control/control_interface.py +0 -0
  13. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/control/impl/__init__.py +0 -0
  14. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/control/impl/base_controller.py +0 -0
  15. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/conver/__init__.py +0 -0
  16. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/conver/converfileEncodding.py +0 -0
  17. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/conver/nkf_converter.py +0 -0
  18. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/generater/__init__.py +0 -0
  19. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/job/__init__.py +0 -0
  20. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/job/impl/__init__.py +0 -0
  21. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/job/impl/base_job.py +0 -0
  22. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/job/job_interface.py +0 -0
  23. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/logging/__init__.py +0 -0
  24. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/logging/logger.py +0 -0
  25. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/processor/__init__.py +0 -0
  26. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/processor/code_processor.py +0 -0
  27. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/processor/code_processor_pipeline.py +0 -0
  28. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/splitters/__init__.py +0 -0
  29. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/splitters/cobolsplitter.py +0 -0
  30. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/unit/__init__.py +0 -0
  31. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/unit/impl/__init__.py +0 -0
  32. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/unit/impl/base_unit.py +0 -0
  33. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/unit/unit_interface.py +0 -0
  34. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/util/__init__.py +0 -0
  35. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot/util/files.py +0 -0
  36. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot.linkstec.egg-info/SOURCES.txt +0 -0
  37. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot.linkstec.egg-info/dependency_links.txt +0 -0
  38. {pilot_linkstec-0.0.18 → pilot_linkstec-0.0.20}/src/pilot.linkstec.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pilot.linkstec
3
- Version: 0.0.18
3
+ Version: 0.0.20
4
4
  Summary: pilot of the ship, a tool for managing and deploying Python projects.
5
5
  Author-email: wanglr <wanglr1980@gmail.com>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pilot.linkstec"
3
- version = "0.0.18"
3
+ version = "0.0.20"
4
4
  authors = [
5
5
  { name="wanglr", email="wanglr1980@gmail.com" },
6
6
  ]
@@ -46,9 +46,18 @@ class VertexAISingleton:
46
46
  def generate_content(self, prompt: str) -> Dict[str, Any]:
47
47
  """複数スレッドから安全に呼び出し可能"""
48
48
  try:
49
- # system_promptがあれば先頭に付与
50
- full_prompt = f"{self.system_prompt}\n{prompt}" if getattr(self, "system_prompt", None) else prompt
51
- response = self.model.generate_content(self.exchange_prompt(full_prompt))
49
+ # システムプロンプトをconfigとして渡す
50
+ genai_config = None
51
+ if getattr(self, "system_prompt", None):
52
+ # Vertex AI SDK公式: config引数にsystem_instructionを指定
53
+ genai_config = {
54
+ "system_instruction": self.system_prompt
55
+ }
56
+ newprompt = self.exchange_prompt(prompt)
57
+ response = self.model.generate_content(
58
+ contents=newprompt, # 引数名を明示
59
+ generation_config=genai_config # 正しい名前で渡す
60
+ )
52
61
  return {
53
62
  "prompt": prompt,
54
63
  "response": self._remove_code_fence(response.text),
@@ -87,8 +96,7 @@ class VertexAISingleton:
87
96
 
88
97
  def exchange_prompt(self, prompt: str) -> str:
89
98
  # EXEC SQL ... END-EXEC. のSQL部分を抽出してフラット化
90
- rtn_prompt = ""
91
- rtn_prompt = self.fix_initialize(rtn_prompt)
99
+ rtn_prompt = self.fix_initialize(prompt)
92
100
  rtn_prompt = self.extract_and_flatten_sql(rtn_prompt)
93
101
  return rtn_prompt
94
102
 
@@ -119,19 +127,6 @@ class VertexAISingleton:
119
127
 
120
128
  return text
121
129
 
122
- def replace_aaa_in_section(code: str) -> str:
123
- """
124
- SECTION.~EXIT.ブロック中のAAAをBBBに置換し、全体をstrで返す
125
- """
126
- pattern = r"SECTION.(.*?)(EXIT.)"
127
-
128
- def repl(m):
129
- block = m.group(1)
130
- block_modified = block.replace("AAA", "BBB")
131
- return f"SECTION.{block_modified}EXIT."
132
-
133
- result = re.sub(pattern, repl, code, flags=re.DOTALL | re.IGNORECASE)
134
- return result
135
130
 
136
131
  def extract_and_flatten_sql(self, code):
137
132
  # EXEC SQL ... END-EXEC. にマッチ
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pilot.linkstec
3
- Version: 0.0.18
3
+ Version: 0.0.20
4
4
  Summary: pilot of the ship, a tool for managing and deploying Python projects.
5
5
  Author-email: wanglr <wanglr1980@gmail.com>
6
6
  License-Expression: MIT
File without changes