lollms-client 0.14.0__py3-none-any.whl → 0.14.1__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 lollms-client might be problematic. Click here for more details.

lollms_client/__init__.py CHANGED
@@ -6,7 +6,7 @@ from lollms_client.lollms_discussion import LollmsDiscussion, LollmsMessage
6
6
  from lollms_client.lollms_utilities import PromptReshaper # Keep general utilities
7
7
  from lollms_client.lollms_functions import FunctionCalling_Library
8
8
 
9
- __version__ = "0.14.0"
9
+ __version__ = "0.14.1"
10
10
 
11
11
  # Optionally, you could define __all__ if you want to be explicit about exports
12
12
  __all__ = [
@@ -440,14 +440,12 @@ class LollmsClient():
440
440
  Uses the underlying LLM binding via `generate_text`.
441
441
  """
442
442
  response_full = ""
443
- full_prompt = f"""{self.system_full_header}Act as a code generation assistant that generates code from user prompt.
444
- {self.user_full_header}
445
- {prompt}
446
- """
443
+ system_prompt = f"""Act as a code generation assistant that generates code from user prompt."""
444
+
447
445
  if template:
448
- full_prompt += "Here is a template of the answer:\n"
446
+ system_prompt += "Here is a template of the answer:\n"
449
447
  if code_tag_format=="markdown":
450
- full_prompt += f"""You must answer with the code placed inside the markdown code tag like this:
448
+ system_prompt += f"""You must answer with the code placed inside the markdown code tag like this:
451
449
  ```{language}
452
450
  {template}
453
451
  ```
@@ -456,7 +454,7 @@ The code tag is mandatory.
456
454
  Don't forget encapsulate the code inside a markdown code tag. This is mandatory.
457
455
  """
458
456
  elif code_tag_format=="html":
459
- full_prompt +=f"""You must answer with the code placed inside the html code tag like this:
457
+ system_prompt +=f"""You must answer with the code placed inside the html code tag like this:
460
458
  <code language="{language}">
461
459
  {template}
462
460
  </code>
@@ -464,13 +462,13 @@ Don't forget encapsulate the code inside a markdown code tag. This is mandatory.
464
462
  The code tag is mandatory.
465
463
  Don't forget encapsulate the code inside a html code tag. This is mandatory.
466
464
  """
467
- full_prompt += f"""Do not split the code in multiple tags.
468
- {self.ai_full_header}"""
465
+ system_prompt += f"""Do not split the code in multiple tags."""
469
466
 
470
467
  # Use generate_text which handles images internally
471
468
  response = self.generate_text(
472
- full_prompt,
469
+ prompt,
473
470
  images=images,
471
+ system_prompt=system_prompt,
474
472
  n_predict=max_size,
475
473
  temperature=temperature,
476
474
  top_k=top_k,
@@ -509,14 +507,12 @@ Don't forget encapsulate the code inside a html code tag. This is mandatory.
509
507
  Handles potential continuation if the code block is incomplete.
510
508
  """
511
509
 
512
- full_prompt = f"""{self.system_full_header}Act as a code generation assistant that generates code from user prompt.
513
- {self.user_full_header}
514
- {prompt}
515
- """
510
+ system_prompt = f"""{self.system_full_header}Act as a code generation assistant that generates code from user prompt."""
511
+
516
512
  if template:
517
- full_prompt += "Here is a template of the answer:\n"
513
+ system_prompt += "Here is a template of the answer:\n"
518
514
  if code_tag_format=="markdown":
519
- full_prompt += f"""You must answer with the code placed inside the markdown code tag like this:
515
+ system_prompt += f"""You must answer with the code placed inside the markdown code tag like this:
520
516
  ```{language}
521
517
  {template}
522
518
  ```
@@ -525,7 +521,7 @@ The code tag is mandatory.
525
521
  Don't forget encapsulate the code inside a markdown code tag. This is mandatory.
526
522
  """
527
523
  elif code_tag_format=="html":
528
- full_prompt +=f"""You must answer with the code placed inside the html code tag like this:
524
+ system_prompt +=f"""You must answer with the code placed inside the html code tag like this:
529
525
  <code language="{language}">
530
526
  {template}
531
527
  </code>
@@ -533,13 +529,14 @@ Don't forget encapsulate the code inside a markdown code tag. This is mandatory.
533
529
  The code tag is mandatory.
534
530
  Don't forget encapsulate the code inside a html code tag. This is mandatory.
535
531
  """
536
- full_prompt += f"""You must return a single code tag.
532
+ system_prompt += f"""You must return a single code tag.
537
533
  Do not split the code in multiple tags.
538
534
  {self.ai_full_header}"""
539
535
 
540
536
  response = self.generate_text(
541
- full_prompt,
537
+ prompt,
542
538
  images=images,
539
+ system_prompt=system_prompt,
543
540
  n_predict=max_size,
544
541
  temperature=temperature,
545
542
  top_k=top_k,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lollms_client
3
- Version: 0.14.0
3
+ Version: 0.14.1
4
4
  Summary: A client library for LoLLMs generate endpoint
5
5
  Author-email: ParisNeo <parisneoai@gmail.com>
6
6
  License: Apache Software License
@@ -13,9 +13,9 @@ examples/personality_test/chat_test.py,sha256=o2jlpoddFc-T592iqAiA29xk3x27KsdK5D
13
13
  examples/personality_test/chat_with_aristotle.py,sha256=4X_fwubMpd0Eq2rCReS2bgVlUoAqJprjkLXk2Jz6pXU,1774
14
14
  examples/personality_test/tesks_test.py,sha256=7LIiwrEbva9WWZOLi34fsmCBN__RZbPpxoUOKA_AtYk,1924
15
15
  examples/test_local_models/local_chat.py,sha256=slakja2zaHOEAUsn2tn_VmI4kLx6luLBrPqAeaNsix8,456
16
- lollms_client/__init__.py,sha256=PHFRY4RskAaiectooBrSCrxd6UGpZkdTqMHmXM26VnQ,823
16
+ lollms_client/__init__.py,sha256=Nu5NJl6GDDW4W-hoRwxXQZdnHj2-fgCeaRW3Dt_zuCQ,823
17
17
  lollms_client/lollms_config.py,sha256=goEseDwDxYJf3WkYJ4IrLXwg3Tfw73CXV2Avg45M_hE,21876
18
- lollms_client/lollms_core.py,sha256=KkeKjQZVeUjdsQjxw2bygUxq1gXlPNnYiyxdWnwA4L8,78073
18
+ lollms_client/lollms_core.py,sha256=aFW8KDnBJRSL8a7ibhKAV67O95qvPT6PneNHQL1y2vc,78049
19
19
  lollms_client/lollms_discussion.py,sha256=9b83m0D894jwpgssWYTQHbVxp1gJoI-J947Ui_dRXII,2073
20
20
  lollms_client/lollms_functions.py,sha256=p8SFtmEPqvVCsIz2fZ5HxyOHaxjrAo5c12uTzJnb6m8,3594
21
21
  lollms_client/lollms_js_analyzer.py,sha256=01zUvuO2F_lnUe_0NLxe1MF5aHE1hO8RZi48mNPv-aw,8361
@@ -46,8 +46,8 @@ lollms_client/tts_bindings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
46
46
  lollms_client/tts_bindings/lollms/__init__.py,sha256=8x2_T9XscvISw2TiaLoFxvrS7TIsVLdqbwSc04cX-wc,7164
47
47
  lollms_client/ttv_bindings/__init__.py,sha256=UZ8o2izQOJLQgtZ1D1cXoNST7rzqW22rL2Vufc7ddRc,3141
48
48
  lollms_client/ttv_bindings/lollms/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
- lollms_client-0.14.0.dist-info/licenses/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
50
- lollms_client-0.14.0.dist-info/METADATA,sha256=gkDoZr-SYxtqgyzp339qwmNj1_iBiFurvPVD6TTvc2Q,7276
51
- lollms_client-0.14.0.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
52
- lollms_client-0.14.0.dist-info/top_level.txt,sha256=NI_W8S4OYZvJjb0QWMZMSIpOrYzpqwPGYaklhyWKH2w,23
53
- lollms_client-0.14.0.dist-info/RECORD,,
49
+ lollms_client-0.14.1.dist-info/licenses/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
50
+ lollms_client-0.14.1.dist-info/METADATA,sha256=Z6n3yPUXNYMjZa0IVrhBQDyvXHRbvi7yQwaqaa1gptY,7276
51
+ lollms_client-0.14.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
52
+ lollms_client-0.14.1.dist-info/top_level.txt,sha256=NI_W8S4OYZvJjb0QWMZMSIpOrYzpqwPGYaklhyWKH2w,23
53
+ lollms_client-0.14.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.8.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5