@gendive/slide 0.1.10 → 0.1.11
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/dist/devdive-slide.es.js
CHANGED
|
@@ -6313,12 +6313,13 @@ class $f extends Error {
|
|
|
6313
6313
|
}
|
|
6314
6314
|
}
|
|
6315
6315
|
const xv = async (t, e, n, o, i, c) => {
|
|
6316
|
-
const h = `${e.baseUrl || ZS}/${t}`, p =
|
|
6316
|
+
const h = `${e.baseUrl || ZS}/${t}`, p = {
|
|
6317
|
+
"Content-Type": "application/json"
|
|
6318
|
+
};
|
|
6319
|
+
!e.skipAuth && e.apiKey && (p["X-API-KEY"] = e.apiKey), e.customHeaders && Object.assign(p, e.customHeaders);
|
|
6320
|
+
const u = await fetch(h, {
|
|
6317
6321
|
method: "POST",
|
|
6318
|
-
headers:
|
|
6319
|
-
"Content-Type": "application/json",
|
|
6320
|
-
"X-API-KEY": e.apiKey
|
|
6321
|
-
},
|
|
6322
|
+
headers: p,
|
|
6322
6323
|
body: JSON.stringify({
|
|
6323
6324
|
prompt: n,
|
|
6324
6325
|
system_prompt: o,
|
|
@@ -6326,15 +6327,15 @@ const xv = async (t, e, n, o, i, c) => {
|
|
|
6326
6327
|
temperature: c || 0.7
|
|
6327
6328
|
})
|
|
6328
6329
|
});
|
|
6329
|
-
if (!
|
|
6330
|
-
const
|
|
6330
|
+
if (!u.ok) {
|
|
6331
|
+
const A = await u.json().catch(() => ({}));
|
|
6331
6332
|
throw new $f(
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6333
|
+
A.detail || `DevDive API 오류: ${u.status}`,
|
|
6334
|
+
A.code,
|
|
6335
|
+
u.status
|
|
6335
6336
|
);
|
|
6336
6337
|
}
|
|
6337
|
-
return
|
|
6338
|
+
return u.json();
|
|
6338
6339
|
}, $S = async (t, e) => {
|
|
6339
6340
|
const o = `당신은 프레젠테이션 콘텐츠 작성 전문가입니다. ${{
|
|
6340
6341
|
title: "제목으로 사용할 짧고 임팩트 있는",
|