This commit is contained in:
2024-01-15 12:36:42 +08:00
commit dabdbb42de
11 changed files with 306 additions and 0 deletions

21
tests/deno.ts Normal file
View File

@@ -0,0 +1,21 @@
const url = "http://10.39.39.9:7999/v1/embeddings";
const input: string[] = [];
for (let i = 0; i < 1000; i++) {
input.push("我是一名大学生");
}
const resp = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "acge-large-zh",
input,
}),
});
const result = await resp.json();
console.log(result);