MCPcopy Index your code
hub / github.com/Bytez-com/docs / run

Method run

sdk/javascript/src/model.ts:67–90  ·  view source on GitHub ↗
(
    input?: any,
    params?: Inference | Stream,
    stream?: Stream
  )

Source from the content-addressed store, hash-verified

65 stream?: Stream
66 ): Promise<ModelRunOutput<Stream>>;
67 async run<Stream extends boolean = false>(
68 input?: any,
69 params?: Inference | Stream,
70 stream?: Stream
71 ) {
72 const postBody: RequestBody = {
73 params:
74 typeof params === "boolean" || params === undefined ? undefined : params
75 };
76
77 await this.#ready;
78
79 if (params === true || stream === true) {
80 if (this.#isGeneratingMedia) {
81 postBody.json = false;
82 } else {
83 postBody.stream = true;
84 }
85 }
86
87 postBody["input"] = input;
88
89 return this.#client.request(this.id, "POST", postBody, this.#providerKey);
90 }
91}

Callers 1

tasks.test.tsFile · 0.45

Calls 1

requestMethod · 0.45

Tested by

no test coverage detected