@ornncompute/cli 1.0.244 → 1.0.246
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.
package/package.json
CHANGED
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
async function listModels(request) {
|
|
3
3
|
return await request("/v1/inference/models");
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
return fetcher(
|
|
5
|
+
function postInference(fetcher, path3, body2, signal) {
|
|
6
|
+
return fetcher(path3, {
|
|
7
7
|
method: "POST",
|
|
8
8
|
headers: { "Content-Type": "application/json" },
|
|
9
9
|
body: JSON.stringify(body2),
|
|
10
10
|
signal
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
+
function createChatCompletion(fetcher, body2, signal) {
|
|
14
|
+
return postInference(fetcher, "/v1/inference/chat/completions", body2, signal);
|
|
15
|
+
}
|
|
13
16
|
function requestQuery(query3) {
|
|
14
17
|
const params = new URLSearchParams();
|
|
15
18
|
for (const [key, value] of Object.entries(query3)) {
|