indexify 0.2.24__tar.gz → 0.2.26__tar.gz
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.
- {indexify-0.2.24 → indexify-0.2.26}/PKG-INFO +1 -1
- {indexify-0.2.24 → indexify-0.2.26}/indexify/executor/agent.py +1 -1
- {indexify-0.2.24 → indexify-0.2.26}/indexify/executor/function_worker.py +3 -1
- {indexify-0.2.24 → indexify-0.2.26}/indexify/functions_sdk/data_objects.py +1 -1
- {indexify-0.2.24 → indexify-0.2.26}/indexify/functions_sdk/graph.py +55 -35
- {indexify-0.2.24 → indexify-0.2.26}/indexify/functions_sdk/graph_validation.py +1 -2
- {indexify-0.2.24 → indexify-0.2.26}/indexify/functions_sdk/indexify_functions.py +62 -78
- {indexify-0.2.24 → indexify-0.2.26}/indexify/functions_sdk/object_serializer.py +2 -1
- {indexify-0.2.24 → indexify-0.2.26}/indexify/http_client.py +16 -9
- {indexify-0.2.24 → indexify-0.2.26}/pyproject.toml +1 -1
- {indexify-0.2.24 → indexify-0.2.26}/LICENSE.txt +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/README.md +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/__init__.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/cli.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/data_loaders/__init__.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/data_loaders/local_directory_loader.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/data_loaders/url_loader.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/error.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/executor/api_objects.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/executor/downloader.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/executor/executor_tasks.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/executor/image_dependency_installer.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/executor/indexify_executor.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/executor/runtime_probes.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/executor/task_reporter.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/executor/task_store.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/functions_sdk/graph_definition.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/functions_sdk/image.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/functions_sdk/local_cache.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/functions_sdk/pipeline.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/remote_graph.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/remote_pipeline.py +0 -0
- {indexify-0.2.24 → indexify-0.2.26}/indexify/settings.py +0 -0
@@ -418,7 +418,7 @@ class ExtractorAgent:
|
|
418
418
|
headers={"Content-Type": "application/json"},
|
419
419
|
) as event_source:
|
420
420
|
if not event_source.response.is_success:
|
421
|
-
resp = await event_source.response.aread().decode(
|
421
|
+
resp = await event_source.response.aread().decode("utf-8")
|
422
422
|
console.print(f"failed to register: {str(resp)}")
|
423
423
|
await asyncio.sleep(5)
|
424
424
|
continue
|
@@ -17,6 +17,8 @@ from indexify.functions_sdk.indexify_functions import (
|
|
17
17
|
GraphInvocationContext,
|
18
18
|
IndexifyFunctionWrapper,
|
19
19
|
RouterCallResult,
|
20
|
+
IndexifyRouter,
|
21
|
+
IndexifyFunction,
|
20
22
|
)
|
21
23
|
|
22
24
|
function_wrapper_map: Dict[str, IndexifyFunctionWrapper] = {}
|
@@ -169,7 +171,7 @@ def _run_function(
|
|
169
171
|
fn = function_wrapper_map[key]
|
170
172
|
if (
|
171
173
|
str(type(fn.indexify_function))
|
172
|
-
== "<class 'indexify.functions_sdk.indexify_functions.
|
174
|
+
== "<class 'indexify.functions_sdk.indexify_functions.IndexifyRouter'>"
|
173
175
|
):
|
174
176
|
router_call_result: RouterCallResult = fn.invoke_router(fn_name, input)
|
175
177
|
router_output = RouterOutput(edges=router_call_result.edges)
|
@@ -30,10 +30,11 @@ from .graph_definition import (
|
|
30
30
|
from .graph_validation import validate_node, validate_route
|
31
31
|
from .indexify_functions import (
|
32
32
|
FunctionCallResult,
|
33
|
+
GraphInvocationContext,
|
33
34
|
IndexifyFunction,
|
34
35
|
IndexifyFunctionWrapper,
|
35
36
|
IndexifyRouter,
|
36
|
-
|
37
|
+
RouterCallResult,
|
37
38
|
)
|
38
39
|
from .local_cache import CacheAwareFunctionWrapper
|
39
40
|
from .object_serializer import get_serializer
|
@@ -73,17 +74,20 @@ class Graph:
|
|
73
74
|
self.accumulator_zero_values: Dict[str, Any] = {}
|
74
75
|
|
75
76
|
self.add_node(start_node)
|
77
|
+
if issubclass(start_node, IndexifyRouter):
|
78
|
+
self.routers[start_node.name] = []
|
76
79
|
self._start_node: str = start_node.name
|
77
80
|
|
78
81
|
# Storage for local execution
|
79
82
|
self._results: Dict[str, Dict[str, List[IndexifyData]]] = {}
|
80
83
|
self._cache = CacheAwareFunctionWrapper("./indexify_local_runner_cache")
|
81
84
|
self._accumulator_values: Dict[str, Dict[str, IndexifyData]] = {}
|
85
|
+
self._local_graph_ctx: Optional[GraphInvocationContext] = None
|
82
86
|
|
83
87
|
def get_function(self, name: str) -> IndexifyFunctionWrapper:
|
84
88
|
if name not in self.nodes:
|
85
89
|
raise ValueError(f"Function {name} not found in graph")
|
86
|
-
return IndexifyFunctionWrapper(self.nodes[name])
|
90
|
+
return IndexifyFunctionWrapper(self.nodes[name], self._local_graph_ctx)
|
87
91
|
|
88
92
|
def get_accumulators(self) -> Dict[str, Any]:
|
89
93
|
return self.accumulator_zero_values
|
@@ -153,14 +157,17 @@ class Graph:
|
|
153
157
|
|
154
158
|
def definition(self) -> ComputeGraphMetadata:
|
155
159
|
start_node = self.nodes[self._start_node]
|
160
|
+
is_reducer = False
|
161
|
+
if hasattr(start_node, 'accumulate'):
|
162
|
+
is_reducer = start_node.accumulate is not None
|
156
163
|
start_node = FunctionMetadata(
|
157
164
|
name=start_node.name,
|
158
165
|
fn_name=start_node.name,
|
159
166
|
description=start_node.description,
|
160
|
-
reducer=
|
167
|
+
reducer=is_reducer,
|
161
168
|
image_name=start_node.image._image_name,
|
162
169
|
image_information=start_node.image.to_image_information(),
|
163
|
-
payload_encoder=start_node.encoder
|
170
|
+
payload_encoder=start_node.encoder,
|
164
171
|
)
|
165
172
|
metadata_edges = self.edges.copy()
|
166
173
|
metadata_nodes = {}
|
@@ -205,7 +212,11 @@ class Graph:
|
|
205
212
|
def run(self, block_until_done: bool = False, **kwargs) -> str:
|
206
213
|
start_node = self.nodes[self._start_node]
|
207
214
|
serializer = get_serializer(start_node.encoder)
|
208
|
-
input = IndexifyData(
|
215
|
+
input = IndexifyData(
|
216
|
+
id=generate(),
|
217
|
+
payload=serializer.serialize(kwargs),
|
218
|
+
encoder=start_node.encoder,
|
219
|
+
)
|
209
220
|
print(f"[bold] Invoking {self._start_node}[/bold]")
|
210
221
|
outputs = defaultdict(list)
|
211
222
|
self._accumulator_values[input.id] = {}
|
@@ -216,37 +227,35 @@ class Graph:
|
|
216
227
|
k: IndexifyData(payload=serializer.serialize(v), encoder=node.encoder)
|
217
228
|
}
|
218
229
|
self._results[input.id] = outputs
|
219
|
-
enable_cache = kwargs.get("enable_cache", True)
|
220
230
|
ctx = GraphInvocationContext(
|
221
231
|
invocation_id=input.id,
|
222
232
|
graph_name=self.name,
|
223
233
|
graph_version="1",
|
224
234
|
indexify_client=None,
|
225
235
|
)
|
226
|
-
self.
|
236
|
+
self._local_graph_ctx = ctx
|
237
|
+
self._run(input, outputs)
|
227
238
|
return input.id
|
228
239
|
|
229
240
|
def _run(
|
230
241
|
self,
|
231
242
|
initial_input: IndexifyData,
|
232
243
|
outputs: Dict[str, List[bytes]],
|
233
|
-
enable_cache: bool,
|
234
|
-
ctx: GraphInvocationContext,
|
235
244
|
):
|
236
245
|
accumulator_values = self._accumulator_values[initial_input.id]
|
237
246
|
queue = deque([(self._start_node, initial_input)])
|
238
247
|
while queue:
|
239
248
|
node_name, input = queue.popleft()
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
if function_outputs
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
249
|
+
function_outputs: Union[
|
250
|
+
FunctionCallResult, RouterCallResult
|
251
|
+
] = self._invoke_fn(node_name, input)
|
252
|
+
self._log_local_exec_tracebacks(function_outputs)
|
253
|
+
if isinstance(function_outputs, RouterCallResult):
|
254
|
+
for edge in function_outputs.edges:
|
255
|
+
if edge in self.nodes:
|
256
|
+
queue.append((edge, input))
|
257
|
+
continue
|
258
|
+
out_edges = self.edges.get(node_name, [])
|
250
259
|
fn_outputs = function_outputs.ser_outputs
|
251
260
|
print(f"ran {node_name}: num outputs: {len(fn_outputs)}")
|
252
261
|
if accumulator_values.get(node_name, None) is not None:
|
@@ -260,26 +269,37 @@ class Graph:
|
|
260
269
|
)
|
261
270
|
continue
|
262
271
|
|
263
|
-
out_edges = self.edges.get(node_name, [])
|
264
|
-
# Figure out if there are any routers for this node
|
265
|
-
for i, edge in enumerate(out_edges):
|
266
|
-
if edge in self.routers:
|
267
|
-
out_edges.remove(edge)
|
268
|
-
for output in fn_outputs:
|
269
|
-
dynamic_edges = self._route(edge, output) or []
|
270
|
-
for dynamic_edge in dynamic_edges.edges:
|
271
|
-
if dynamic_edge in self.nodes:
|
272
|
-
print(
|
273
|
-
f"[bold]dynamic router returned node: {dynamic_edge}[/bold]"
|
274
|
-
)
|
275
|
-
out_edges.append(dynamic_edge)
|
276
272
|
for out_edge in out_edges:
|
277
273
|
for output in fn_outputs:
|
278
274
|
queue.append((out_edge, output))
|
279
275
|
|
280
|
-
def
|
281
|
-
|
282
|
-
|
276
|
+
def _invoke_fn(
|
277
|
+
self, node_name: str, input: IndexifyData
|
278
|
+
) -> Optional[Union[RouterCallResult, FunctionCallResult]]:
|
279
|
+
node = self.nodes[node_name]
|
280
|
+
if node_name in self.routers:
|
281
|
+
result = IndexifyFunctionWrapper(node, self._local_graph_ctx).invoke_router(
|
282
|
+
node_name, input
|
283
|
+
)
|
284
|
+
for dynamic_edge in result.edges:
|
285
|
+
if dynamic_edge in self.nodes:
|
286
|
+
print(f"[bold]dynamic router returned node: {dynamic_edge}[/bold]")
|
287
|
+
return result
|
288
|
+
|
289
|
+
acc_value = self._accumulator_values.get(node_name, None)
|
290
|
+
return IndexifyFunctionWrapper(
|
291
|
+
node, context=self._local_graph_ctx
|
292
|
+
).invoke_fn_ser(node_name, input, acc_value)
|
293
|
+
|
294
|
+
def _log_local_exec_tracebacks(
|
295
|
+
self, results: Union[FunctionCallResult, RouterCallResult]
|
296
|
+
):
|
297
|
+
if results.traceback_msg is not None:
|
298
|
+
print(results.traceback_msg)
|
299
|
+
import os
|
300
|
+
|
301
|
+
print("exiting local execution due to error")
|
302
|
+
os._exit(1)
|
283
303
|
|
284
304
|
def output(
|
285
305
|
self,
|
@@ -48,37 +48,6 @@ class GraphInvocationContext(BaseModel):
|
|
48
48
|
)
|
49
49
|
|
50
50
|
|
51
|
-
def format_filtered_traceback(exc_info=None):
|
52
|
-
"""
|
53
|
-
Format a traceback excluding indexify_functions.py lines.
|
54
|
-
Can be used in exception handlers to replace traceback.format_exc()
|
55
|
-
"""
|
56
|
-
if exc_info is None:
|
57
|
-
exc_info = sys.exc_info()
|
58
|
-
|
59
|
-
# Get the full traceback as a string
|
60
|
-
full_traceback = traceback.format_exception(*exc_info)
|
61
|
-
|
62
|
-
# Filter out lines containing indexify_functions.py
|
63
|
-
filtered_lines = []
|
64
|
-
skip_next = False
|
65
|
-
|
66
|
-
for line in full_traceback:
|
67
|
-
if "indexify_functions.py" in line:
|
68
|
-
skip_next = True
|
69
|
-
continue
|
70
|
-
if skip_next:
|
71
|
-
if line.strip().startswith("File "):
|
72
|
-
skip_next = False
|
73
|
-
else:
|
74
|
-
continue
|
75
|
-
filtered_lines.append(line)
|
76
|
-
|
77
|
-
# Clean up any double blank lines that might have been created
|
78
|
-
cleaned = re.sub(r"\n\s*\n\s*\n", "\n\n", "".join(filtered_lines))
|
79
|
-
return cleaned
|
80
|
-
|
81
|
-
|
82
51
|
def is_pydantic_model_from_annotation(type_annotation):
|
83
52
|
# If it's a string representation
|
84
53
|
if isinstance(type_annotation, str):
|
@@ -146,6 +115,11 @@ class IndexifyRouter:
|
|
146
115
|
pass
|
147
116
|
|
148
117
|
|
118
|
+
from inspect import signature
|
119
|
+
|
120
|
+
from typing_extensions import get_type_hints
|
121
|
+
|
122
|
+
|
149
123
|
def indexify_router(
|
150
124
|
name: Optional[str] = None,
|
151
125
|
description: Optional[str] = "",
|
@@ -154,28 +128,30 @@ def indexify_router(
|
|
154
128
|
encoder: Optional[str] = "cloudpickle",
|
155
129
|
):
|
156
130
|
def construct(fn):
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
131
|
+
# Get function signature using inspect.signature
|
132
|
+
fn_sig = signature(fn)
|
133
|
+
fn_hints = get_type_hints(fn)
|
134
|
+
|
135
|
+
# Create run method that preserves signature
|
136
|
+
def run(self, *args, **kwargs):
|
137
|
+
return fn(*args, **kwargs)
|
138
|
+
|
139
|
+
# Apply original signature and annotations to run method
|
140
|
+
run.__signature__ = fn_sig
|
141
|
+
run.__annotations__ = fn_hints
|
142
|
+
|
143
|
+
attrs = {
|
144
|
+
"name": name if name else fn.__name__,
|
145
|
+
"description": description
|
146
|
+
if description
|
147
|
+
else (fn.__doc__ or "").strip().replace("\n", ""),
|
148
|
+
"image": image,
|
149
|
+
"placement_constraints": placement_constraints,
|
150
|
+
"encoder": encoder,
|
151
|
+
"run": run,
|
152
|
+
}
|
153
|
+
|
154
|
+
return type("IndexifyRouter", (IndexifyRouter,), attrs)
|
179
155
|
|
180
156
|
return construct
|
181
157
|
|
@@ -189,28 +165,31 @@ def indexify_function(
|
|
189
165
|
placement_constraints: List[PlacementConstraints] = [],
|
190
166
|
):
|
191
167
|
def construct(fn):
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
168
|
+
# Get function signature using inspect.signature
|
169
|
+
fn_sig = signature(fn)
|
170
|
+
fn_hints = get_type_hints(fn)
|
171
|
+
|
172
|
+
# Create run method that preserves signature
|
173
|
+
def run(self, *args, **kwargs):
|
174
|
+
return fn(*args, **kwargs)
|
175
|
+
|
176
|
+
# Apply original signature and annotations to run method
|
177
|
+
run.__signature__ = fn_sig
|
178
|
+
run.__annotations__ = fn_hints
|
179
|
+
|
180
|
+
attrs = {
|
181
|
+
"name": name if name else fn.__name__,
|
182
|
+
"description": description
|
183
|
+
if description
|
184
|
+
else (fn.__doc__ or "").strip().replace("\n", ""),
|
185
|
+
"image": image,
|
186
|
+
"placement_constraints": placement_constraints,
|
187
|
+
"accumulate": accumulate,
|
188
|
+
"encoder": encoder,
|
189
|
+
"run": run,
|
190
|
+
}
|
191
|
+
|
192
|
+
return type("IndexifyFunction", (IndexifyFunction,), attrs)
|
214
193
|
|
215
194
|
return construct
|
216
195
|
|
@@ -266,7 +245,7 @@ class IndexifyFunctionWrapper:
|
|
266
245
|
try:
|
267
246
|
extracted_data = self.indexify_function.run(*args, **kwargs)
|
268
247
|
except Exception as e:
|
269
|
-
return [],
|
248
|
+
return [], traceback.format_exc()
|
270
249
|
if not isinstance(extracted_data, list) and extracted_data is not None:
|
271
250
|
return [extracted_data.name], None
|
272
251
|
edges = []
|
@@ -289,7 +268,7 @@ class IndexifyFunctionWrapper:
|
|
289
268
|
try:
|
290
269
|
extracted_data = self.indexify_function.run(*args, **kwargs)
|
291
270
|
except Exception as e:
|
292
|
-
return [],
|
271
|
+
return [], traceback.format_exc()
|
293
272
|
if extracted_data is None:
|
294
273
|
return [], None
|
295
274
|
|
@@ -313,7 +292,11 @@ class IndexifyFunctionWrapper:
|
|
313
292
|
)
|
314
293
|
outputs, err = self.run_fn(input, acc=acc)
|
315
294
|
ser_outputs = [
|
316
|
-
IndexifyData(
|
295
|
+
IndexifyData(
|
296
|
+
payload=serializer.serialize(output),
|
297
|
+
encoder=self.indexify_function.encoder,
|
298
|
+
)
|
299
|
+
for output in outputs
|
317
300
|
]
|
318
301
|
return FunctionCallResult(ser_outputs=ser_outputs, traceback_msg=err)
|
319
302
|
|
@@ -328,6 +311,7 @@ class IndexifyFunctionWrapper:
|
|
328
311
|
serializer = get_serializer(encoder)
|
329
312
|
return serializer.deserialize(payload)
|
330
313
|
|
314
|
+
|
331
315
|
def get_ctx() -> GraphInvocationContext:
|
332
316
|
frame = inspect.currentframe()
|
333
317
|
caller_frame = frame.f_back.f_back
|
@@ -1,7 +1,7 @@
|
|
1
1
|
from typing import Any, List
|
2
2
|
|
3
|
-
import jsonpickle
|
4
3
|
import cloudpickle
|
4
|
+
import jsonpickle
|
5
5
|
import msgpack
|
6
6
|
from pydantic import BaseModel
|
7
7
|
|
@@ -17,6 +17,7 @@ def get_serializer(serializer_type: str) -> Any:
|
|
17
17
|
return JsonSerializer()
|
18
18
|
raise ValueError(f"Unknown serializer type: {serializer_type}")
|
19
19
|
|
20
|
+
|
20
21
|
class JsonSerializer:
|
21
22
|
@staticmethod
|
22
23
|
def serialize(data: Any) -> str:
|
@@ -16,6 +16,7 @@ from indexify.functions_sdk.graph import ComputeGraphMetadata, Graph
|
|
16
16
|
from indexify.functions_sdk.indexify_functions import IndexifyFunction
|
17
17
|
from indexify.settings import DEFAULT_SERVICE_URL
|
18
18
|
|
19
|
+
|
19
20
|
class InvocationEventPayload(BaseModel):
|
20
21
|
invocation_id: str
|
21
22
|
fn_name: str
|
@@ -76,7 +77,9 @@ class IndexifyClient:
|
|
76
77
|
self._fns: Dict[str, IndexifyFunction] = {}
|
77
78
|
self._api_key = api_key
|
78
79
|
if not self._api_key:
|
79
|
-
print(
|
80
|
+
print(
|
81
|
+
"API key not provided. Trying to fetch from environment TENSORLAKE_API_KEY variable"
|
82
|
+
)
|
80
83
|
self._api_key = os.getenv("TENSORLAKE_API_KEY")
|
81
84
|
|
82
85
|
def _request(self, method: str, **kwargs) -> httpx.Response:
|
@@ -143,7 +146,7 @@ class IndexifyClient:
|
|
143
146
|
verify=verify_option,
|
144
147
|
)
|
145
148
|
return client
|
146
|
-
|
149
|
+
|
147
150
|
def _add_api_key(self, kwargs):
|
148
151
|
if self._api_key:
|
149
152
|
kwargs["headers"] = {"Authorization": f"Bearer {self._api_key}"}
|
@@ -213,16 +216,16 @@ class IndexifyClient:
|
|
213
216
|
self, compute_graph: str, invocation_id: str, key: str, value: Json
|
214
217
|
) -> None:
|
215
218
|
response = self._post(
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
+
f"internal/namespaces/{self.namespace}/compute_graphs/{compute_graph}/invocations/{invocation_id}/ctx",
|
220
|
+
json={"key": key, "value": value},
|
221
|
+
)
|
219
222
|
response.raise_for_status()
|
220
223
|
|
221
224
|
def get_state_key(self, compute_graph: str, invocation_id: str, key: str) -> Json:
|
222
225
|
response = self._get(
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
+
f"internal/namespaces/{self.namespace}/compute_graphs/{compute_graph}/invocations/{invocation_id}/ctx",
|
227
|
+
json={"key": key},
|
228
|
+
)
|
226
229
|
response.raise_for_status()
|
227
230
|
return response.json().get("value")
|
228
231
|
|
@@ -270,7 +273,11 @@ class IndexifyClient:
|
|
270
273
|
) -> str:
|
271
274
|
ser_input = cloudpickle.dumps(kwargs)
|
272
275
|
params = {"block_until_finish": block_until_done}
|
273
|
-
kwargs = {
|
276
|
+
kwargs = {
|
277
|
+
"headers": {"Content-Type": "application/cbor"},
|
278
|
+
"data": ser_input,
|
279
|
+
"params": params,
|
280
|
+
}
|
274
281
|
self._add_api_key(kwargs)
|
275
282
|
with httpx.Client() as client:
|
276
283
|
with connect_sse(
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|