osbot-utils 2.47.0__py3-none-any.whl → 2.49.0__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.
- osbot_utils/helpers/llms/schemas/Schema__LLM_Request.py +3 -2
- osbot_utils/type_safe/steps/Type_Safe__Step__From_Json.py +3 -1
- osbot_utils/utils/Http.py +1 -1
- osbot_utils/version +1 -1
- {osbot_utils-2.47.0.dist-info → osbot_utils-2.49.0.dist-info}/METADATA +2 -2
- {osbot_utils-2.47.0.dist-info → osbot_utils-2.49.0.dist-info}/RECORD +8 -8
- {osbot_utils-2.47.0.dist-info → osbot_utils-2.49.0.dist-info}/WHEEL +1 -1
- {osbot_utils-2.47.0.dist-info → osbot_utils-2.49.0.dist-info}/LICENSE +0 -0
@@ -3,5 +3,6 @@ from osbot_utils.type_safe.Type_Safe import Type_Saf
|
|
3
3
|
|
4
4
|
|
5
5
|
class Schema__LLM_Request(Type_Safe):
|
6
|
-
|
7
|
-
|
6
|
+
request_data : Schema__LLM_Request__Data
|
7
|
+
|
8
|
+
# request_id : Obj_Id # can't put this id here or we won't be able to cache this data
|
@@ -50,8 +50,10 @@ class Type_Safe__Step__From_Json:
|
|
50
50
|
annotation = type_safe_annotations.obj_attribute_annotation(_self, key)
|
51
51
|
annotation_origin = type_safe_cache.get_origin(annotation)
|
52
52
|
|
53
|
+
if type(annotation) is type and issubclass(annotation, Type_Safe) and type(value) is dict: # if the annotation is a Type_Safe class and the value is a dict
|
54
|
+
value = annotation.from_json(value) # we can use the Type_Safe.from_json to create the deserialized value object
|
53
55
|
|
54
|
-
|
56
|
+
elif annotation == type: # Handle type objects
|
55
57
|
value = self.deserialize_type__using_value(value)
|
56
58
|
elif annotation_origin == type: # Handle type objects inside ForwardRef
|
57
59
|
value = self.deserialize_type__using_value(value)
|
osbot_utils/utils/Http.py
CHANGED
@@ -6,7 +6,7 @@ import ssl
|
|
6
6
|
import unicodedata
|
7
7
|
from http.cookies import SimpleCookie
|
8
8
|
from time import sleep
|
9
|
-
from urllib.parse import quote, urljoin, urlparse
|
9
|
+
from urllib.parse import quote, urljoin, urlparse
|
10
10
|
from urllib.request import Request, urlopen
|
11
11
|
|
12
12
|
from osbot_utils.utils.Str import html_decode
|
osbot_utils/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
v2.
|
1
|
+
v2.49.0
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: osbot_utils
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.49.0
|
4
4
|
Summary: OWASP Security Bot - Utils
|
5
5
|
License: MIT
|
6
6
|
Author: Dinis Cruz
|
@@ -23,7 +23,7 @@ Description-Content-Type: text/markdown
|
|
23
23
|
|
24
24
|
Powerful Python util methods and classes that simplify common apis and tasks.
|
25
25
|
|
26
|
-

