byllm 0.4.2__py2.py3-none-any.whl → 0.4.3__py2.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 byllm might be problematic. Click here for more details.
byllm/schema.py
CHANGED
|
@@ -117,7 +117,10 @@ def _type_to_schema(ty: type, title: str = "", desc: str = "") -> dict:
|
|
|
117
117
|
f"Enum {ty.__name__} has mixed types. Not supported for schema generation."
|
|
118
118
|
)
|
|
119
119
|
enum_type = enum_type or int
|
|
120
|
-
|
|
120
|
+
|
|
121
|
+
enum_desc = f"\nThe value *should* be one in this list: {enum_values} where"
|
|
122
|
+
enum_desc += " the names are [" + ", ".join([e.name for e in ty]) + "]."
|
|
123
|
+
|
|
121
124
|
if enum_type not in (int, str):
|
|
122
125
|
raise ValueError(
|
|
123
126
|
f"Enum {ty.__name__} has unsupported type {enum_type}. "
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: byllm
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: byLLM Provides Easy to use APIs for different LLM Providers to be used with Jaseci's Jaclang Programming Language.
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: llm,jaclang,jaseci,byLLM
|
|
@@ -25,7 +25,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
25
25
|
Classifier: Programming Language :: Python :: 3.14
|
|
26
26
|
Provides-Extra: tools
|
|
27
27
|
Provides-Extra: video
|
|
28
|
-
Requires-Dist: jaclang (>=0.8.
|
|
28
|
+
Requires-Dist: jaclang (>=0.8.8)
|
|
29
29
|
Requires-Dist: litellm (>=1.75.5.post1)
|
|
30
30
|
Requires-Dist: loguru (>=0.7.2,<0.8.0)
|
|
31
31
|
Requires-Dist: pillow (>=10.4.0,<10.5.0)
|
|
@@ -42,8 +42,7 @@ Description-Content-Type: text/markdown
|
|
|
42
42
|
[Usage docs]: https://www.jac-lang.org/learn/jac-byllm/usage/
|
|
43
43
|
[Research Paper]: https://arxiv.org/abs/2405.08965
|
|
44
44
|
|
|
45
|
-
# byLLM :
|
|
46
|
-
> Prompt No More!
|
|
45
|
+
# byLLM : Less Prompting! More Coding!
|
|
47
46
|
|
|
48
47
|
[](https://pypi.org/project/byllm/) [](https://github.com/jaseci-labs/jaseci/actions/workflows/test-jaseci.yml)
|
|
49
48
|
|
|
@@ -74,7 +73,7 @@ with entry {
|
|
|
74
73
|
|
|
75
74
|
This simple piece of code replaces traditional prompt engineering without introducing additional complexity.
|
|
76
75
|
|
|
77
|
-
## Power Types with LLMs
|
|
76
|
+
## Power of Types with LLMs
|
|
78
77
|
|
|
79
78
|
Consider a program that detects the personality type of a historical figure from their name. This can eb built in a way that LLM picks from an enum and the output strictly adhere this type.
|
|
80
79
|
|
|
@@ -104,9 +103,9 @@ Even if we are elimination prompt engineering entierly, we allow specific ways t
|
|
|
104
103
|
```python
|
|
105
104
|
"""Represents the personal record of a person"""
|
|
106
105
|
obj Person {
|
|
107
|
-
has name;
|
|
108
|
-
has dob;
|
|
109
|
-
has ssn;
|
|
106
|
+
has name: str;
|
|
107
|
+
has dob: str;
|
|
108
|
+
has ssn: str;
|
|
110
109
|
}
|
|
111
110
|
|
|
112
111
|
sem Person.name = "Full name of the person";
|
|
@@ -3,9 +3,9 @@ byllm/llm.py,sha256=fjraqQaT1uiwxTjLW7Wm8TDnnl7N5xDztA2KhyUfIQE,3560
|
|
|
3
3
|
byllm/llm_connector.py,sha256=XK8ftsafTYWq7aAjDxk4R4OeyJ1P1ou2qrZAXOU9xmU,8546
|
|
4
4
|
byllm/mtir.py,sha256=V4fpc0-j_7pb8rVMV8yskc9XczUCtHczrj5OZGXKA8g,7083
|
|
5
5
|
byllm/plugin.py,sha256=T_uSAkiyuPiufo5SEUNcgMOU0Ns5Zbg7BPfMo_ihC9s,1132
|
|
6
|
-
byllm/schema.py,sha256=
|
|
6
|
+
byllm/schema.py,sha256=VnqL03DYhroWjWRioLRoGBLNbjixw8Nk381gsHLpNXw,8927
|
|
7
7
|
byllm/types.py,sha256=rS_ISxYeHmXQiP1rv9qMKDiojdwk_x7bckOhn8_DFJk,11311
|
|
8
|
-
byllm-0.4.
|
|
9
|
-
byllm-0.4.
|
|
10
|
-
byllm-0.4.
|
|
11
|
-
byllm-0.4.
|
|
8
|
+
byllm-0.4.3.dist-info/METADATA,sha256=ZfC-GsMnx6GhmcWuKHlMfH9XFtrsbIujNBZfk_qtKxw,7616
|
|
9
|
+
byllm-0.4.3.dist-info/WHEEL,sha256=MICUlqIgkuEnKh9OWy254Ca7q2MHOW-q0u36TZR60nU,92
|
|
10
|
+
byllm-0.4.3.dist-info/entry_points.txt,sha256=hUzQdaP8qTKkAqHfBpcqxQK02wixeyyzx3y-s6KyrQg,37
|
|
11
|
+
byllm-0.4.3.dist-info/RECORD,,
|
|
File without changes
|