File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -227,6 +227,24 @@ def _make_status_error(
227227 if response .status_code >= 500 :
228228 return _exceptions .InternalServerError (err_msg , response = response , body = body )
229229 return APIStatusError (err_msg , response = response , body = body )
230+
231+ def run (
232+ self ,
233+ ref : str ,
234+ input : dict [str , Any ] | None = None ,
235+ * ,
236+ use_file_output : bool = True ,
237+ ) -> Any :
238+ """
239+ Example custom method
240+
241+ """
242+
243+ # there is some custom logic like run you can embed
244+ # e.g. version, owner, name, version_id = identifier._resolve(ref)
245+ prediction = self .predictions .create (version = "placeholder" , input = input )
246+
247+ return prediction .output
230248
231249
232250class AsyncReplicateClient (AsyncAPIClient ):
@@ -411,6 +429,7 @@ def _make_status_error(
411429 return APIStatusError (err_msg , response = response , body = body )
412430
413431
432+
414433class ReplicateClientWithRawResponse :
415434 def __init__ (self , client : ReplicateClient ) -> None :
416435 self .collections = collections .CollectionsResourceWithRawResponse (client .collections )
You can’t perform that action at this time.
0 commit comments