pilot.linkstec 0.0.21__tar.gz → 0.0.23__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.21 → pilot_linkstec-0.0.23}/PKG-INFO +1 -1
  2. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/pyproject.toml +1 -1
  3. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/generater/vertexai.py +6 -11
  4. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot.linkstec.egg-info/PKG-INFO +1 -1
  5. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/LICENSE +0 -0
  6. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/README.md +0 -0
  7. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/setup.cfg +0 -0
  8. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/__init__.py +0 -0
  9. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/config/__init__.py +0 -0
  10. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/config/config_reader.py +0 -0
  11. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/control/__init__.py +0 -0
  12. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/control/control_interface.py +0 -0
  13. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/control/impl/__init__.py +0 -0
  14. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/control/impl/base_controller.py +0 -0
  15. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/conver/__init__.py +0 -0
  16. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/conver/converfileEncodding.py +0 -0
  17. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/conver/nkf_converter.py +0 -0
  18. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/generater/__init__.py +0 -0
  19. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/job/__init__.py +0 -0
  20. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/job/impl/__init__.py +0 -0
  21. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/job/impl/base_job.py +0 -0
  22. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/job/job_interface.py +0 -0
  23. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/logging/__init__.py +0 -0
  24. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/logging/logger.py +0 -0
  25. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/processor/__init__.py +0 -0
  26. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/processor/code_processor.py +0 -0
  27. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/processor/code_processor_pipeline.py +0 -0
  28. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/splitters/__init__.py +0 -0
  29. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/splitters/cobolsplitter.py +0 -0
  30. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/unit/__init__.py +0 -0
  31. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/unit/impl/__init__.py +0 -0
  32. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/unit/impl/base_unit.py +0 -0
  33. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/unit/unit_interface.py +0 -0
  34. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/util/__init__.py +0 -0
  35. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot/util/files.py +0 -0
  36. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot.linkstec.egg-info/SOURCES.txt +0 -0
  37. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/src/pilot.linkstec.egg-info/dependency_links.txt +0 -0
  38. {pilot_linkstec-0.0.21 → pilot_linkstec-0.0.23}/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.21
3
+ Version: 0.0.23
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.21"
3
+ version = "0.0.23"
4
4
  authors = [
5
5
  { name="wanglr", email="wanglr1980@gmail.com" },
6
6
  ]
@@ -3,9 +3,8 @@ import threading
3
3
  from typing import Dict, Any, Optional
4
4
 
5
5
  import tiktoken
6
- from vertexai.generative_models import GenerativeModel, ChatSession
6
+ from vertexai.generative_models import GenerativeModel, ChatSession, GenerationConfig
7
7
  from google.genai import types
8
- import os
9
8
 
10
9
  class VertexAISingleton:
11
10
  _instance: Optional['VertexAISingleton'] = None
@@ -31,13 +30,14 @@ class VertexAISingleton:
31
30
  if not self._initialized:
32
31
  with self._lock:
33
32
  if not self._initialized:
34
- self.model = GenerativeModel(model_name)
35
- self.encoding = tiktoken.get_encoding("cl100k_base")
36
- # system_promptにSQL_SYSTEM_PROMPT_ENを追加
37
33
  if system_prompt:
38
34
  self.system_prompt = f"{system_prompt.rstrip()}\n\n{self.SQL_SYSTEM_PROMPT_EN}"
39
35
  else:
40
36
  self.system_prompt = self.SQL_SYSTEM_PROMPT_EN
37
+ self.model = GenerativeModel(model_name=model_name,system_instruction = self.system_prompt)
38
+ self.encoding = tiktoken.get_encoding("cl100k_base")
39
+ # system_promptにSQL_SYSTEM_PROMPT_ENを追加
40
+
41
41
  self._initialized = True
42
42
  else:
43
43
  # 既存インスタンスでもsystem_promptを更新可能に
@@ -48,14 +48,9 @@ class VertexAISingleton:
48
48
  """複数スレッドから安全に呼び出し可能"""
49
49
  try:
50
50
  # システムプロンプトをconfigとして渡す
51
-
52
- generation_config = {
53
- "system_instruction": self.system_prompt
54
- }
55
51
  prompt = self.exchange_prompt(prompt)
56
52
  response = self.model.generate_content(
57
- contents=prompt, # 引数名を明示
58
- generation_config = generation_config # 正しい名前で渡す
53
+ contents=prompt # 引数名を明示
59
54
  )
60
55
  return {
61
56
  "prompt": prompt,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pilot.linkstec
3
- Version: 0.0.21
3
+ Version: 0.0.23
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