ventures: refresh havre from havre-next

This commit is contained in:
github-actions[bot] committed 2026-10-16 17:28:25 +00:00
1 parent 6a31ce7c91
commit 0b2a402e9d
7 files changed
+159 -44

No files matched your search

+6 -3
View File
@@ -98,9 +98,12 @@ export class Venice {
return { blob: await res.blob(), blurred: res.headers && res.headers.get ? res.headers.get("x-venice-is-blurred") === "true" : false };
}
/** a picture from words alone (a first portrait), with safe mode on. Returns { blob, blurred }. */
async generateImage({ model, prompt, aspect = "", signal } = {}) {
const body = { model, prompt, safe_mode: true, format: "webp", return_binary: true };
/**
* A picture from words alone (a portrait for a character's card). Venice's safe mode is on unless safe is false,
* which Havre passes only for an adult character (abilities.js adultCheck, drawn). Returns { blob, blurred }.
*/
async generateImage({ model, prompt, aspect = "", safe = true, signal } = {}) {
const body = { model, prompt, safe_mode: safe !== false, format: "webp", return_binary: true };
if (aspect) body.aspect_ratio = aspect;
const res = await this.raw("/image/generate", { body, signal });
return { blob: await res.blob(), blurred: res.headers && res.headers.get ? res.headers.get("x-venice-is-blurred") === "true" : false };