feat: add local auth billing and usage management
This commit is contained in:
1 parent
f642b5e71f
commit
196fdde83f
119 files changed
+15695
-2650
No files matched your search
@@ -7,7 +7,7 @@ import {
|
||||
} from "@/lib/evolink/image-client";
|
||||
|
||||
describe("EvoLink image client helpers", () => {
|
||||
it("builds payloads for GPT Image 2 generation", () => {
|
||||
it("builds GPT Image 2 payloads with the platform 1K resolution", () => {
|
||||
const payload = buildEvolinkImagePayload("image.generate", {
|
||||
prompt: "商品海报",
|
||||
imageUrls: ["https://example.com/ref.png"],
|
||||
@@ -16,8 +16,7 @@ describe("EvoLink image client helpers", () => {
|
||||
}, {
|
||||
baseUrl: "https://api.evolink.ai",
|
||||
model: "gpt-image-2",
|
||||
quality: "medium",
|
||||
resolution: "2K"
|
||||
quality: "medium"
|
||||
});
|
||||
|
||||
expect(payload).toMatchObject({
|
||||
@@ -26,29 +25,11 @@ describe("EvoLink image client helpers", () => {
|
||||
image_urls: ["https://example.com/ref.png"],
|
||||
size: "1:1",
|
||||
quality: "medium",
|
||||
resolution: "2K",
|
||||
resolution: "1K",
|
||||
n: 1
|
||||
});
|
||||
});
|
||||
|
||||
it("maps inpainting original and mask URLs", () => {
|
||||
const payload = buildEvolinkImagePayload("image.inpaint", {
|
||||
prompt: "移除背景杂物",
|
||||
quality: "high",
|
||||
imageUrls: ["https://example.com/original.png", "https://example.com/mask.png"]
|
||||
}, {
|
||||
baseUrl: "https://api.evolink.ai",
|
||||
model: "gpt-image-2",
|
||||
quality: "medium"
|
||||
});
|
||||
|
||||
expect(payload).toMatchObject({
|
||||
image_urls: ["https://example.com/original.png"],
|
||||
mask_url: "https://example.com/mask.png",
|
||||
quality: "high"
|
||||
});
|
||||
});
|
||||
|
||||
it("normalizes task ids, statuses, and result URLs", () => {
|
||||
const response = {
|
||||
data: {
|
||||
|
||||
Reference in new issue
Block a user