|
27
27
|
[](https://codecov.io/gh/owasp-sbot/OSBot-Utils)
|
28
28
|
|
29
29
|
|
@@ -208,7 +208,7 @@ osbot_utils/helpers/llms/platforms/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQe
|
|
208
208
|
osbot_utils/helpers/llms/platforms/open_ai/API__LLM__Open_AI.py,sha256=Yyy2ZnIS6CfxXepP9pZNsOYx02d-5EnK1IFeFf8myyk,2148
|
209
209
|
osbot_utils/helpers/llms/platforms/open_ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
210
210
|
osbot_utils/helpers/llms/schemas/Schema__LLM_Cache__Index.py,sha256=12dUUSFhWRZvqEkNivqajqMPApPWhfSI7jWnHyBuxNw,717
|
211
|
-
osbot_utils/helpers/llms/schemas/Schema__LLM_Request.py,sha256=
|
211
|
+
osbot_utils/helpers/llms/schemas/Schema__LLM_Request.py,sha256=UUiqZQ5mj16SPdlzef7_j3myLaKKCZdAUjsWUJnK1Ag,378
|
212
212
|
osbot_utils/helpers/llms/schemas/Schema__LLM_Request__Data.py,sha256=EpII6ZMkWACkoHYn-TNowppbIskyoaCovefPA5Q5qtA,1380
|
213
213
|
osbot_utils/helpers/llms/schemas/Schema__LLM_Request__Function_Call.py,sha256=VJgWi4aK-DJmuJvfY2qZUZuLkrLlmu5lgyzxZrrp3hM,440
|
214
214
|
osbot_utils/helpers/llms/schemas/Schema__LLM_Request__Message__Content.py,sha256=nl-16yz4G_72ViACKE9CvGStrKxw2Gm_JcaU8wVcJXI,521
|
@@ -362,7 +362,7 @@ osbot_utils/type_safe/shared/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
|
|
362
362
|
osbot_utils/type_safe/steps/Type_Safe__Step__Class_Kwargs.py,sha256=snoyJKvZ1crgF2fp0zexwNPnV_E63RfyRIsMAZdrKNY,6995
|
363
363
|
osbot_utils/type_safe/steps/Type_Safe__Step__Default_Kwargs.py,sha256=tzKXDUc0HVP5QvCWsmcPuuZodNvQZ9FeMDNI2x00Ngw,1943
|
364
364
|
osbot_utils/type_safe/steps/Type_Safe__Step__Default_Value.py,sha256=b5vsgM8eg9yq2KM0wRMntVHma6OhN_HnU76LxhEIpoA,4483
|
365
|
-
osbot_utils/type_safe/steps/Type_Safe__Step__From_Json.py,sha256=
|
365
|
+
osbot_utils/type_safe/steps/Type_Safe__Step__From_Json.py,sha256=33nlJC9WymFHf5JQzbpCF5sUpfsAcziyhNXkKC9YAPk,14517
|
366
366
|
osbot_utils/type_safe/steps/Type_Safe__Step__Init.py,sha256=dQRwFxEMdmoW2ogmYZ6ZxLOvt1XnALx41LPpIB6yp3s,4473
|
367
367
|
osbot_utils/type_safe/steps/Type_Safe__Step__Set_Attr.py,sha256=VuKHH9QEYlbAL9R4zwQ5dwexx2sFY6wMx52QmF7eqcg,5219
|
368
368
|
osbot_utils/type_safe/steps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -380,7 +380,7 @@ osbot_utils/utils/Env.py,sha256=rBksAy6k-J5oAJp-S_JedVlcj1b2VK8V3zsQbacopMc,6076
|
|
380
380
|
osbot_utils/utils/Exceptions.py,sha256=KyOUHkXQ_6jDTq04Xm261dbEZuRidtsM4dgzNwSG8-8,389
|
381
381
|
osbot_utils/utils/Files.py,sha256=YwfXMeU1jfDzYvZJGy0bWHvvduTuTnftBNlAnpsXDzw,23013
|
382
382
|
osbot_utils/utils/Functions.py,sha256=0E6alPJ0fJpBiJgFOWooCOi265wSRyxxXAJ5CELBnso,3498
|
383
|
-
osbot_utils/utils/Http.py,sha256=
|
383
|
+
osbot_utils/utils/Http.py,sha256=pLDwq0Jd4Zmpps0gEzXTbeycSFRXMN8W-DprNpYq9A0,8189
|
384
384
|
osbot_utils/utils/Int.py,sha256=PmlUdU4lSwf4gJdmTVdqclulkEp7KPCVUDO6AcISMF4,116
|
385
385
|
osbot_utils/utils/Json.py,sha256=TvfDoXwOkWzWH-9KMnme5C7iFsMZOleAeue92qmkH6g,8831
|
386
386
|
osbot_utils/utils/Json_Cache.py,sha256=mLPkkDZN-3ZVJiDvV1KBJXILtKkTZ4OepzOsDoBPhWg,2006
|
@@ -398,8 +398,8 @@ osbot_utils/utils/Toml.py,sha256=Rxl8gx7mni5CvBAK-Ai02EKw-GwtJdd3yeHT2kMloik,166
|
|
398
398
|
osbot_utils/utils/Version.py,sha256=Ww6ChwTxqp1QAcxOnztkTicShlcx6fbNsWX5xausHrg,422
|
399
399
|
osbot_utils/utils/Zip.py,sha256=pR6sKliUY0KZXmqNzKY2frfW-YVQEVbLKiyqQX_lc-8,14052
|
400
400
|
osbot_utils/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
401
|
-
osbot_utils/version,sha256=
|
402
|
-
osbot_utils-2.
|
403
|
-
osbot_utils-2.
|
404
|
-
osbot_utils-2.
|
405
|
-
osbot_utils-2.
|
401
|
+
osbot_utils/version,sha256=CEEqca0ZjNxCEaFWjMBPEzMYD-uTK0eU1OOL2KYaxeU,8
|
402
|
+
osbot_utils-2.49.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
403
|
+
osbot_utils-2.49.0.dist-info/METADATA,sha256=kb3h0ATFkDrSd2TNuiPd3fHfUP5xkGEP6H4a5E3r6RE,1329
|
404
|
+
osbot_utils-2.49.0.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
405
|
+
osbot_utils-2.49.0.dist-info/RECORD,,
|
File without changes
|