runwayml 3.7.2__py3-none-any.whl → 3.8.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.
- runwayml/_base_client.py +4 -1
- runwayml/_files.py +4 -4
- runwayml/_version.py +1 -1
- {runwayml-3.7.2.dist-info → runwayml-3.8.0.dist-info}/METADATA +1 -1
- {runwayml-3.7.2.dist-info → runwayml-3.8.0.dist-info}/RECORD +7 -7
- {runwayml-3.7.2.dist-info → runwayml-3.8.0.dist-info}/WHEEL +0 -0
- {runwayml-3.7.2.dist-info → runwayml-3.8.0.dist-info}/licenses/LICENSE +0 -0
runwayml/_base_client.py
CHANGED
@@ -532,7 +532,10 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
532
532
|
is_body_allowed = options.method.lower() != "get"
|
533
533
|
|
534
534
|
if is_body_allowed:
|
535
|
-
|
535
|
+
if isinstance(json_data, bytes):
|
536
|
+
kwargs["content"] = json_data
|
537
|
+
else:
|
538
|
+
kwargs["json"] = json_data if is_given(json_data) else None
|
536
539
|
kwargs["files"] = files
|
537
540
|
else:
|
538
541
|
headers.pop("Content-Type", None)
|
runwayml/_files.py
CHANGED
@@ -69,12 +69,12 @@ def _transform_file(file: FileTypes) -> HttpxFileTypes:
|
|
69
69
|
return file
|
70
70
|
|
71
71
|
if is_tuple_t(file):
|
72
|
-
return (file[0],
|
72
|
+
return (file[0], read_file_content(file[1]), *file[2:])
|
73
73
|
|
74
74
|
raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")
|
75
75
|
|
76
76
|
|
77
|
-
def
|
77
|
+
def read_file_content(file: FileContent) -> HttpxFileContent:
|
78
78
|
if isinstance(file, os.PathLike):
|
79
79
|
return pathlib.Path(file).read_bytes()
|
80
80
|
return file
|
@@ -111,12 +111,12 @@ async def _async_transform_file(file: FileTypes) -> HttpxFileTypes:
|
|
111
111
|
return file
|
112
112
|
|
113
113
|
if is_tuple_t(file):
|
114
|
-
return (file[0], await
|
114
|
+
return (file[0], await async_read_file_content(file[1]), *file[2:])
|
115
115
|
|
116
116
|
raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")
|
117
117
|
|
118
118
|
|
119
|
-
async def
|
119
|
+
async def async_read_file_content(file: FileContent) -> HttpxFileContent:
|
120
120
|
if isinstance(file, os.PathLike):
|
121
121
|
return await anyio.Path(file).read_bytes()
|
122
122
|
|
runwayml/_version.py
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
runwayml/__init__.py,sha256=tr-n2Y4sH_wBv8t2F_jk7ku_rLT2erU3j61ONZJWUVs,2743
|
2
|
-
runwayml/_base_client.py,sha256=
|
2
|
+
runwayml/_base_client.py,sha256=gazXywnP1B_K-uIiHyatCzG0ZbkBPgEs2ogVl45Y6EU,67037
|
3
3
|
runwayml/_client.py,sha256=Zn4rh2kWC5LhgqSx5QgsQfPyeqRscyZ-RWtI1PDMZYg,19532
|
4
4
|
runwayml/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
|
5
5
|
runwayml/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
|
6
6
|
runwayml/_exceptions.py,sha256=p2Q8kywHCVQzArLQL4Ht-HetTBhAvevU6yDvEq7PpIE,3224
|
7
|
-
runwayml/_files.py,sha256=
|
7
|
+
runwayml/_files.py,sha256=KnEzGi_O756MvKyJ4fOCW_u3JhOeWPQ4RsmDvqihDQU,3545
|
8
8
|
runwayml/_models.py,sha256=KvjsMfb88XZlFUKVoOxr8OyDj47MhoH2OKqWNEbBhk4,30010
|
9
9
|
runwayml/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
|
10
10
|
runwayml/_resource.py,sha256=BF-j3xY5eRTKmuTxg8eDhLtLP4MLB1phDh_B6BKipKA,1112
|
11
11
|
runwayml/_response.py,sha256=WxjSEXX-j01ZhlSxYyMCVSEKxo20pgy40RA7iyski8M,28800
|
12
12
|
runwayml/_streaming.py,sha256=NSVuAgknVQWU1cgZEjQn01IdZKKynb5rOeYp5Lo-OEQ,10108
|
13
13
|
runwayml/_types.py,sha256=YL6SdhLq5SHlT644GjzDwOJ_Slyr8QDRCoacOp4trhI,6199
|
14
|
-
runwayml/_version.py,sha256=
|
14
|
+
runwayml/_version.py,sha256=ZmXurOZWw33srzuBkN_1Vm74acZopKdlQ5UgKrzsuns,160
|
15
15
|
runwayml/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
16
|
runwayml/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
|
17
17
|
runwayml/_utils/_logs.py,sha256=ZfS5W59hdqEBVV86lNrk28PhvUxtHOzs9JqiLhSu0pI,780
|
@@ -45,7 +45,7 @@ runwayml/types/text_to_image_create_params.py,sha256=I8Dr4UG6VnciQ87zN6qp03FKwlQ
|
|
45
45
|
runwayml/types/text_to_image_create_response.py,sha256=koMzUg82dYFQPp77wln3UR1z8WO2sHCNMWGgoQ9Id8M,262
|
46
46
|
runwayml/types/video_upscale_create_params.py,sha256=Ta3BNQy9aeTUBU5Ui-CMJtF32HeNRqbNpqjAAOKXyks,743
|
47
47
|
runwayml/types/video_upscale_create_response.py,sha256=zf-79HbJa68dUHltBiZjVtnW_U6HUI-htmkTm5URBSU,264
|
48
|
-
runwayml-3.
|
49
|
-
runwayml-3.
|
50
|
-
runwayml-3.
|
51
|
-
runwayml-3.
|
48
|
+
runwayml-3.8.0.dist-info/METADATA,sha256=v5PFmYLPefDwHNs_HNHkToTg1FZyIgzOPmSpXmgpP2c,15157
|
49
|
+
runwayml-3.8.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
50
|
+
runwayml-3.8.0.dist-info/licenses/LICENSE,sha256=baeFj6izBWIm6A5_7N3-WAsy_VYpDF05Dd4zS1zsfZI,11338
|
51
|
+
runwayml-3.8.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|