atomicshop 2.20.2__py3-none-any.whl → 2.20.4__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 atomicshop might be problematic. Click here for more details.

atomicshop/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  """Atomic Basic functions and classes to make developer life easier"""
2
2
 
3
3
  __author__ = "Den Kras"
4
- __version__ = '2.20.2'
4
+ __version__ = '2.20.4'
@@ -294,6 +294,7 @@ def thread_worker_main(
294
294
  client_message: ClientMessage = ClientMessage()
295
295
  client_message.client_name = client_name
296
296
  client_message.client_ip = client_ip
297
+ client_message.server_ip = server_ip
297
298
  client_message.source_port = source_port
298
299
  client_message.destination_port = destination_port
299
300
  client_message.server_name = server_name
@@ -542,6 +543,13 @@ def thread_worker_main(
542
543
  client_name = socket.gethostbyaddr(client_ip)[0]
543
544
  destination_port = client_socket.getsockname()[1]
544
545
 
546
+ if config_static.TCPServer.server_response_mode:
547
+ # If in response mode, then we'll get the TCP server's input address.
548
+ server_ip = client_socket.getsockname()[0]
549
+ else:
550
+ # If not in response mode, we will get the ip from the socket that will connect later to the service.
551
+ server_ip = ""
552
+
545
553
  network_logger.info(f"Thread Created - Client [{client_ip}:{source_port}] | "
546
554
  f"Destination service: [{server_name}:{destination_port}]")
547
555
 
@@ -569,6 +577,9 @@ def thread_worker_main(
569
577
  if not service_client:
570
578
  service_client = create_client_socket(client_message_connection)
571
579
  service_socket_instance, connection_error = service_client.service_connection()
580
+ # Now we'll update the server IP with the IP of the service.
581
+ server_ip = service_socket_instance.getpeername()[0]
582
+ client_message_connection.server_ip = server_ip
572
583
  else:
573
584
  client_message_connection.timestamp = datetime.now()
574
585
  client_message_connection.action = 'service_connect'
@@ -128,17 +128,27 @@ class GoogleLLM:
128
128
  def ask_gemini(
129
129
  question: str,
130
130
  temperature: float,
131
- max_output_tokens: int,
132
- model_name: str = 'gemini-pro'
131
+ # max_output_tokens: int,
132
+ model_name: str = 'gemini-2.0-flash-thinking-exp-01-21'
133
133
  ) -> str:
134
134
  """
135
135
  Function to ask the Gemini API a question and get the response.
136
136
  :param question: str, the question to ask the Gemini API.
137
137
  :param temperature: float, the temperature parameter for the LLM.
138
138
  While 0 is deterministic, higher values can lead to more creative responses.
139
- :param max_output_tokens: int, the maximum number of tokens to generate in the LLM response.
140
139
  :param model_name: str, the name of the model to use for the LLM.
141
140
 
141
+ max_output_tokens: int, the maximum number of tokens to generate in the LLM response.
142
+ UPDATE: Disabled this feature since it gave exceptions in some situations.
143
+ Example:
144
+ File ".\Lib\site-packages\google\generativeai\types\generation_types.py", line 464, in text
145
+ parts = self.parts
146
+ ^^^^^^^^^^
147
+ File ".\Lib\site-packages\google\generativeai\types\generation_types.py", line 447, in parts
148
+ raise ValueError(msg)
149
+ ValueError: Invalid operation: The `response.parts` quick accessor requires a single candidate, but but `response.candidates` is empty.
150
+
151
+
142
152
  :return: str, the response from the Gemini API.
143
153
  """
144
154
  # Model Configuration
@@ -146,7 +156,7 @@ class GoogleLLM:
146
156
  "temperature": temperature,
147
157
  "top_p": 0.99,
148
158
  "top_k": 0,
149
- "max_output_tokens": max_output_tokens,
159
+ # "max_output_tokens": max_output_tokens,
150
160
  }
151
161
 
152
162
  # model = genai.GenerativeModel('gemini-1.5-pro-latest',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: atomicshop
3
- Version: 2.20.2
3
+ Version: 2.20.4
4
4
  Summary: Atomic functions and classes to make developer life easier
5
5
  Author: Denis Kras
6
6
  License: MIT License
@@ -1,4 +1,4 @@
1
- atomicshop/__init__.py,sha256=YT_T5JzFRTIksmE_0awk2rKq2ttCQS7jQZk6RPF_DjQ,123
1
+ atomicshop/__init__.py,sha256=db6JGtlhqdS5AI8AP9hTGCkD-0rCHHR2UqDNerpAIQE,123
2
2
  atomicshop/_basics_temp.py,sha256=6cu2dd6r2dLrd1BRNcVDKTHlsHs_26Gpw8QS6v32lQ0,3699
3
3
  atomicshop/_create_pdf_demo.py,sha256=Yi-PGZuMg0RKvQmLqVeLIZYadqEZwUm-4A9JxBl_vYA,3713
4
4
  atomicshop/_patch_import.py,sha256=ENp55sKVJ0e6-4lBvZnpz9PQCt3Otbur7F6aXDlyje4,6334
@@ -135,7 +135,7 @@ atomicshop/file_io/xmls.py,sha256=zh3SuK-dNaFq2NDNhx6ivcf4GYCfGM8M10PcEwDSpxk,21
135
135
  atomicshop/mitm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
136
136
  atomicshop/mitm/config_static.py,sha256=DjSnDtMU8srdqca8s6Q-oFCWgjjiCjXRhyk-nafRAUk,7788
137
137
  atomicshop/mitm/config_toml_editor.py,sha256=2p1CMcktWRR_NW-SmyDwylu63ad5e0-w1QPMa8ZLDBw,1635
138
- atomicshop/mitm/connection_thread_worker.py,sha256=6xfQ5MmWR2pqgDfjjelSgHfiTzhprRXNpfhgpoNbsGI,28688
138
+ atomicshop/mitm/connection_thread_worker.py,sha256=tn71RotrQOTo6dyAakuLlY4HrM5ia_0FbNKLCY6Xahg,29304
139
139
  atomicshop/mitm/import_config.py,sha256=0Ij14aISTllTOiWYJpIUMOWobQqGofD6uafui5uWllE,9272
140
140
  atomicshop/mitm/initialize_engines.py,sha256=rijND1jxt3Zs8P0jhcQZc0tgcWD4-nq8ARODiWzhurU,8278
141
141
  atomicshop/mitm/message.py,sha256=CDhhm4BTuZE7oNZCjvIZ4BuPOW4MuIzQLOg91hJaxDI,3065
@@ -186,7 +186,7 @@ atomicshop/startup/win/startup_folder.py,sha256=2RZEyF-Mf8eWPlt_-OaoGKKnMs6YhELE
186
186
  atomicshop/startup/win/task_scheduler.py,sha256=qALe-8sfthYxsdCViH2r8OsH3x-WauDqteg5RzElPdk,4348
187
187
  atomicshop/web_apis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
188
188
  atomicshop/web_apis/google_custom_search.py,sha256=R1BnUmBFWZIWkfizSRWoSYoZTdPEjLJ28F_sS2g1jGQ,1558
189
- atomicshop/web_apis/google_llm.py,sha256=JcWkorK0Fu5C3SkZLSzI0TO4CwDscjFsWu1bDhfGYww,7056
189
+ atomicshop/web_apis/google_llm.py,sha256=bOE91hGSz4I2DJK0LZHMCSDDYSTgP6SF_FWVvpV5LcY,7691
190
190
  atomicshop/wrappers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
191
191
  atomicshop/wrappers/_process_wrapper_curl.py,sha256=XkZZXYl7D0Q6UfdWqy-18AvpU0yVp9i2BVD2qRcXlkk,841
192
192
  atomicshop/wrappers/_process_wrapper_tar.py,sha256=WUMZFKNrlG4nJP9tWZ51W7BR1j_pIjsjgyAStmWjRGs,655
@@ -330,8 +330,8 @@ atomicshop/wrappers/socketw/statistics_csv.py,sha256=WcNyaqEZ82S5-f3kzqi1nllNT2N
330
330
  atomicshop/wrappers/winregw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
331
331
  atomicshop/wrappers/winregw/winreg_installed_software.py,sha256=Qzmyktvob1qp6Tjk2DjLfAqr_yXV0sgWzdMW_9kwNjY,2345
332
332
  atomicshop/wrappers/winregw/winreg_network.py,sha256=AENV88H1qDidrcpyM9OwEZxX5svfi-Jb4N6FkS1xtqA,8851
333
- atomicshop-2.20.2.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
334
- atomicshop-2.20.2.dist-info/METADATA,sha256=vUaF9sMXezhYJN5zLGjTupSrN9oMANcQhKKqnFmsgGY,10630
335
- atomicshop-2.20.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
336
- atomicshop-2.20.2.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
337
- atomicshop-2.20.2.dist-info/RECORD,,
333
+ atomicshop-2.20.4.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
334
+ atomicshop-2.20.4.dist-info/METADATA,sha256=vj3fQF5hXmJ1WwdtNNC7fJ1_eIebTpjKfAkROwEZuMM,10630
335
+ atomicshop-2.20.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
336
+ atomicshop-2.20.4.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
337
+ atomicshop-2.20.4.dist-info/RECORD,,