From 5d52c2cbf8a70215e8a44fe2c2157fac466167a7 Mon Sep 17 00:00:00 2001 From: eastfilmm Date: Sun, 12 Nov 2023 11:22:18 +0000 Subject: [PATCH] deploy: 940b050938fafa4f6bcfdfc6acf94c23d9273536 --- assets/{index-df1250ba.js => index-ba90b73a.js} | 4 ++-- index.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename assets/{index-df1250ba.js => index-ba90b73a.js} (98%) diff --git a/assets/index-df1250ba.js b/assets/index-ba90b73a.js similarity index 98% rename from assets/index-df1250ba.js rename to assets/index-ba90b73a.js index 2912cb6..aeac48d 100644 --- a/assets/index-df1250ba.js +++ b/assets/index-ba90b73a.js @@ -175,10 +175,10 @@ Error generating stack: `+i.message+` `,sw=j.div` margin-bottom: 1rem; `;var io={},vm={},Iu={exports:{}},gm=function(t,n){return function(){for(var o=new Array(arguments.length),i=0;i"u"}function aw(e){return e!==null&&!Pa(e)&&e.constructor!==null&&!Pa(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function ym(e){return tn.call(e)==="[object ArrayBuffer]"}function uw(e){return tn.call(e)==="[object FormData]"}function cw(e){var t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ym(e.buffer),t}function dw(e){return typeof e=="string"}function fw(e){return typeof e=="number"}function wm(e){return e!==null&&typeof e=="object"}function ti(e){if(tn.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function pw(e){return tn.call(e)==="[object Date]"}function hw(e){return tn.call(e)==="[object File]"}function mw(e){return tn.call(e)==="[object Blob]"}function Sm(e){return tn.call(e)==="[object Function]"}function vw(e){return wm(e)&&Sm(e.pipe)}function gw(e){return tn.call(e)==="[object URLSearchParams]"}function yw(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function ww(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Du(e,t){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),$u(e))for(var n=0,r=e.length;n"u"||(Pn.isArray(a)?u=u+"[]":a=[a],Pn.forEach(a,function(d){Pn.isDate(d)?d=d.toISOString():Pn.isObject(d)&&(d=JSON.stringify(d)),i.push(_d(u)+"="+_d(d))}))}),o=i.join("&")}if(o){var s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t},Ew=Fe;function ls(){this.handlers=[]}ls.prototype.use=function(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1};ls.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};ls.prototype.forEach=function(t){Ew.forEach(this.handlers,function(r){r!==null&&t(r)})};var Ow=ls,Cw=Fe,kw=function(t,n){Cw.forEach(t,function(o,i){i!==n&&i.toUpperCase()===n.toUpperCase()&&(t[n]=o,delete t[i])})},Em=function(t,n,r,o,i){return t.config=n,r&&(t.code=r),t.request=o,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t},Om={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Zs,Ad;function Cm(){if(Ad)return Zs;Ad=1;var e=Em;return Zs=function(n,r,o,i,s){var l=new Error(n);return e(l,r,o,i,s)},Zs}var el,Td;function Pw(){if(Td)return el;Td=1;var e=Cm();return el=function(n,r,o){var i=o.config.validateStatus;!o.status||!i||i(o.status)?n(o):r(e("Request failed with status code "+o.status,o.config,null,o.request,o))},el}var tl,jd;function Rw(){if(jd)return tl;jd=1;var e=Fe;return tl=e.isStandardBrowserEnv()?function(){return{write:function(r,o,i,s,l,a){var u=[];u.push(r+"="+encodeURIComponent(o)),e.isNumber(i)&&u.push("expires="+new Date(i).toGMTString()),e.isString(s)&&u.push("path="+s),e.isString(l)&&u.push("domain="+l),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(r){var o=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),tl}var nl,Nd;function _w(){return Nd||(Nd=1,nl=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),nl}var rl,Fd;function Aw(){return Fd||(Fd=1,rl=function(t,n){return n?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t}),rl}var ol,Ld;function Tw(){if(Ld)return ol;Ld=1;var e=_w(),t=Aw();return ol=function(r,o){return r&&!e(o)?t(r,o):o},ol}var il,Id;function jw(){if(Id)return il;Id=1;var e=Fe,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return il=function(r){var o={},i,s,l;return r&&e.forEach(r.split(` -`),function(u){if(l=u.indexOf(":"),i=e.trim(u.substr(0,l)).toLowerCase(),s=e.trim(u.substr(l+1)),i){if(o[i]&&t.indexOf(i)>=0)return;i==="set-cookie"?o[i]=(o[i]?o[i]:[]).concat([s]):o[i]=o[i]?o[i]+", "+s:s}}),o},il}var sl,$d;function Nw(){if($d)return sl;$d=1;var e=Fe;return sl=e.isStandardBrowserEnv()?function(){var n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),o;function i(s){var l=s;return n&&(r.setAttribute("href",l),l=r.href),r.setAttribute("href",l),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return o=i(window.location.href),function(l){var a=e.isString(l)?i(l):l;return a.protocol===o.protocol&&a.host===o.host}}():function(){return function(){return!0}}(),sl}var ll,Dd;function as(){if(Dd)return ll;Dd=1;function e(t){this.message=t}return e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,ll=e,ll}var al,Ud;function Md(){if(Ud)return al;Ud=1;var e=Fe,t=Pw(),n=Rw(),r=xm,o=Tw(),i=jw(),s=Nw(),l=Cm(),a=Om,u=as();return al=function(d){return new Promise(function(v,m){var g=d.data,S=d.headers,h=d.responseType,p;function y(){d.cancelToken&&d.cancelToken.unsubscribe(p),d.signal&&d.signal.removeEventListener("abort",p)}e.isFormData(g)&&delete S["Content-Type"];var w=new XMLHttpRequest;if(d.auth){var k=d.auth.username||"",P=d.auth.password?unescape(encodeURIComponent(d.auth.password)):"";S.Authorization="Basic "+btoa(k+":"+P)}var O=o(d.baseURL,d.url);w.open(d.method.toUpperCase(),r(O,d.params,d.paramsSerializer),!0),w.timeout=d.timeout;function _(){if(w){var N="getAllResponseHeaders"in w?i(w.getAllResponseHeaders()):null,ee=!h||h==="text"||h==="json"?w.responseText:w.response,J={data:ee,status:w.status,statusText:w.statusText,headers:N,config:d,request:w};t(function(ue){v(ue),y()},function(ue){m(ue),y()},J),w=null}}if("onloadend"in w?w.onloadend=_:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(_)},w.onabort=function(){w&&(m(l("Request aborted",d,"ECONNABORTED",w)),w=null)},w.onerror=function(){m(l("Network Error",d,null,w)),w=null},w.ontimeout=function(){var ee=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",J=d.transitional||a;d.timeoutErrorMessage&&(ee=d.timeoutErrorMessage),m(l(ee,d,J.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",w)),w=null},e.isStandardBrowserEnv()){var D=(d.withCredentials||s(O))&&d.xsrfCookieName?n.read(d.xsrfCookieName):void 0;D&&(S[d.xsrfHeaderName]=D)}"setRequestHeader"in w&&e.forEach(S,function(ee,J){typeof g>"u"&&J.toLowerCase()==="content-type"?delete S[J]:w.setRequestHeader(J,ee)}),e.isUndefined(d.withCredentials)||(w.withCredentials=!!d.withCredentials),h&&h!=="json"&&(w.responseType=d.responseType),typeof d.onDownloadProgress=="function"&&w.addEventListener("progress",d.onDownloadProgress),typeof d.onUploadProgress=="function"&&w.upload&&w.upload.addEventListener("progress",d.onUploadProgress),(d.cancelToken||d.signal)&&(p=function(N){w&&(m(!N||N&&N.type?new u("canceled"):N),w.abort(),w=null)},d.cancelToken&&d.cancelToken.subscribe(p),d.signal&&(d.signal.aborted?p():d.signal.addEventListener("abort",p))),g||(g=null),w.send(g)})},al}var me=Fe,zd=kw,Fw=Em,Lw=Om,Iw={"Content-Type":"application/x-www-form-urlencoded"};function bd(e,t){!me.isUndefined(e)&&me.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function $w(){var e;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Md()),e}function Dw(e,t,n){if(me.isString(e))try{return(t||JSON.parse)(e),me.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var us={transitional:Lw,adapter:$w(),transformRequest:[function(t,n){return zd(n,"Accept"),zd(n,"Content-Type"),me.isFormData(t)||me.isArrayBuffer(t)||me.isBuffer(t)||me.isStream(t)||me.isFile(t)||me.isBlob(t)?t:me.isArrayBufferView(t)?t.buffer:me.isURLSearchParams(t)?(bd(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):me.isObject(t)||n&&n["Content-Type"]==="application/json"?(bd(n,"application/json"),Dw(t)):t}],transformResponse:[function(t){var n=this.transitional||us.transitional,r=n&&n.silentJSONParsing,o=n&&n.forcedJSONParsing,i=!r&&this.responseType==="json";if(i||o&&me.isString(t)&&t.length)try{return JSON.parse(t)}catch(s){if(i)throw s.name==="SyntaxError"?Fw(s,this,"E_JSON_PARSE"):s}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};me.forEach(["delete","get","head"],function(t){us.headers[t]={}});me.forEach(["post","put","patch"],function(t){us.headers[t]=me.merge(Iw)});var Uu=us,Uw=Fe,Mw=Uu,zw=function(t,n,r){var o=this||Mw;return Uw.forEach(r,function(s){t=s.call(o,t,n)}),t},ul,Bd;function km(){return Bd||(Bd=1,ul=function(t){return!!(t&&t.__CANCEL__)}),ul}var Vd=Fe,cl=zw,bw=km(),Bw=Uu,Vw=as();function dl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Vw("canceled")}var Hw=function(t){dl(t),t.headers=t.headers||{},t.data=cl.call(t,t.data,t.headers,t.transformRequest),t.headers=Vd.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),Vd.forEach(["delete","get","head","post","put","patch","common"],function(o){delete t.headers[o]});var n=t.adapter||Bw.adapter;return n(t).then(function(o){return dl(t),o.data=cl.call(t,o.data,o.headers,t.transformResponse),o},function(o){return bw(o)||(dl(t),o&&o.response&&(o.response.data=cl.call(t,o.response.data,o.response.headers,t.transformResponse))),Promise.reject(o)})},Le=Fe,Pm=function(t,n){n=n||{};var r={};function o(c,d){return Le.isPlainObject(c)&&Le.isPlainObject(d)?Le.merge(c,d):Le.isPlainObject(d)?Le.merge({},d):Le.isArray(d)?d.slice():d}function i(c){if(Le.isUndefined(n[c])){if(!Le.isUndefined(t[c]))return o(void 0,t[c])}else return o(t[c],n[c])}function s(c){if(!Le.isUndefined(n[c]))return o(void 0,n[c])}function l(c){if(Le.isUndefined(n[c])){if(!Le.isUndefined(t[c]))return o(void 0,t[c])}else return o(void 0,n[c])}function a(c){if(c in n)return o(t[c],n[c]);if(c in t)return o(void 0,t[c])}var u={url:s,method:s,data:s,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:a};return Le.forEach(Object.keys(t).concat(Object.keys(n)),function(d){var f=u[d]||i,v=f(d);Le.isUndefined(v)&&f!==a||(r[d]=v)}),r},fl,Hd;function Rm(){return Hd||(Hd=1,fl={version:"0.26.1"}),fl}var Ww=Rm().version,Mu={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){Mu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var Wd={};Mu.transitional=function(t,n,r){function o(i,s){return"[Axios v"+Ww+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return function(i,s,l){if(t===!1)throw new Error(o(s," has been removed"+(n?" in "+n:"")));return n&&!Wd[s]&&(Wd[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,l):!0}};function qw(e,t,n){if(typeof e!="object")throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],s=t[i];if(s){var l=e[i],a=l===void 0||s(l,i,e);if(a!==!0)throw new TypeError("option "+i+" must be "+a);continue}if(n!==!0)throw Error("Unknown option "+i)}}var Qw={assertOptions:qw,validators:Mu},_m=Fe,Kw=xm,qd=Ow,Qd=Hw,cs=Pm,Am=Qw,Rn=Am.validators;function ho(e){this.defaults=e,this.interceptors={request:new qd,response:new qd}}ho.prototype.request=function(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=cs(this.defaults,n),n.method?n.method=n.method.toLowerCase():this.defaults.method?n.method=this.defaults.method.toLowerCase():n.method="get";var r=n.transitional;r!==void 0&&Am.assertOptions(r,{silentJSONParsing:Rn.transitional(Rn.boolean),forcedJSONParsing:Rn.transitional(Rn.boolean),clarifyTimeoutError:Rn.transitional(Rn.boolean)},!1);var o=[],i=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(i=i&&v.synchronous,o.unshift(v.fulfilled,v.rejected))});var s=[];this.interceptors.response.forEach(function(v){s.push(v.fulfilled,v.rejected)});var l;if(!i){var a=[Qd,void 0];for(Array.prototype.unshift.apply(a,o),a=a.concat(s),l=Promise.resolve(n);a.length;)l=l.then(a.shift(),a.shift());return l}for(var u=n;o.length;){var c=o.shift(),d=o.shift();try{u=c(u)}catch(f){d(f);break}}try{l=Qd(u)}catch(f){return Promise.reject(f)}for(;s.length;)l=l.then(s.shift(),s.shift());return l};ho.prototype.getUri=function(t){return t=cs(this.defaults,t),Kw(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};_m.forEach(["delete","get","head","options"],function(t){ho.prototype[t]=function(n,r){return this.request(cs(r||{},{method:t,url:n,data:(r||{}).data}))}});_m.forEach(["post","put","patch"],function(t){ho.prototype[t]=function(n,r,o){return this.request(cs(o||{},{method:t,url:n,data:r}))}});var Yw=ho,pl,Kd;function Gw(){if(Kd)return pl;Kd=1;var e=as();function t(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(s){r=s});var o=this;this.promise.then(function(i){if(o._listeners){var s,l=o._listeners.length;for(s=0;s{const s=Object.assign(Object.assign({},e.options),{url:((r==null?void 0:r.basePath)||i)+e.url});return o.request(s)}};(function(e){var t=Dt&&Dt.__awaiter||function(s,l,a,u){function c(d){return d instanceof a?d:new a(function(f){f(d)})}return new(a||(a=Promise))(function(d,f){function v(S){try{g(u.next(S))}catch(h){f(h)}}function m(S){try{g(u.throw(S))}catch(h){f(h)}}function g(S){S.done?d(S.value):c(S.value).then(v,m)}g((u=u.apply(s,l||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.OpenAIApi=e.OpenAIApiFactory=e.OpenAIApiFp=e.OpenAIApiAxiosParamCreator=void 0;const n=jm,r=X,o=zu;e.OpenAIApiAxiosParamCreator=function(s){return{cancelFineTune:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("cancelFineTune","fineTuneId",l);const u="/fine-tunes/{fine_tune_id}/cancel".replace("{fine_tune_id}",encodeURIComponent(String(l))),c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"POST"},d),a),v={},m={};r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),{url:r.toPathString(c),options:f}}),createAnswer:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("createAnswer","createAnswerRequest",l);const u="/answers",c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"POST"},d),a),v={},m={};v["Content-Type"]="application/json",r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),f.data=r.serializeDataIfNeeded(l,f,s),{url:r.toPathString(c),options:f}}),createClassification:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("createClassification","createClassificationRequest",l);const u="/classifications",c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"POST"},d),a),v={},m={};v["Content-Type"]="application/json",r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),f.data=r.serializeDataIfNeeded(l,f,s),{url:r.toPathString(c),options:f}}),createCompletion:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("createCompletion","createCompletionRequest",l);const u="/completions",c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"POST"},d),a),v={},m={};v["Content-Type"]="application/json",r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),f.data=r.serializeDataIfNeeded(l,f,s),{url:r.toPathString(c),options:f}}),createEdit:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("createEdit","createEditRequest",l);const u="/edits",c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"POST"},d),a),v={},m={};v["Content-Type"]="application/json",r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),f.data=r.serializeDataIfNeeded(l,f,s),{url:r.toPathString(c),options:f}}),createEmbedding:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("createEmbedding","createEmbeddingRequest",l);const u="/embeddings",c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"POST"},d),a),v={},m={};v["Content-Type"]="application/json",r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),f.data=r.serializeDataIfNeeded(l,f,s),{url:r.toPathString(c),options:f}}),createFile:(l,a,u={})=>t(this,void 0,void 0,function*(){r.assertParamExists("createFile","file",l),r.assertParamExists("createFile","purpose",a);const c="/files",d=new URL(c,r.DUMMY_BASE_URL);let f;s&&(f=s.baseOptions);const v=Object.assign(Object.assign({method:"POST"},f),u),m={},g={},S=new(s&&s.formDataCtor||FormData);l!==void 0&&S.append("file",l),a!==void 0&&S.append("purpose",a),m["Content-Type"]="multipart/form-data",r.setSearchParams(d,g);let h=f&&f.headers?f.headers:{};return v.headers=Object.assign(Object.assign(Object.assign(Object.assign({},m),S.getHeaders()),h),u.headers),v.data=S,{url:r.toPathString(d),options:v}}),createFineTune:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("createFineTune","createFineTuneRequest",l);const u="/fine-tunes",c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"POST"},d),a),v={},m={};v["Content-Type"]="application/json",r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),f.data=r.serializeDataIfNeeded(l,f,s),{url:r.toPathString(c),options:f}}),createSearch:(l,a,u={})=>t(this,void 0,void 0,function*(){r.assertParamExists("createSearch","engineId",l),r.assertParamExists("createSearch","createSearchRequest",a);const c="/engines/{engine_id}/search".replace("{engine_id}",encodeURIComponent(String(l))),d=new URL(c,r.DUMMY_BASE_URL);let f;s&&(f=s.baseOptions);const v=Object.assign(Object.assign({method:"POST"},f),u),m={},g={};m["Content-Type"]="application/json",r.setSearchParams(d,g);let S=f&&f.headers?f.headers:{};return v.headers=Object.assign(Object.assign(Object.assign({},m),S),u.headers),v.data=r.serializeDataIfNeeded(a,v,s),{url:r.toPathString(d),options:v}}),deleteFile:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("deleteFile","fileId",l);const u="/files/{file_id}".replace("{file_id}",encodeURIComponent(String(l))),c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"DELETE"},d),a),v={},m={};r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),{url:r.toPathString(c),options:f}}),deleteModel:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("deleteModel","model",l);const u="/models/{model}".replace("{model}",encodeURIComponent(String(l))),c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"DELETE"},d),a),v={},m={};r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),{url:r.toPathString(c),options:f}}),downloadFile:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("downloadFile","fileId",l);const u="/files/{file_id}/content".replace("{file_id}",encodeURIComponent(String(l))),c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"GET"},d),a),v={},m={};r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),{url:r.toPathString(c),options:f}}),listEngines:(l={})=>t(this,void 0,void 0,function*(){const a="/engines",u=new URL(a,r.DUMMY_BASE_URL);let c;s&&(c=s.baseOptions);const d=Object.assign(Object.assign({method:"GET"},c),l),f={},v={};r.setSearchParams(u,v);let m=c&&c.headers?c.headers:{};return d.headers=Object.assign(Object.assign(Object.assign({},f),m),l.headers),{url:r.toPathString(u),options:d}}),listFiles:(l={})=>t(this,void 0,void 0,function*(){const a="/files",u=new URL(a,r.DUMMY_BASE_URL);let c;s&&(c=s.baseOptions);const d=Object.assign(Object.assign({method:"GET"},c),l),f={},v={};r.setSearchParams(u,v);let m=c&&c.headers?c.headers:{};return d.headers=Object.assign(Object.assign(Object.assign({},f),m),l.headers),{url:r.toPathString(u),options:d}}),listFineTuneEvents:(l,a,u={})=>t(this,void 0,void 0,function*(){r.assertParamExists("listFineTuneEvents","fineTuneId",l);const c="/fine-tunes/{fine_tune_id}/events".replace("{fine_tune_id}",encodeURIComponent(String(l))),d=new URL(c,r.DUMMY_BASE_URL);let f;s&&(f=s.baseOptions);const v=Object.assign(Object.assign({method:"GET"},f),u),m={},g={};a!==void 0&&(g.stream=a),r.setSearchParams(d,g);let S=f&&f.headers?f.headers:{};return v.headers=Object.assign(Object.assign(Object.assign({},m),S),u.headers),{url:r.toPathString(d),options:v}}),listFineTunes:(l={})=>t(this,void 0,void 0,function*(){const a="/fine-tunes",u=new URL(a,r.DUMMY_BASE_URL);let c;s&&(c=s.baseOptions);const d=Object.assign(Object.assign({method:"GET"},c),l),f={},v={};r.setSearchParams(u,v);let m=c&&c.headers?c.headers:{};return d.headers=Object.assign(Object.assign(Object.assign({},f),m),l.headers),{url:r.toPathString(u),options:d}}),listModels:(l={})=>t(this,void 0,void 0,function*(){const a="/models",u=new URL(a,r.DUMMY_BASE_URL);let c;s&&(c=s.baseOptions);const d=Object.assign(Object.assign({method:"GET"},c),l),f={},v={};r.setSearchParams(u,v);let m=c&&c.headers?c.headers:{};return d.headers=Object.assign(Object.assign(Object.assign({},f),m),l.headers),{url:r.toPathString(u),options:d}}),retrieveEngine:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("retrieveEngine","engineId",l);const u="/engines/{engine_id}".replace("{engine_id}",encodeURIComponent(String(l))),c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"GET"},d),a),v={},m={};r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),{url:r.toPathString(c),options:f}}),retrieveFile:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("retrieveFile","fileId",l);const u="/files/{file_id}".replace("{file_id}",encodeURIComponent(String(l))),c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"GET"},d),a),v={},m={};r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),{url:r.toPathString(c),options:f}}),retrieveFineTune:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("retrieveFineTune","fineTuneId",l);const u="/fine-tunes/{fine_tune_id}".replace("{fine_tune_id}",encodeURIComponent(String(l))),c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"GET"},d),a),v={},m={};r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),{url:r.toPathString(c),options:f}}),retrieveModel:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("retrieveModel","model",l);const u="/models/{model}".replace("{model}",encodeURIComponent(String(l))),c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"GET"},d),a),v={},m={};r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),{url:r.toPathString(c),options:f}})}},e.OpenAIApiFp=function(s){const l=e.OpenAIApiAxiosParamCreator(s);return{cancelFineTune(a,u){return t(this,void 0,void 0,function*(){const c=yield l.cancelFineTune(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},createAnswer(a,u){return t(this,void 0,void 0,function*(){const c=yield l.createAnswer(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},createClassification(a,u){return t(this,void 0,void 0,function*(){const c=yield l.createClassification(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},createCompletion(a,u){return t(this,void 0,void 0,function*(){const c=yield l.createCompletion(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},createEdit(a,u){return t(this,void 0,void 0,function*(){const c=yield l.createEdit(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},createEmbedding(a,u){return t(this,void 0,void 0,function*(){const c=yield l.createEmbedding(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},createFile(a,u,c){return t(this,void 0,void 0,function*(){const d=yield l.createFile(a,u,c);return r.createRequestFunction(d,n.default,o.BASE_PATH,s)})},createFineTune(a,u){return t(this,void 0,void 0,function*(){const c=yield l.createFineTune(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},createSearch(a,u,c){return t(this,void 0,void 0,function*(){const d=yield l.createSearch(a,u,c);return r.createRequestFunction(d,n.default,o.BASE_PATH,s)})},deleteFile(a,u){return t(this,void 0,void 0,function*(){const c=yield l.deleteFile(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},deleteModel(a,u){return t(this,void 0,void 0,function*(){const c=yield l.deleteModel(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},downloadFile(a,u){return t(this,void 0,void 0,function*(){const c=yield l.downloadFile(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},listEngines(a){return t(this,void 0,void 0,function*(){const u=yield l.listEngines(a);return r.createRequestFunction(u,n.default,o.BASE_PATH,s)})},listFiles(a){return t(this,void 0,void 0,function*(){const u=yield l.listFiles(a);return r.createRequestFunction(u,n.default,o.BASE_PATH,s)})},listFineTuneEvents(a,u,c){return t(this,void 0,void 0,function*(){const d=yield l.listFineTuneEvents(a,u,c);return r.createRequestFunction(d,n.default,o.BASE_PATH,s)})},listFineTunes(a){return t(this,void 0,void 0,function*(){const u=yield l.listFineTunes(a);return r.createRequestFunction(u,n.default,o.BASE_PATH,s)})},listModels(a){return t(this,void 0,void 0,function*(){const u=yield l.listModels(a);return r.createRequestFunction(u,n.default,o.BASE_PATH,s)})},retrieveEngine(a,u){return t(this,void 0,void 0,function*(){const c=yield l.retrieveEngine(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},retrieveFile(a,u){return t(this,void 0,void 0,function*(){const c=yield l.retrieveFile(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},retrieveFineTune(a,u){return t(this,void 0,void 0,function*(){const c=yield l.retrieveFineTune(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},retrieveModel(a,u){return t(this,void 0,void 0,function*(){const c=yield l.retrieveModel(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})}}},e.OpenAIApiFactory=function(s,l,a){const u=e.OpenAIApiFp(s);return{cancelFineTune(c,d){return u.cancelFineTune(c,d).then(f=>f(a,l))},createAnswer(c,d){return u.createAnswer(c,d).then(f=>f(a,l))},createClassification(c,d){return u.createClassification(c,d).then(f=>f(a,l))},createCompletion(c,d){return u.createCompletion(c,d).then(f=>f(a,l))},createEdit(c,d){return u.createEdit(c,d).then(f=>f(a,l))},createEmbedding(c,d){return u.createEmbedding(c,d).then(f=>f(a,l))},createFile(c,d,f){return u.createFile(c,d,f).then(v=>v(a,l))},createFineTune(c,d){return u.createFineTune(c,d).then(f=>f(a,l))},createSearch(c,d,f){return u.createSearch(c,d,f).then(v=>v(a,l))},deleteFile(c,d){return u.deleteFile(c,d).then(f=>f(a,l))},deleteModel(c,d){return u.deleteModel(c,d).then(f=>f(a,l))},downloadFile(c,d){return u.downloadFile(c,d).then(f=>f(a,l))},listEngines(c){return u.listEngines(c).then(d=>d(a,l))},listFiles(c){return u.listFiles(c).then(d=>d(a,l))},listFineTuneEvents(c,d,f){return u.listFineTuneEvents(c,d,f).then(v=>v(a,l))},listFineTunes(c){return u.listFineTunes(c).then(d=>d(a,l))},listModels(c){return u.listModels(c).then(d=>d(a,l))},retrieveEngine(c,d){return u.retrieveEngine(c,d).then(f=>f(a,l))},retrieveFile(c,d){return u.retrieveFile(c,d).then(f=>f(a,l))},retrieveFineTune(c,d){return u.retrieveFineTune(c,d).then(f=>f(a,l))},retrieveModel(c,d){return u.retrieveModel(c,d).then(f=>f(a,l))}}};class i extends o.BaseAPI{cancelFineTune(l,a){return e.OpenAIApiFp(this.configuration).cancelFineTune(l,a).then(u=>u(this.axios,this.basePath))}createAnswer(l,a){return e.OpenAIApiFp(this.configuration).createAnswer(l,a).then(u=>u(this.axios,this.basePath))}createClassification(l,a){return e.OpenAIApiFp(this.configuration).createClassification(l,a).then(u=>u(this.axios,this.basePath))}createCompletion(l,a){return e.OpenAIApiFp(this.configuration).createCompletion(l,a).then(u=>u(this.axios,this.basePath))}createEdit(l,a){return e.OpenAIApiFp(this.configuration).createEdit(l,a).then(u=>u(this.axios,this.basePath))}createEmbedding(l,a){return e.OpenAIApiFp(this.configuration).createEmbedding(l,a).then(u=>u(this.axios,this.basePath))}createFile(l,a,u){return e.OpenAIApiFp(this.configuration).createFile(l,a,u).then(c=>c(this.axios,this.basePath))}createFineTune(l,a){return e.OpenAIApiFp(this.configuration).createFineTune(l,a).then(u=>u(this.axios,this.basePath))}createSearch(l,a,u){return e.OpenAIApiFp(this.configuration).createSearch(l,a,u).then(c=>c(this.axios,this.basePath))}deleteFile(l,a){return e.OpenAIApiFp(this.configuration).deleteFile(l,a).then(u=>u(this.axios,this.basePath))}deleteModel(l,a){return e.OpenAIApiFp(this.configuration).deleteModel(l,a).then(u=>u(this.axios,this.basePath))}downloadFile(l,a){return e.OpenAIApiFp(this.configuration).downloadFile(l,a).then(u=>u(this.axios,this.basePath))}listEngines(l){return e.OpenAIApiFp(this.configuration).listEngines(l).then(a=>a(this.axios,this.basePath))}listFiles(l){return e.OpenAIApiFp(this.configuration).listFiles(l).then(a=>a(this.axios,this.basePath))}listFineTuneEvents(l,a,u){return e.OpenAIApiFp(this.configuration).listFineTuneEvents(l,a,u).then(c=>c(this.axios,this.basePath))}listFineTunes(l){return e.OpenAIApiFp(this.configuration).listFineTunes(l).then(a=>a(this.axios,this.basePath))}listModels(l){return e.OpenAIApiFp(this.configuration).listModels(l).then(a=>a(this.axios,this.basePath))}retrieveEngine(l,a){return e.OpenAIApiFp(this.configuration).retrieveEngine(l,a).then(u=>u(this.axios,this.basePath))}retrieveFile(l,a){return e.OpenAIApiFp(this.configuration).retrieveFile(l,a).then(u=>u(this.axios,this.basePath))}retrieveFineTune(l,a){return e.OpenAIApiFp(this.configuration).retrieveFineTune(l,a).then(u=>u(this.axios,this.basePath))}retrieveModel(l,a){return e.OpenAIApiFp(this.configuration).retrieveModel(l,a).then(u=>u(this.axios,this.basePath))}}e.OpenAIApi=i})(vm);var ds={};const oS="openai",iS="3.0.0",sS="Node.js library for the OpenAI API",lS=["openai","open","ai","gpt-3","gpt3"],aS={type:"git",url:"git@github.com:openai/openai-node.git"},uS="OpenAI",cS="MIT",dS="./dist/index.js",fS="./dist/index.d.ts",pS={build:"tsc --outDir dist/"},hS={axios:"^0.26.0","form-data":"^4.0.0"},mS={"@types/node":"^12.11.5",typescript:"^3.6.4"},vS={name:oS,version:iS,description:sS,keywords:lS,repository:aS,author:uS,license:cS,main:dS,types:fS,scripts:pS,dependencies:hS,devDependencies:mS};var vl,Xd;function gS(){return Xd||(Xd=1,vl=typeof self=="object"?self.FormData:window.FormData),vl}Object.defineProperty(ds,"__esModule",{value:!0});ds.Configuration=void 0;const yS=vS;class wS{constructor(t={}){this.apiKey=t.apiKey,this.organization=t.organization,this.username=t.username,this.password=t.password,this.accessToken=t.accessToken,this.basePath=t.basePath,this.baseOptions=t.baseOptions,this.formDataCtor=t.formDataCtor,this.baseOptions||(this.baseOptions={}),this.baseOptions.headers=Object.assign({"User-Agent":`OpenAI/NodeJS/${yS.version}`,Authorization:`Bearer ${this.apiKey}`},this.baseOptions.headers),this.organization&&(this.baseOptions.headers["OpenAI-Organization"]=this.organization),this.formDataCtor||(this.formDataCtor=gS())}isJsonMime(t){const n=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return t!==null&&(n.test(t)||t.toLowerCase()==="application/json-patch+json")}}ds.Configuration=wS;(function(e){var t=Dt&&Dt.__createBinding||(Object.create?function(r,o,i,s){s===void 0&&(s=i),Object.defineProperty(r,s,{enumerable:!0,get:function(){return o[i]}})}:function(r,o,i,s){s===void 0&&(s=i),r[s]=o[i]}),n=Dt&&Dt.__exportStar||function(r,o){for(var i in r)i!=="default"&&!o.hasOwnProperty(i)&&t(o,r,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(vm,e),n(ds,e)})(io);const SS={}.VITE_OPENAI_API_KEY,Zd=()=>{const[e,t]=R.useState(""),[n,r]=R.useState([]),[o,i]=R.useState([]),[s,l]=R.useState([]),[a,u]=R.useState([]),{setTerminologyData:c,setExpressionData:d,setCautionData:f}=Lu(),v=new io.Configuration({apiKey:SS}),m=new io.OpenAIApi(v),[g,S]=R.useState(""),[h,p]=R.useState(""),[y,w]=R.useState(!1),k=_=>{t(_.target.value),p(_.target.value)},P=async _=>{_.preventDefault(),r([...n,e]),t(""),w(!0);const D=`${h}이 항목을 위의 예시처럼 분석해서 반드시 다음과 같은 형식으로 출력해줘.표현해석: {항목 분석내용}, +`),function(u){if(l=u.indexOf(":"),i=e.trim(u.substr(0,l)).toLowerCase(),s=e.trim(u.substr(l+1)),i){if(o[i]&&t.indexOf(i)>=0)return;i==="set-cookie"?o[i]=(o[i]?o[i]:[]).concat([s]):o[i]=o[i]?o[i]+", "+s:s}}),o},il}var sl,$d;function Nw(){if($d)return sl;$d=1;var e=Fe;return sl=e.isStandardBrowserEnv()?function(){var n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),o;function i(s){var l=s;return n&&(r.setAttribute("href",l),l=r.href),r.setAttribute("href",l),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return o=i(window.location.href),function(l){var a=e.isString(l)?i(l):l;return a.protocol===o.protocol&&a.host===o.host}}():function(){return function(){return!0}}(),sl}var ll,Dd;function as(){if(Dd)return ll;Dd=1;function e(t){this.message=t}return e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,ll=e,ll}var al,Ud;function Md(){if(Ud)return al;Ud=1;var e=Fe,t=Pw(),n=Rw(),r=xm,o=Tw(),i=jw(),s=Nw(),l=Cm(),a=Om,u=as();return al=function(d){return new Promise(function(v,m){var g=d.data,S=d.headers,h=d.responseType,p;function y(){d.cancelToken&&d.cancelToken.unsubscribe(p),d.signal&&d.signal.removeEventListener("abort",p)}e.isFormData(g)&&delete S["Content-Type"];var w=new XMLHttpRequest;if(d.auth){var k=d.auth.username||"",P=d.auth.password?unescape(encodeURIComponent(d.auth.password)):"";S.Authorization="Basic "+btoa(k+":"+P)}var O=o(d.baseURL,d.url);w.open(d.method.toUpperCase(),r(O,d.params,d.paramsSerializer),!0),w.timeout=d.timeout;function _(){if(w){var N="getAllResponseHeaders"in w?i(w.getAllResponseHeaders()):null,ee=!h||h==="text"||h==="json"?w.responseText:w.response,J={data:ee,status:w.status,statusText:w.statusText,headers:N,config:d,request:w};t(function(ue){v(ue),y()},function(ue){m(ue),y()},J),w=null}}if("onloadend"in w?w.onloadend=_:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(_)},w.onabort=function(){w&&(m(l("Request aborted",d,"ECONNABORTED",w)),w=null)},w.onerror=function(){m(l("Network Error",d,null,w)),w=null},w.ontimeout=function(){var ee=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",J=d.transitional||a;d.timeoutErrorMessage&&(ee=d.timeoutErrorMessage),m(l(ee,d,J.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",w)),w=null},e.isStandardBrowserEnv()){var D=(d.withCredentials||s(O))&&d.xsrfCookieName?n.read(d.xsrfCookieName):void 0;D&&(S[d.xsrfHeaderName]=D)}"setRequestHeader"in w&&e.forEach(S,function(ee,J){typeof g>"u"&&J.toLowerCase()==="content-type"?delete S[J]:w.setRequestHeader(J,ee)}),e.isUndefined(d.withCredentials)||(w.withCredentials=!!d.withCredentials),h&&h!=="json"&&(w.responseType=d.responseType),typeof d.onDownloadProgress=="function"&&w.addEventListener("progress",d.onDownloadProgress),typeof d.onUploadProgress=="function"&&w.upload&&w.upload.addEventListener("progress",d.onUploadProgress),(d.cancelToken||d.signal)&&(p=function(N){w&&(m(!N||N&&N.type?new u("canceled"):N),w.abort(),w=null)},d.cancelToken&&d.cancelToken.subscribe(p),d.signal&&(d.signal.aborted?p():d.signal.addEventListener("abort",p))),g||(g=null),w.send(g)})},al}var me=Fe,zd=kw,Fw=Em,Lw=Om,Iw={"Content-Type":"application/x-www-form-urlencoded"};function bd(e,t){!me.isUndefined(e)&&me.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function $w(){var e;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Md()),e}function Dw(e,t,n){if(me.isString(e))try{return(t||JSON.parse)(e),me.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var us={transitional:Lw,adapter:$w(),transformRequest:[function(t,n){return zd(n,"Accept"),zd(n,"Content-Type"),me.isFormData(t)||me.isArrayBuffer(t)||me.isBuffer(t)||me.isStream(t)||me.isFile(t)||me.isBlob(t)?t:me.isArrayBufferView(t)?t.buffer:me.isURLSearchParams(t)?(bd(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):me.isObject(t)||n&&n["Content-Type"]==="application/json"?(bd(n,"application/json"),Dw(t)):t}],transformResponse:[function(t){var n=this.transitional||us.transitional,r=n&&n.silentJSONParsing,o=n&&n.forcedJSONParsing,i=!r&&this.responseType==="json";if(i||o&&me.isString(t)&&t.length)try{return JSON.parse(t)}catch(s){if(i)throw s.name==="SyntaxError"?Fw(s,this,"E_JSON_PARSE"):s}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};me.forEach(["delete","get","head"],function(t){us.headers[t]={}});me.forEach(["post","put","patch"],function(t){us.headers[t]=me.merge(Iw)});var Uu=us,Uw=Fe,Mw=Uu,zw=function(t,n,r){var o=this||Mw;return Uw.forEach(r,function(s){t=s.call(o,t,n)}),t},ul,Bd;function km(){return Bd||(Bd=1,ul=function(t){return!!(t&&t.__CANCEL__)}),ul}var Vd=Fe,cl=zw,bw=km(),Bw=Uu,Vw=as();function dl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Vw("canceled")}var Hw=function(t){dl(t),t.headers=t.headers||{},t.data=cl.call(t,t.data,t.headers,t.transformRequest),t.headers=Vd.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),Vd.forEach(["delete","get","head","post","put","patch","common"],function(o){delete t.headers[o]});var n=t.adapter||Bw.adapter;return n(t).then(function(o){return dl(t),o.data=cl.call(t,o.data,o.headers,t.transformResponse),o},function(o){return bw(o)||(dl(t),o&&o.response&&(o.response.data=cl.call(t,o.response.data,o.response.headers,t.transformResponse))),Promise.reject(o)})},Le=Fe,Pm=function(t,n){n=n||{};var r={};function o(c,d){return Le.isPlainObject(c)&&Le.isPlainObject(d)?Le.merge(c,d):Le.isPlainObject(d)?Le.merge({},d):Le.isArray(d)?d.slice():d}function i(c){if(Le.isUndefined(n[c])){if(!Le.isUndefined(t[c]))return o(void 0,t[c])}else return o(t[c],n[c])}function s(c){if(!Le.isUndefined(n[c]))return o(void 0,n[c])}function l(c){if(Le.isUndefined(n[c])){if(!Le.isUndefined(t[c]))return o(void 0,t[c])}else return o(void 0,n[c])}function a(c){if(c in n)return o(t[c],n[c]);if(c in t)return o(void 0,t[c])}var u={url:s,method:s,data:s,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:a};return Le.forEach(Object.keys(t).concat(Object.keys(n)),function(d){var f=u[d]||i,v=f(d);Le.isUndefined(v)&&f!==a||(r[d]=v)}),r},fl,Hd;function Rm(){return Hd||(Hd=1,fl={version:"0.26.1"}),fl}var Ww=Rm().version,Mu={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){Mu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var Wd={};Mu.transitional=function(t,n,r){function o(i,s){return"[Axios v"+Ww+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return function(i,s,l){if(t===!1)throw new Error(o(s," has been removed"+(n?" in "+n:"")));return n&&!Wd[s]&&(Wd[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,l):!0}};function qw(e,t,n){if(typeof e!="object")throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],s=t[i];if(s){var l=e[i],a=l===void 0||s(l,i,e);if(a!==!0)throw new TypeError("option "+i+" must be "+a);continue}if(n!==!0)throw Error("Unknown option "+i)}}var Qw={assertOptions:qw,validators:Mu},_m=Fe,Kw=xm,qd=Ow,Qd=Hw,cs=Pm,Am=Qw,Rn=Am.validators;function ho(e){this.defaults=e,this.interceptors={request:new qd,response:new qd}}ho.prototype.request=function(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=cs(this.defaults,n),n.method?n.method=n.method.toLowerCase():this.defaults.method?n.method=this.defaults.method.toLowerCase():n.method="get";var r=n.transitional;r!==void 0&&Am.assertOptions(r,{silentJSONParsing:Rn.transitional(Rn.boolean),forcedJSONParsing:Rn.transitional(Rn.boolean),clarifyTimeoutError:Rn.transitional(Rn.boolean)},!1);var o=[],i=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(i=i&&v.synchronous,o.unshift(v.fulfilled,v.rejected))});var s=[];this.interceptors.response.forEach(function(v){s.push(v.fulfilled,v.rejected)});var l;if(!i){var a=[Qd,void 0];for(Array.prototype.unshift.apply(a,o),a=a.concat(s),l=Promise.resolve(n);a.length;)l=l.then(a.shift(),a.shift());return l}for(var u=n;o.length;){var c=o.shift(),d=o.shift();try{u=c(u)}catch(f){d(f);break}}try{l=Qd(u)}catch(f){return Promise.reject(f)}for(;s.length;)l=l.then(s.shift(),s.shift());return l};ho.prototype.getUri=function(t){return t=cs(this.defaults,t),Kw(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};_m.forEach(["delete","get","head","options"],function(t){ho.prototype[t]=function(n,r){return this.request(cs(r||{},{method:t,url:n,data:(r||{}).data}))}});_m.forEach(["post","put","patch"],function(t){ho.prototype[t]=function(n,r,o){return this.request(cs(o||{},{method:t,url:n,data:r}))}});var Yw=ho,pl,Kd;function Gw(){if(Kd)return pl;Kd=1;var e=as();function t(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(s){r=s});var o=this;this.promise.then(function(i){if(o._listeners){var s,l=o._listeners.length;for(s=0;s{const s=Object.assign(Object.assign({},e.options),{url:((r==null?void 0:r.basePath)||i)+e.url});return o.request(s)}};(function(e){var t=Dt&&Dt.__awaiter||function(s,l,a,u){function c(d){return d instanceof a?d:new a(function(f){f(d)})}return new(a||(a=Promise))(function(d,f){function v(S){try{g(u.next(S))}catch(h){f(h)}}function m(S){try{g(u.throw(S))}catch(h){f(h)}}function g(S){S.done?d(S.value):c(S.value).then(v,m)}g((u=u.apply(s,l||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.OpenAIApi=e.OpenAIApiFactory=e.OpenAIApiFp=e.OpenAIApiAxiosParamCreator=void 0;const n=jm,r=X,o=zu;e.OpenAIApiAxiosParamCreator=function(s){return{cancelFineTune:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("cancelFineTune","fineTuneId",l);const u="/fine-tunes/{fine_tune_id}/cancel".replace("{fine_tune_id}",encodeURIComponent(String(l))),c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"POST"},d),a),v={},m={};r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),{url:r.toPathString(c),options:f}}),createAnswer:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("createAnswer","createAnswerRequest",l);const u="/answers",c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"POST"},d),a),v={},m={};v["Content-Type"]="application/json",r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),f.data=r.serializeDataIfNeeded(l,f,s),{url:r.toPathString(c),options:f}}),createClassification:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("createClassification","createClassificationRequest",l);const u="/classifications",c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"POST"},d),a),v={},m={};v["Content-Type"]="application/json",r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),f.data=r.serializeDataIfNeeded(l,f,s),{url:r.toPathString(c),options:f}}),createCompletion:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("createCompletion","createCompletionRequest",l);const u="/completions",c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"POST"},d),a),v={},m={};v["Content-Type"]="application/json",r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),f.data=r.serializeDataIfNeeded(l,f,s),{url:r.toPathString(c),options:f}}),createEdit:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("createEdit","createEditRequest",l);const u="/edits",c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"POST"},d),a),v={},m={};v["Content-Type"]="application/json",r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),f.data=r.serializeDataIfNeeded(l,f,s),{url:r.toPathString(c),options:f}}),createEmbedding:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("createEmbedding","createEmbeddingRequest",l);const u="/embeddings",c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"POST"},d),a),v={},m={};v["Content-Type"]="application/json",r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),f.data=r.serializeDataIfNeeded(l,f,s),{url:r.toPathString(c),options:f}}),createFile:(l,a,u={})=>t(this,void 0,void 0,function*(){r.assertParamExists("createFile","file",l),r.assertParamExists("createFile","purpose",a);const c="/files",d=new URL(c,r.DUMMY_BASE_URL);let f;s&&(f=s.baseOptions);const v=Object.assign(Object.assign({method:"POST"},f),u),m={},g={},S=new(s&&s.formDataCtor||FormData);l!==void 0&&S.append("file",l),a!==void 0&&S.append("purpose",a),m["Content-Type"]="multipart/form-data",r.setSearchParams(d,g);let h=f&&f.headers?f.headers:{};return v.headers=Object.assign(Object.assign(Object.assign(Object.assign({},m),S.getHeaders()),h),u.headers),v.data=S,{url:r.toPathString(d),options:v}}),createFineTune:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("createFineTune","createFineTuneRequest",l);const u="/fine-tunes",c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"POST"},d),a),v={},m={};v["Content-Type"]="application/json",r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),f.data=r.serializeDataIfNeeded(l,f,s),{url:r.toPathString(c),options:f}}),createSearch:(l,a,u={})=>t(this,void 0,void 0,function*(){r.assertParamExists("createSearch","engineId",l),r.assertParamExists("createSearch","createSearchRequest",a);const c="/engines/{engine_id}/search".replace("{engine_id}",encodeURIComponent(String(l))),d=new URL(c,r.DUMMY_BASE_URL);let f;s&&(f=s.baseOptions);const v=Object.assign(Object.assign({method:"POST"},f),u),m={},g={};m["Content-Type"]="application/json",r.setSearchParams(d,g);let S=f&&f.headers?f.headers:{};return v.headers=Object.assign(Object.assign(Object.assign({},m),S),u.headers),v.data=r.serializeDataIfNeeded(a,v,s),{url:r.toPathString(d),options:v}}),deleteFile:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("deleteFile","fileId",l);const u="/files/{file_id}".replace("{file_id}",encodeURIComponent(String(l))),c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"DELETE"},d),a),v={},m={};r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),{url:r.toPathString(c),options:f}}),deleteModel:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("deleteModel","model",l);const u="/models/{model}".replace("{model}",encodeURIComponent(String(l))),c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"DELETE"},d),a),v={},m={};r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),{url:r.toPathString(c),options:f}}),downloadFile:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("downloadFile","fileId",l);const u="/files/{file_id}/content".replace("{file_id}",encodeURIComponent(String(l))),c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"GET"},d),a),v={},m={};r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),{url:r.toPathString(c),options:f}}),listEngines:(l={})=>t(this,void 0,void 0,function*(){const a="/engines",u=new URL(a,r.DUMMY_BASE_URL);let c;s&&(c=s.baseOptions);const d=Object.assign(Object.assign({method:"GET"},c),l),f={},v={};r.setSearchParams(u,v);let m=c&&c.headers?c.headers:{};return d.headers=Object.assign(Object.assign(Object.assign({},f),m),l.headers),{url:r.toPathString(u),options:d}}),listFiles:(l={})=>t(this,void 0,void 0,function*(){const a="/files",u=new URL(a,r.DUMMY_BASE_URL);let c;s&&(c=s.baseOptions);const d=Object.assign(Object.assign({method:"GET"},c),l),f={},v={};r.setSearchParams(u,v);let m=c&&c.headers?c.headers:{};return d.headers=Object.assign(Object.assign(Object.assign({},f),m),l.headers),{url:r.toPathString(u),options:d}}),listFineTuneEvents:(l,a,u={})=>t(this,void 0,void 0,function*(){r.assertParamExists("listFineTuneEvents","fineTuneId",l);const c="/fine-tunes/{fine_tune_id}/events".replace("{fine_tune_id}",encodeURIComponent(String(l))),d=new URL(c,r.DUMMY_BASE_URL);let f;s&&(f=s.baseOptions);const v=Object.assign(Object.assign({method:"GET"},f),u),m={},g={};a!==void 0&&(g.stream=a),r.setSearchParams(d,g);let S=f&&f.headers?f.headers:{};return v.headers=Object.assign(Object.assign(Object.assign({},m),S),u.headers),{url:r.toPathString(d),options:v}}),listFineTunes:(l={})=>t(this,void 0,void 0,function*(){const a="/fine-tunes",u=new URL(a,r.DUMMY_BASE_URL);let c;s&&(c=s.baseOptions);const d=Object.assign(Object.assign({method:"GET"},c),l),f={},v={};r.setSearchParams(u,v);let m=c&&c.headers?c.headers:{};return d.headers=Object.assign(Object.assign(Object.assign({},f),m),l.headers),{url:r.toPathString(u),options:d}}),listModels:(l={})=>t(this,void 0,void 0,function*(){const a="/models",u=new URL(a,r.DUMMY_BASE_URL);let c;s&&(c=s.baseOptions);const d=Object.assign(Object.assign({method:"GET"},c),l),f={},v={};r.setSearchParams(u,v);let m=c&&c.headers?c.headers:{};return d.headers=Object.assign(Object.assign(Object.assign({},f),m),l.headers),{url:r.toPathString(u),options:d}}),retrieveEngine:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("retrieveEngine","engineId",l);const u="/engines/{engine_id}".replace("{engine_id}",encodeURIComponent(String(l))),c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"GET"},d),a),v={},m={};r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),{url:r.toPathString(c),options:f}}),retrieveFile:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("retrieveFile","fileId",l);const u="/files/{file_id}".replace("{file_id}",encodeURIComponent(String(l))),c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"GET"},d),a),v={},m={};r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),{url:r.toPathString(c),options:f}}),retrieveFineTune:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("retrieveFineTune","fineTuneId",l);const u="/fine-tunes/{fine_tune_id}".replace("{fine_tune_id}",encodeURIComponent(String(l))),c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"GET"},d),a),v={},m={};r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),{url:r.toPathString(c),options:f}}),retrieveModel:(l,a={})=>t(this,void 0,void 0,function*(){r.assertParamExists("retrieveModel","model",l);const u="/models/{model}".replace("{model}",encodeURIComponent(String(l))),c=new URL(u,r.DUMMY_BASE_URL);let d;s&&(d=s.baseOptions);const f=Object.assign(Object.assign({method:"GET"},d),a),v={},m={};r.setSearchParams(c,m);let g=d&&d.headers?d.headers:{};return f.headers=Object.assign(Object.assign(Object.assign({},v),g),a.headers),{url:r.toPathString(c),options:f}})}},e.OpenAIApiFp=function(s){const l=e.OpenAIApiAxiosParamCreator(s);return{cancelFineTune(a,u){return t(this,void 0,void 0,function*(){const c=yield l.cancelFineTune(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},createAnswer(a,u){return t(this,void 0,void 0,function*(){const c=yield l.createAnswer(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},createClassification(a,u){return t(this,void 0,void 0,function*(){const c=yield l.createClassification(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},createCompletion(a,u){return t(this,void 0,void 0,function*(){const c=yield l.createCompletion(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},createEdit(a,u){return t(this,void 0,void 0,function*(){const c=yield l.createEdit(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},createEmbedding(a,u){return t(this,void 0,void 0,function*(){const c=yield l.createEmbedding(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},createFile(a,u,c){return t(this,void 0,void 0,function*(){const d=yield l.createFile(a,u,c);return r.createRequestFunction(d,n.default,o.BASE_PATH,s)})},createFineTune(a,u){return t(this,void 0,void 0,function*(){const c=yield l.createFineTune(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},createSearch(a,u,c){return t(this,void 0,void 0,function*(){const d=yield l.createSearch(a,u,c);return r.createRequestFunction(d,n.default,o.BASE_PATH,s)})},deleteFile(a,u){return t(this,void 0,void 0,function*(){const c=yield l.deleteFile(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},deleteModel(a,u){return t(this,void 0,void 0,function*(){const c=yield l.deleteModel(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},downloadFile(a,u){return t(this,void 0,void 0,function*(){const c=yield l.downloadFile(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},listEngines(a){return t(this,void 0,void 0,function*(){const u=yield l.listEngines(a);return r.createRequestFunction(u,n.default,o.BASE_PATH,s)})},listFiles(a){return t(this,void 0,void 0,function*(){const u=yield l.listFiles(a);return r.createRequestFunction(u,n.default,o.BASE_PATH,s)})},listFineTuneEvents(a,u,c){return t(this,void 0,void 0,function*(){const d=yield l.listFineTuneEvents(a,u,c);return r.createRequestFunction(d,n.default,o.BASE_PATH,s)})},listFineTunes(a){return t(this,void 0,void 0,function*(){const u=yield l.listFineTunes(a);return r.createRequestFunction(u,n.default,o.BASE_PATH,s)})},listModels(a){return t(this,void 0,void 0,function*(){const u=yield l.listModels(a);return r.createRequestFunction(u,n.default,o.BASE_PATH,s)})},retrieveEngine(a,u){return t(this,void 0,void 0,function*(){const c=yield l.retrieveEngine(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},retrieveFile(a,u){return t(this,void 0,void 0,function*(){const c=yield l.retrieveFile(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},retrieveFineTune(a,u){return t(this,void 0,void 0,function*(){const c=yield l.retrieveFineTune(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})},retrieveModel(a,u){return t(this,void 0,void 0,function*(){const c=yield l.retrieveModel(a,u);return r.createRequestFunction(c,n.default,o.BASE_PATH,s)})}}},e.OpenAIApiFactory=function(s,l,a){const u=e.OpenAIApiFp(s);return{cancelFineTune(c,d){return u.cancelFineTune(c,d).then(f=>f(a,l))},createAnswer(c,d){return u.createAnswer(c,d).then(f=>f(a,l))},createClassification(c,d){return u.createClassification(c,d).then(f=>f(a,l))},createCompletion(c,d){return u.createCompletion(c,d).then(f=>f(a,l))},createEdit(c,d){return u.createEdit(c,d).then(f=>f(a,l))},createEmbedding(c,d){return u.createEmbedding(c,d).then(f=>f(a,l))},createFile(c,d,f){return u.createFile(c,d,f).then(v=>v(a,l))},createFineTune(c,d){return u.createFineTune(c,d).then(f=>f(a,l))},createSearch(c,d,f){return u.createSearch(c,d,f).then(v=>v(a,l))},deleteFile(c,d){return u.deleteFile(c,d).then(f=>f(a,l))},deleteModel(c,d){return u.deleteModel(c,d).then(f=>f(a,l))},downloadFile(c,d){return u.downloadFile(c,d).then(f=>f(a,l))},listEngines(c){return u.listEngines(c).then(d=>d(a,l))},listFiles(c){return u.listFiles(c).then(d=>d(a,l))},listFineTuneEvents(c,d,f){return u.listFineTuneEvents(c,d,f).then(v=>v(a,l))},listFineTunes(c){return u.listFineTunes(c).then(d=>d(a,l))},listModels(c){return u.listModels(c).then(d=>d(a,l))},retrieveEngine(c,d){return u.retrieveEngine(c,d).then(f=>f(a,l))},retrieveFile(c,d){return u.retrieveFile(c,d).then(f=>f(a,l))},retrieveFineTune(c,d){return u.retrieveFineTune(c,d).then(f=>f(a,l))},retrieveModel(c,d){return u.retrieveModel(c,d).then(f=>f(a,l))}}};class i extends o.BaseAPI{cancelFineTune(l,a){return e.OpenAIApiFp(this.configuration).cancelFineTune(l,a).then(u=>u(this.axios,this.basePath))}createAnswer(l,a){return e.OpenAIApiFp(this.configuration).createAnswer(l,a).then(u=>u(this.axios,this.basePath))}createClassification(l,a){return e.OpenAIApiFp(this.configuration).createClassification(l,a).then(u=>u(this.axios,this.basePath))}createCompletion(l,a){return e.OpenAIApiFp(this.configuration).createCompletion(l,a).then(u=>u(this.axios,this.basePath))}createEdit(l,a){return e.OpenAIApiFp(this.configuration).createEdit(l,a).then(u=>u(this.axios,this.basePath))}createEmbedding(l,a){return e.OpenAIApiFp(this.configuration).createEmbedding(l,a).then(u=>u(this.axios,this.basePath))}createFile(l,a,u){return e.OpenAIApiFp(this.configuration).createFile(l,a,u).then(c=>c(this.axios,this.basePath))}createFineTune(l,a){return e.OpenAIApiFp(this.configuration).createFineTune(l,a).then(u=>u(this.axios,this.basePath))}createSearch(l,a,u){return e.OpenAIApiFp(this.configuration).createSearch(l,a,u).then(c=>c(this.axios,this.basePath))}deleteFile(l,a){return e.OpenAIApiFp(this.configuration).deleteFile(l,a).then(u=>u(this.axios,this.basePath))}deleteModel(l,a){return e.OpenAIApiFp(this.configuration).deleteModel(l,a).then(u=>u(this.axios,this.basePath))}downloadFile(l,a){return e.OpenAIApiFp(this.configuration).downloadFile(l,a).then(u=>u(this.axios,this.basePath))}listEngines(l){return e.OpenAIApiFp(this.configuration).listEngines(l).then(a=>a(this.axios,this.basePath))}listFiles(l){return e.OpenAIApiFp(this.configuration).listFiles(l).then(a=>a(this.axios,this.basePath))}listFineTuneEvents(l,a,u){return e.OpenAIApiFp(this.configuration).listFineTuneEvents(l,a,u).then(c=>c(this.axios,this.basePath))}listFineTunes(l){return e.OpenAIApiFp(this.configuration).listFineTunes(l).then(a=>a(this.axios,this.basePath))}listModels(l){return e.OpenAIApiFp(this.configuration).listModels(l).then(a=>a(this.axios,this.basePath))}retrieveEngine(l,a){return e.OpenAIApiFp(this.configuration).retrieveEngine(l,a).then(u=>u(this.axios,this.basePath))}retrieveFile(l,a){return e.OpenAIApiFp(this.configuration).retrieveFile(l,a).then(u=>u(this.axios,this.basePath))}retrieveFineTune(l,a){return e.OpenAIApiFp(this.configuration).retrieveFineTune(l,a).then(u=>u(this.axios,this.basePath))}retrieveModel(l,a){return e.OpenAIApiFp(this.configuration).retrieveModel(l,a).then(u=>u(this.axios,this.basePath))}}e.OpenAIApi=i})(vm);var ds={};const oS="openai",iS="3.0.0",sS="Node.js library for the OpenAI API",lS=["openai","open","ai","gpt-3","gpt3"],aS={type:"git",url:"git@github.com:openai/openai-node.git"},uS="OpenAI",cS="MIT",dS="./dist/index.js",fS="./dist/index.d.ts",pS={build:"tsc --outDir dist/"},hS={axios:"^0.26.0","form-data":"^4.0.0"},mS={"@types/node":"^12.11.5",typescript:"^3.6.4"},vS={name:oS,version:iS,description:sS,keywords:lS,repository:aS,author:uS,license:cS,main:dS,types:fS,scripts:pS,dependencies:hS,devDependencies:mS};var vl,Xd;function gS(){return Xd||(Xd=1,vl=typeof self=="object"?self.FormData:window.FormData),vl}Object.defineProperty(ds,"__esModule",{value:!0});ds.Configuration=void 0;const yS=vS;class wS{constructor(t={}){this.apiKey=t.apiKey,this.organization=t.organization,this.username=t.username,this.password=t.password,this.accessToken=t.accessToken,this.basePath=t.basePath,this.baseOptions=t.baseOptions,this.formDataCtor=t.formDataCtor,this.baseOptions||(this.baseOptions={}),this.baseOptions.headers=Object.assign({"User-Agent":`OpenAI/NodeJS/${yS.version}`,Authorization:`Bearer ${this.apiKey}`},this.baseOptions.headers),this.organization&&(this.baseOptions.headers["OpenAI-Organization"]=this.organization),this.formDataCtor||(this.formDataCtor=gS())}isJsonMime(t){const n=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return t!==null&&(n.test(t)||t.toLowerCase()==="application/json-patch+json")}}ds.Configuration=wS;(function(e){var t=Dt&&Dt.__createBinding||(Object.create?function(r,o,i,s){s===void 0&&(s=i),Object.defineProperty(r,s,{enumerable:!0,get:function(){return o[i]}})}:function(r,o,i,s){s===void 0&&(s=i),r[s]=o[i]}),n=Dt&&Dt.__exportStar||function(r,o){for(var i in r)i!=="default"&&!o.hasOwnProperty(i)&&t(o,r,i)};Object.defineProperty(e,"__esModule",{value:!0}),n(vm,e),n(ds,e)})(io);const SS={}.VITE_OPENAI_API_KEY,Zd=()=>{const[e,t]=R.useState(""),[n,r]=R.useState([]),[o,i]=R.useState([]),[s,l]=R.useState([]),[a,u]=R.useState([]),{setTerminologyData:c,setExpressionData:d,setCautionData:f}=Lu(),v=new io.Configuration({apiKey:SS}),m=new io.OpenAIApi(v),[g,S]=R.useState(""),[h,p]=R.useState(""),[y,w]=R.useState(!1),k=_=>{t(_.target.value),p(_.target.value)},P=async _=>{_.preventDefault(),r([...n,e]),t(""),w(!0);const D=`계약서 종류는${g}이다. 다음 내용은 계약서 내용이다.${h}이 항목을 위의 예시처럼 분석해서 반드시 다음과 같은 형식으로 출력해야한다.표현해석: {항목 분석내용}, 유의사항: {모호하거나 주의가 필요한 문장알려주고 이유도 설명}, 법률용어: {뜻 없이 단어만 리스트 형태로}`;try{(await m.createCompletion({model:"text-davinci-003",prompt:D,temperature:.5,max_tokens:1e3})).data.choices[0].text.split(` -`).forEach(J=>{if(J.includes("표현해석: ")){let pe=J.replace("표현해석: ",""),ue=[...o,pe];i(ue),d(ue)}else if(J.includes("유의사항: ")){let pe=J.replace("유의사항: ",""),ue=[...s,pe];l(ue),f(ue)}else if(J.includes("법률용어: ")){let pe=J.replace("법률용어: ","");pe=pe.split(",");let ue=[...a];pe.map(hr=>{let nn=hr.trim();ue.push(nn)}),u(ue),c(ue)}})}catch(N){console.error("Error:",N)}finally{w(!1)}},O=async()=>{w(!0);const _=`계약서 종류는${g}이다. 다음 내용은 계약서 내용이다.다음은 계약서 항목에 대한 표현해석, 해당 항목의 유의사항, 법률 용어에 대해서 정보를 제공하는 예시이다. 표현해석 : 1년의 의무기간을 채우지 못하고 중도 퇴사하는 경우, 100만원을 배상하여야 한다. 항목 해석: 1년을 못 채우고 퇴사하는 경우, 저는 회사에 100만원을 배상해야 한다. 유의사항 : 근로기준법은 손해배상액을 미리 정해두는 것을 금지하고 있다. 아무리 근로계약서에 서명했더라도 근로기준법에 위반된 조항은 효력이 없다.법률용어 : 근로기준법, 손해배상액, 근로계약서`;try{await m.createCompletion({model:"text-davinci-003",prompt:_,temperature:.5,max_tokens:1e3})}catch(D){console.error("Error:",D)}finally{w(!1)}};return R.useEffect(()=>{O()},[]),x.jsxs(xS,{children:[x.jsx(ES,{children:"Chat"}),x.jsxs(OS,{action:"",method:"",autoComplete:"off",onSubmit:P,children:[x.jsxs(CS,{children:[x.jsx(kS,{value:g,onChange:_=>S(_.target.value),type:"text",name:"type",required:!0,placeholder:"Please enter the contract type"}),x.jsx(PS,{children:n.map((_,D)=>x.jsx("p",{children:_},D))}),x.jsx(RS,{type:"text",name:"content",required:!0,placeholder:"Please include all information relevant to your issue.",value:e,onChange:k})]}),x.jsx(_S,{children:x.jsx(AS,{type:"submit",value:y?"Generating...":"Submit",disabled:y})})]})]})},xS=j.div` +`).forEach(J=>{if(J.includes("표현해석: ")){let pe=J.replace("표현해석: ",""),ue=[...o,pe];i(ue),d(ue)}else if(J.includes("유의사항: ")){let pe=J.replace("유의사항: ",""),ue=[...s,pe];l(ue),f(ue)}else if(J.includes("법률용어: ")){let pe=J.replace("법률용어: ","");pe=pe.split(",");let ue=[...a];pe.map(hr=>{let nn=hr.trim();ue.push(nn)}),u(ue),c(ue)}})}catch(N){console.error("Error:",N)}finally{w(!1)}},O=async()=>{w(!0);const _="계약서 종류는 근로계약서 이다. 다음 내용은 계약서 내용이다.다음은 계약서 항목에 대한 해석, 해당 항목의 유의사항, 법률 용어에 대해서 정보를 제공하는 예시이다. 표현해석 : 1년의 의무기간을 채우지 못하고 중도 퇴사하는 경우, 100만원을 배상하여야 한다. 항목 해석: 1년을 못 채우고 퇴사하는 경우, 저는 회사에 100만원을 배상해야 한다. 유의사항 : 근로기준법은 손해배상액을 미리 정해두는 것을 금지하고 있다. 아무리 근로계약서에 서명했더라도 근로기준법에 위반된 조항은 효력이 없다.법률용어 : 근로기준법, 손해배상액, 근로계약서위의 예시는 다음의 법률 내용을 참고하여 작성하였다. 정규직일 경우 계약기간이 없다. 시간선택제 또는 계약직이라면 해당 기간을 확인해야 한다. 수습기간 중에는 최대 3개월 간 정상급여의 90%를 줄 수 있을 뿐 다른 법적인 차이는 없다. 수습기간은 정규직 채용을 전제로 한 개념으로 기간 만료만으로 해고할 수는 없다.출근시 갑자기 발령 등 인사조치가 부당하게 일어나지 않도록 근무장소와 담당업무가 명시되었는지 확인한다. 노동자의 동의가 중요한 만큼 구직 당시의 조건과 달라진 것은 없는지 확인해야 한다. 법정 근로시간은 주 40시간(하루 8시간), 4시간 당 30분(8시간 당 1시간) 무급 휴게시간이 기본이다. 1주 최대 근로시간 52시간(주 40시간 + 연장근로 12시간, 2018.03. 개정된 근로기준법은 1주를 휴일을 포함한 7일로 정의하는 조항 신설)이다. 무상 발생하는 손해에 대한 배상은 어떤 경우에도 노동자의 임금에서 공제하면 불법으로 과실 정도와 업무상 책임 정도, 급여 수준 등을 종합적으로 고려해 정해져야 한다. 그렇게 정해진 금액도 별도로 내도록 해야 하며, 월급에서 공제할 수는 없다. 내가 지원한 회사의 이름이 맞는지, 그리고 회사의 대표자 직인이 찍히는지도 중하다. 근로계약서는 채용 시 한 번만 체결하는 계약서이며, 연봉계약서는 매년 체결이 가능하다. 단, 연봉계약서에 고용기간을 명시하는 경우 법적 효력을 가짐으로 주의가 필요하다.";try{await m.createCompletion({model:"text-davinci-003",prompt:_,temperature:.5,max_tokens:2e3})}catch(D){console.error("Error:",D)}finally{w(!1)}};return R.useEffect(()=>{O()},[]),x.jsxs(xS,{children:[x.jsx(ES,{children:"Chat"}),x.jsxs(OS,{action:"",method:"",autoComplete:"off",onSubmit:P,children:[x.jsxs(CS,{children:[x.jsx(kS,{value:g,onChange:_=>S(_.target.value),type:"text",name:"type",required:!0,placeholder:"Please enter the contract type"}),x.jsx(PS,{children:n.map((_,D)=>x.jsx("p",{children:_},D))}),x.jsx(RS,{type:"text",name:"content",required:!0,placeholder:"Please include all information relevant to your issue.",value:e,onChange:k})]}),x.jsx(_S,{children:x.jsx(AS,{type:"submit",value:y?"Generating...":"Submit",disabled:y})})]})]})},xS=j.div` /* width: 476px; height: 905px; */ width: 90%; diff --git a/index.html b/index.html index ee5b5ff..4826269 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Vite + React - +