@genpact/genome.mfe.v6-app 1.0.155-alpha → 1.0.156-alpha
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/AddPrompt-d027385a.mjs +787 -0
- package/dist/Admin-99ef067e.mjs +295 -0
- package/dist/AlertPopup-fb17d045.mjs +52 -0
- package/dist/Header-83d7147c.mjs +186 -0
- package/dist/HomeView-d8179fa3.mjs +518 -0
- package/dist/Loader-b6d0a3bf.mjs +25 -0
- package/dist/Loading-f4aaf277.mjs +2046 -0
- package/dist/ModalComp-7def6c6f.mjs +60 -0
- package/dist/PaperAirplaneIcon-f4efb885.mjs +14 -0
- package/dist/PopupComponent-6e5dc463.mjs +1236 -0
- package/dist/Prompt-4796e439.mjs +141 -0
- package/dist/PromptDetails-5d0643b0.mjs +237 -0
- package/dist/PromptExecutionStatus-0b841a65.mjs +88 -0
- package/dist/PromptPastExecutions-d143194a.mjs +103 -0
- package/dist/PromptTesting-cd2de79e.mjs +270 -0
- package/dist/SkillshareprofileComponent-93b74fe3.mjs +18 -0
- package/dist/Taleo-8028df6d.mjs +149 -0
- package/dist/UnderMaintenance-9400cb8d.mjs +18 -0
- package/dist/UnderMaintenance-fdd9092e.mjs +14 -0
- package/dist/Version6-7da449bd.mjs +77499 -0
- package/dist/delphi_utils-4cc6ce23.mjs +22 -0
- package/dist/genome-Logo-white-ffcf2413.mjs +4 -0
- package/dist/index.es-805b7210.mjs +5754 -0
- package/dist/loadernew-ac153a51.mjs +4 -0
- package/dist/main-23cf2727.mjs +13073 -0
- package/dist/purify.es-a544e5a7.mjs +474 -0
- package/dist/style.css +1 -0
- package/dist/v6.es.min.js +1 -0
- package/dist/v6.umd.min.js +805 -0
- package/package.json +1 -1
|
@@ -0,0 +1,787 @@
|
|
|
1
|
+
import { d as $e, av as Pe, r, u as Te, at as Re, a as o, c as u, b as e, z as Se, t as b, f as p, F as V, g as f, x, y as g, n as E, D as Ue, e as H, m as le, q as oe, p as Ne, h as Ce, aw as re, _ as Ve } from "./main-23cf2727.mjs";
|
|
2
|
+
import { _ as q } from "./loadernew-ac153a51.mjs";
|
|
3
|
+
import { D as Ae } from "./Header-83d7147c.mjs";
|
|
4
|
+
import { c as Fe, u as Ye } from "./delphi_utils-4cc6ce23.mjs";
|
|
5
|
+
import "./genome-Logo-white-ffcf2413.mjs";
|
|
6
|
+
import "./PopupComponent-6e5dc463.mjs";
|
|
7
|
+
const n = (G) => (Ne("data-v-87494603"), G = G(), Ce(), G), Le = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "flex flex-col"
|
|
10
|
+
}, Me = { class: "flex" }, Oe = { class: "mt-14 flex w-full overflow-y-auto text-[15px]" }, ze = { class: "shadow mx-auto flex w-1/2 flex-wrap justify-between bg-gray-100 p-4" }, Ie = { class: "mt-4 flex w-full" }, Be = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "mb-4 flex w-full justify-start" }, [
|
|
11
|
+
/* @__PURE__ */ e("div", { class: "text-center text-3xl font-bold text-background-secondary" }, "Prompt Details")
|
|
12
|
+
], -1)), De = { key: 0 }, Ke = { class: "text-green-700" }, Qe = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "flex justify-end"
|
|
15
|
+
}, je = { class: "w-full text-[15px]" }, He = /* @__PURE__ */ n(() => /* @__PURE__ */ e("svg", {
|
|
16
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
+
fill: "currentColor",
|
|
18
|
+
class: "bi bi-save h-4 w-4 pl-1",
|
|
19
|
+
viewBox: "0 0 16 16"
|
|
20
|
+
}, [
|
|
21
|
+
/* @__PURE__ */ e("path", { d: "M2 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H9.5a1 1 0 0 0-1 1v7.293l2.646-2.647a.5.5 0 0 1 .708.708l-3.5 3.5a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L7.5 9.293V2a2 2 0 0 1 2-2H14a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h2.5a.5.5 0 0 1 0 1H2z" })
|
|
22
|
+
], -1)), qe = /* @__PURE__ */ n(() => /* @__PURE__ */ e("svg", {
|
|
23
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24
|
+
fill: "currentColor",
|
|
25
|
+
class: "bi bi-pencil h-4 w-4 pl-1",
|
|
26
|
+
viewBox: "0 0 16 16"
|
|
27
|
+
}, [
|
|
28
|
+
/* @__PURE__ */ e("path", { d: "M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168l10-10zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207 11.207 2.5zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293l6.5-6.5zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325z" })
|
|
29
|
+
], -1)), Ge = {
|
|
30
|
+
key: 1,
|
|
31
|
+
class: "w-10",
|
|
32
|
+
src: q,
|
|
33
|
+
alt: "Loader Gif"
|
|
34
|
+
}, We = { key: 2 }, Xe = { class: "text-red-900" }, Je = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "mb-4 w-full" }, [
|
|
35
|
+
/* @__PURE__ */ e("div", { class: "text-left text-[15px] text-background-secondary" }, [
|
|
36
|
+
/* @__PURE__ */ e("b", null, "*Instruction: "),
|
|
37
|
+
/* @__PURE__ */ f(`If you are adding an input parameter in rules then please prefix and suffix it with '$' for eg. if you want to input candidates skill in rules then the parameter name can be "$candidate_skill$" or "$candidateSkill$". Please do not use spaces in between like "$candiate skill$". `)
|
|
38
|
+
])
|
|
39
|
+
], -1)), Ze = { class: "mt-4 flex w-full" }, et = { class: "mx-1 my-2 w-full" }, tt = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "text-left font-bold text-background-secondary" }, [
|
|
40
|
+
/* @__PURE__ */ f("Prompt Name "),
|
|
41
|
+
/* @__PURE__ */ e("span", { class: "text-[15px] text-red-900" }, "*")
|
|
42
|
+
], -1)), st = { class: "text-left text-background-secondary" }, at = ["disabled"], lt = { key: 0 }, ot = /* @__PURE__ */ n(() => /* @__PURE__ */ e("span", { class: "text-[15px] text-red-900" }, "Prompt name already exists", -1)), ut = [
|
|
43
|
+
ot
|
|
44
|
+
], nt = { key: 1 }, rt = /* @__PURE__ */ n(() => /* @__PURE__ */ e("span", { class: "text-[15px] text-red-900" }, "Prompt name is mandatory", -1)), dt = [
|
|
45
|
+
rt
|
|
46
|
+
], it = { class: "mx-1 my-2 flex w-56 justify-end" }, ct = /* @__PURE__ */ n(() => /* @__PURE__ */ e("label", { class: "-text-blue-800 opacity-80" }, "Is Prompt Public", -1)), pt = { class: "flex w-1/3 justify-start" }, _t = { class: "switch" }, vt = ["disabled"], mt = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "slider round" }, null, -1)), xt = { class: "mx-1 my-2 w-full" }, ft = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "text-left font-bold text-background-secondary" }, [
|
|
47
|
+
/* @__PURE__ */ f("Persona "),
|
|
48
|
+
/* @__PURE__ */ e("span", { class: "text-[15px] text-red-900" }, "*")
|
|
49
|
+
], -1)), gt = { class: "text-left text-background-secondary" }, yt = ["disabled"], bt = { key: 0 }, ht = /* @__PURE__ */ n(() => /* @__PURE__ */ e("span", { class: "text-[15px] text-red-900" }, "Persona is mandatory", -1)), wt = [
|
|
50
|
+
ht
|
|
51
|
+
], kt = { class: "mx-1 my-2 w-full" }, Et = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "text-left font-bold text-background-secondary" }, "Description", -1)), $t = { class: "text-left text-background-secondary" }, Pt = ["disabled"], Tt = { class: "mx-1 my-2 w-full" }, Rt = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "text-left font-bold text-background-secondary" }, [
|
|
52
|
+
/* @__PURE__ */ f("Intent "),
|
|
53
|
+
/* @__PURE__ */ e("span", { class: "text-[15px] text-red-900" }, "*")
|
|
54
|
+
], -1)), St = { class: "text-left text-background-secondary" }, Ut = ["disabled"], Nt = { key: 0 }, Ct = /* @__PURE__ */ n(() => /* @__PURE__ */ e("span", { class: "text-[15px] text-red-900" }, "Intent is mandatory", -1)), Vt = [
|
|
55
|
+
Ct
|
|
56
|
+
], At = { class: "mx-1 my-2 w-full" }, Ft = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "text-left font-bold text-background-secondary" }, "Rules", -1)), Yt = { class: "text-left text-background-secondary" }, Lt = ["id", "disabled"], Mt = {
|
|
57
|
+
key: 0,
|
|
58
|
+
class: "mt-4 w-full"
|
|
59
|
+
}, Ot = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "text-left font-bold text-background-secondary" }, "Input Parameters", -1)), zt = { class: "mt-4 w-full" }, It = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "text-left text-[15px] font-bold text-background-secondary" }, [
|
|
60
|
+
/* @__PURE__ */ f("Display Name "),
|
|
61
|
+
/* @__PURE__ */ e("span", { class: "text-[15px] text-red-900" }, "*")
|
|
62
|
+
], -1)), Bt = { class: "text-left text-background-secondary" }, Dt = ["onUpdate:modelValue", "disabled"], Kt = { key: 0 }, Qt = /* @__PURE__ */ n(() => /* @__PURE__ */ e("span", { class: "text-[15px] text-red-900" }, "Display name is mandatory", -1)), jt = [
|
|
63
|
+
Qt
|
|
64
|
+
], Ht = { class: "mt-4 w-full" }, qt = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "text-left text-[15px] font-bold text-background-secondary" }, "Paramerter is Mandatory", -1)), Gt = { class: "text-left text-background-secondary" }, Wt = ["onUpdate:modelValue", "disabled"], Xt = /* @__PURE__ */ n(() => /* @__PURE__ */ e("option", { value: "false" }, "No", -1)), Jt = /* @__PURE__ */ n(() => /* @__PURE__ */ e("option", {
|
|
65
|
+
value: "true",
|
|
66
|
+
selected: ""
|
|
67
|
+
}, "Yes", -1)), Zt = [
|
|
68
|
+
Xt,
|
|
69
|
+
Jt
|
|
70
|
+
], es = { class: "mt-4 w-full" }, ts = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "text-left text-[15px] font-bold text-background-secondary" }, "Paramerter Type", -1)), ss = { class: "text-left text-background-secondary" }, as = ["onUpdate:modelValue", "disabled"], ls = /* @__PURE__ */ n(() => /* @__PURE__ */ e("option", { value: "file" }, "File", -1)), os = /* @__PURE__ */ n(() => /* @__PURE__ */ e("option", {
|
|
71
|
+
value: "text",
|
|
72
|
+
selected: ""
|
|
73
|
+
}, "Text", -1)), us = [
|
|
74
|
+
ls,
|
|
75
|
+
os
|
|
76
|
+
], ns = { class: "shadow mx-auto w-1/2 bg-gray-100 p-4" }, rs = { class: "mt-4 w-full text-[15px]" }, ds = ["disabled"], is = { key: 0 }, cs = { class: "text-red-900" }, ps = { class: "mt-4 w-full" }, _s = {
|
|
77
|
+
key: 0,
|
|
78
|
+
class: "mb-4 font-bold text-background-secondary"
|
|
79
|
+
}, vs = { class: "font-bold" }, ms = {
|
|
80
|
+
key: 0,
|
|
81
|
+
class: "text-[15px] text-red-900"
|
|
82
|
+
}, xs = {
|
|
83
|
+
key: 0,
|
|
84
|
+
class: "bot-text text-row-bg relative w-full max-w-3xl md:w-auto lg:w-auto"
|
|
85
|
+
}, fs = { class: "flex items-center border border-gray-400 px-3 py-2" }, gs = { class: "w-auto" }, ys = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "-text-blue py-1.5" }, "Upload resume here", -1)), bs = ["for"], hs = ["disabled", "onChange"], ws = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "mt-1 flex" }, [
|
|
86
|
+
/* @__PURE__ */ e("div", { class: "-text-blue text-[15px]" }, "File size max 5 MB"),
|
|
87
|
+
/* @__PURE__ */ e("div", { class: "pl-6 text-[15px]" }, "File types .pdf/ .docx/.doc/.txt")
|
|
88
|
+
], -1)), ks = { key: 0 }, Es = { class: "text-[15px] text-red-900" }, $s = { key: 1 }, Ps = { class: "-text-blue text-[15px]" }, Ts = { class: "pl-2" }, Rs = ["disabled", "onClick"], Ss = {
|
|
89
|
+
key: 0,
|
|
90
|
+
class: "w-10",
|
|
91
|
+
src: q,
|
|
92
|
+
alt: "Loader Gif"
|
|
93
|
+
}, Us = { key: 1 }, Ns = ["id", "onUpdate:modelValue"], Cs = { class: "mt-4 w-full" }, Vs = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "text-left font-bold text-background-secondary" }, "Termperature Settings :", -1)), As = { class: "box-wrap-1 mt-4 text-xs" }, Fs = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "text-left font-bold text-background-secondary" }, [
|
|
94
|
+
/* @__PURE__ */ f("Max Tokens "),
|
|
95
|
+
/* @__PURE__ */ e("span", { class: "text-[15px] text-red-900" }, "*")
|
|
96
|
+
], -1)), Ys = { class: "text-left text-background-secondary" }, Ls = { class: "box-wrap-1 mt-4 text-xs" }, Ms = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "text-left font-bold text-background-secondary" }, [
|
|
97
|
+
/* @__PURE__ */ f("Temperature "),
|
|
98
|
+
/* @__PURE__ */ e("span", { class: "text-[15px] text-red-900" }, "*")
|
|
99
|
+
], -1)), Os = { class: "text-left text-background-secondary" }, zs = { class: "box-wrap-1 mt-4 text-xs" }, Is = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "text-left font-bold text-background-secondary" }, [
|
|
100
|
+
/* @__PURE__ */ f("TOP_P "),
|
|
101
|
+
/* @__PURE__ */ e("span", { class: "text-[15px] text-red-900" }, "*")
|
|
102
|
+
], -1)), Bs = { class: "text-left text-background-secondary" }, Ds = { class: "box-wrap-1 mt-4 text-xs" }, Ks = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "text-left font-bold text-background-secondary" }, [
|
|
103
|
+
/* @__PURE__ */ f("STOP_SEQUENCE "),
|
|
104
|
+
/* @__PURE__ */ e("span", { class: "text-[15px] text-red-900" }, "*")
|
|
105
|
+
], -1)), Qs = { class: "text-left text-background-secondary" }, js = { class: "box-wrap-1 mt-4 text-xs" }, Hs = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "text-left font-bold text-background-secondary" }, [
|
|
106
|
+
/* @__PURE__ */ f("FREQUENCY_PENALTY"),
|
|
107
|
+
/* @__PURE__ */ e("span", { class: "text-[15px] text-red-900" }, "*")
|
|
108
|
+
], -1)), qs = { class: "text-left text-background-secondary" }, Gs = { class: "box-wrap-1 mt-4 text-xs" }, Ws = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "text-left font-bold text-background-secondary" }, [
|
|
109
|
+
/* @__PURE__ */ f("PRESENCE_PENALTY "),
|
|
110
|
+
/* @__PURE__ */ e("span", { class: "text-[15px] text-red-900" }, "*")
|
|
111
|
+
], -1)), Xs = { class: "text-left text-background-secondary" }, Js = { class: "mt-4 w-full" }, Zs = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "text-left font-bold text-background-secondary" }, [
|
|
112
|
+
/* @__PURE__ */ f("Client Key(This is required for validating access to prompt execution): "),
|
|
113
|
+
/* @__PURE__ */ e("span", { class: "text-[15px] text-red-900" }, "*")
|
|
114
|
+
], -1)), ea = ["disabled"], ta = {
|
|
115
|
+
key: 1,
|
|
116
|
+
class: "w-10",
|
|
117
|
+
src: q,
|
|
118
|
+
alt: "Loader Gif"
|
|
119
|
+
}, sa = { key: 0 }, aa = { class: "text-red-900" }, la = {
|
|
120
|
+
key: 1,
|
|
121
|
+
class: "-text-blue mt-4 w-full border border-gray-400 p-2"
|
|
122
|
+
}, oa = /* @__PURE__ */ n(() => /* @__PURE__ */ e("div", { class: "font-bold" }, "Execution Status", -1)), ua = { key: 0 }, na = /* @__PURE__ */ n(() => /* @__PURE__ */ e("span", { class: "font-bold" }, "success", -1)), ra = {
|
|
123
|
+
key: 0,
|
|
124
|
+
class: "text-[15px] shadow fixed_headers checkBoxSize mb-4 mt-1 w-full rounded bg-white text-xs"
|
|
125
|
+
}, da = { class: "-text-blue-800 flex w-full text-left" }, ia = { class: "z-10 flex flex w-full justify-between border-b bg-background-secondary text-white" }, ca = /* @__PURE__ */ n(() => /* @__PURE__ */ e("th", { class: "p-2 w-10" }, "S.No.", -1)), pa = { class: "-text-blue-800 max-table-height flex w-full flex-col items-center overflow-y-auto opacity-80" }, _a = { class: "p-2 w-10" }, va = ["innerHTML"], ma = { key: 2 }, xa = {
|
|
126
|
+
key: 0,
|
|
127
|
+
class: "w-10",
|
|
128
|
+
src: q,
|
|
129
|
+
alt: "Loader Gif"
|
|
130
|
+
}, fa = ["disabled"], ga = {
|
|
131
|
+
key: 1,
|
|
132
|
+
class: "flex h-screen flex-col"
|
|
133
|
+
}, ya = {
|
|
134
|
+
key: 1,
|
|
135
|
+
class: "h-min-screen flex flex-col justify-center text-center"
|
|
136
|
+
}, ba = /* @__PURE__ */ n(() => /* @__PURE__ */ e("img", {
|
|
137
|
+
class: "loadercss mx-auto mb-8 mt-3% block",
|
|
138
|
+
src: q,
|
|
139
|
+
alt: "Loader Gif"
|
|
140
|
+
}, null, -1)), ha = /* @__PURE__ */ n(() => /* @__PURE__ */ e("p", { class: "loadertextcss ext-genpact-darkest-blue mx-auto mb-10 px-4 leading-normal" }, "Loading...", -1)), wa = [
|
|
141
|
+
ba,
|
|
142
|
+
ha
|
|
143
|
+
], ka = /* @__PURE__ */ $e({
|
|
144
|
+
__name: "AddPrompt",
|
|
145
|
+
setup(G) {
|
|
146
|
+
const Z = Pe(), W = r(!1), h = r(!0), w = r(!0), de = r(), P = r(""), z = r(""), R = r(""), S = r(""), k = r(""), ie = Te(), m = r(), F = r(), A = r(!1), ee = r(!1), Y = r(!1);
|
|
147
|
+
r(!1);
|
|
148
|
+
const i = r(!1), _ = r(), l = r(), $ = r(), y = r(), L = r(), M = r(!1), I = r(!0), B = r(!0), D = r(), U = r(), K = r(!1), Q = r(!1), te = r(!1), X = r(), N = r(), O = r(), se = r("not_executed"), T = r(), j = r(), J = r(), v = r({
|
|
149
|
+
MAX_TOKENS: 500,
|
|
150
|
+
TEMPERATURE: 0.3,
|
|
151
|
+
TOP_P: 0,
|
|
152
|
+
STOP_SEQUENCE: "$$$",
|
|
153
|
+
FREQUENCY_PENALTY: 0,
|
|
154
|
+
PRESENCE_PENALTY: 0
|
|
155
|
+
}), ce = async () => {
|
|
156
|
+
Q.value = !0, se.value = "not_executed", D.value = "", L.value = "", y.value = null, l.value = null, $.value = null, _.value && _.value.length && (w.value = !1);
|
|
157
|
+
for (let a = 0; a < _.value.length; a++) {
|
|
158
|
+
const t = _.value[a];
|
|
159
|
+
t.parameter_value = "";
|
|
160
|
+
}
|
|
161
|
+
}, pe = async () => {
|
|
162
|
+
i.value = !1, K.value = !0, Q.value = !1, _.value = [];
|
|
163
|
+
}, _e = async () => {
|
|
164
|
+
try {
|
|
165
|
+
ee.value = !1;
|
|
166
|
+
const a = P.value.trim();
|
|
167
|
+
if (!a)
|
|
168
|
+
return;
|
|
169
|
+
const { data: t } = await le(`/delphi/prompt/name?prompt_display_name=${a}`);
|
|
170
|
+
t && t.data && (ee.value = !0);
|
|
171
|
+
} catch (a) {
|
|
172
|
+
console.log("Error in fetch prompt by name", { message: a.message });
|
|
173
|
+
}
|
|
174
|
+
}, ve = async () => {
|
|
175
|
+
A.value = !A.value, console.log(`is_public ${A.value}`);
|
|
176
|
+
}, me = async () => {
|
|
177
|
+
if (h.value = !0, F.value = [], (!P.value || !P.value.trim()) && (h.value = !1), (!R.value || !R.value.trim()) && (h.value = !1), (!S.value || !S.value.trim()) && (h.value = !1), console.log(`rules.value ${k.value}`), !!k.value && !(!m.value || !m.value.length)) {
|
|
178
|
+
console.log(`is_mandatory_completed before input loop ${h.value}`);
|
|
179
|
+
for (let a = 0; a < m.value.length; a++) {
|
|
180
|
+
const t = m.value[a];
|
|
181
|
+
console.log("input_params", { input_params: t }), t.display_name ? F.value.push({ disply_error_message: "" }) : (h.value = h.value && !1, F.value.push({ disply_error_message: "Display name is mandatory" }));
|
|
182
|
+
}
|
|
183
|
+
console.log("input_error_msgs", { input_error_msgs: F });
|
|
184
|
+
}
|
|
185
|
+
}, ae = async () => {
|
|
186
|
+
w.value = !0;
|
|
187
|
+
for (let a = 0; a < _.value.length; a++) {
|
|
188
|
+
const t = _.value[a];
|
|
189
|
+
console.log("input_params", { input_parameters_to_execute: _ }), console.log("input_params.is_mandatory", { value: t.is_mandatory }), console.log("input_params.parameter_value", { value: t.parameter_value }), console.log(`input_params.is_mandatory && !input_params.parameter_value, ${t.is_mandatory && !t.parameter_value}`), t.is_mandatory && !t.parameter_value ? w.value = w.value && !1 : console.log("inside else");
|
|
190
|
+
}
|
|
191
|
+
}, xe = async () => {
|
|
192
|
+
v.value && v.value.FREQUENCY_PENALTY.toString() !== "" && v.value.MAX_TOKENS.toString() !== "" && v.value.PRESENCE_PENALTY.toString() !== "" && v.value.STOP_SEQUENCE !== "" && v.value.TEMPERATURE.toString() !== "" && v.value.TOP_P.toString() !== "" || (w.value = w.value && !1);
|
|
193
|
+
}, fe = async () => {
|
|
194
|
+
try {
|
|
195
|
+
if (I.value = !1, w.value = !0, _.value && _.value.length && await ae(), await xe(), J.value || (w.value = !1), console.log(`is_mandatory_completed_to_execute ${w.value}`), !w.value) {
|
|
196
|
+
I.value = !0, D.value = "All mandatory inputs are not completed", setTimeout(() => {
|
|
197
|
+
D.value = null;
|
|
198
|
+
}, 6e3);
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
const { data: a } = await oe("/delphi/prompt/execution", {
|
|
202
|
+
prompt_id: U.value,
|
|
203
|
+
input_params: _.value,
|
|
204
|
+
// linked_app_id : 'cdbb9123e5688d6b71541d537418bc24da8e95e9896ce9898b97bbf391fdb8c0',
|
|
205
|
+
temperature_settings: v.value,
|
|
206
|
+
linked_app_id: J.value
|
|
207
|
+
});
|
|
208
|
+
if (console.log("res", { data: a }), I.value = !0, a && a.is_access_not_allowed) {
|
|
209
|
+
Y.value = !1, O.value = a.message, setTimeout(() => {
|
|
210
|
+
O.value = null;
|
|
211
|
+
}, 6e3);
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
console.log("data", { val: a.data }), I.value = !0, $.value = a.data, L.value = `<div>Your execution id is "${$.value}" and status is <span class="font-bold">in progress</span>.</div><div>Please click on "<span class="font-bold">Check Status"</span> to get the expected output.</div>`;
|
|
215
|
+
} catch (a) {
|
|
216
|
+
M.value = !0, console.log("Error in executing prompt", { message: a.message }), ie.error(`${a.response.data.message}`);
|
|
217
|
+
}
|
|
218
|
+
}, ge = async () => {
|
|
219
|
+
try {
|
|
220
|
+
M.value = !0;
|
|
221
|
+
const { data: a } = await le(`/delphi/prompt/execution/status/${$.value}`);
|
|
222
|
+
if (y.value = a && a.data ? a.data : null, M.value = !1, !y.value) {
|
|
223
|
+
O.value = "There is some issue while fetching execution status", setTimeout(() => {
|
|
224
|
+
O.value = null;
|
|
225
|
+
}, 6e3);
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
if (se.value = y.value.execution_status, y.value.execution_status === "success") {
|
|
229
|
+
if (T.value = y.value.parsed_output ? y.value.parsed_output : [], console.log("executed_parsed_output", { length: T.value.length, data: T.value }), j.value = [], T.value.length) {
|
|
230
|
+
const t = T.value[0];
|
|
231
|
+
console.log("first_parsed_output", { first_parsed_output: t });
|
|
232
|
+
for (let s in t) {
|
|
233
|
+
const d = s;
|
|
234
|
+
console.log(`key ${d}`), d && j.value.push(d);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
console.log("parsed_output_columns", j.value), L.value = `<div>Your execution id is "${$.value}" and status is <span class="font-bold">${y.value.execution_status}</span></div><div><span class="font-bold">Execution Output: </span>${y.value.execution_ouput}</div>`;
|
|
238
|
+
} else
|
|
239
|
+
y.value.execution_status === "failed" ? L.value = `<div>Youd execution id is "${$.value}" and status is <span class="font-bold">${y.value.execution_status}</span></div><div><span>Execution Error: </span>${y.value.execution_error}</div>` : L.value = `<div>Youd execution id is "${$.value}" and status is <span class="font-bold">${y.value.execution_status}</span></div><div>Please click on "<span class="font-bold">Check Status"</span> to get the expected output.</div>`;
|
|
240
|
+
} catch (a) {
|
|
241
|
+
M.value = !1, console.log("Error in fetching execution status", { message: a.message });
|
|
242
|
+
}
|
|
243
|
+
}, ye = async () => {
|
|
244
|
+
B.value = !1;
|
|
245
|
+
try {
|
|
246
|
+
if (await me(), console.log(`is_mandatory_completed ${h.value}`), !h.value) {
|
|
247
|
+
B.value = !0;
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
let a = {
|
|
251
|
+
prompt_id: U.value ? U.value : "",
|
|
252
|
+
desc: z.value ? z.value : "",
|
|
253
|
+
prompt_display_name: P.value,
|
|
254
|
+
persona: R.value,
|
|
255
|
+
intent: S.value,
|
|
256
|
+
rules: k.value ? [k.value] : [],
|
|
257
|
+
input_parameters: m.value ? m.value : [],
|
|
258
|
+
is_public: A.value ? 1 : 0
|
|
259
|
+
};
|
|
260
|
+
console.log("prompt_details to save", { prompt_details: a });
|
|
261
|
+
const { data: t } = await oe("/delphi/prompt/save", a);
|
|
262
|
+
if (t && t.is_access_not_allowed) {
|
|
263
|
+
Y.value = !1, N.value = t.message, setTimeout(() => {
|
|
264
|
+
N.value = null;
|
|
265
|
+
}, 6e3);
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
if (t.is_edit_not_allowed) {
|
|
269
|
+
te.value = !0, N.value = t.message, setTimeout(() => {
|
|
270
|
+
N.value = null;
|
|
271
|
+
}, 6e3);
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
X.value = t.message, setTimeout(() => {
|
|
275
|
+
X.value = null;
|
|
276
|
+
}, 6e3);
|
|
277
|
+
const s = t.prompt_details;
|
|
278
|
+
_.value = [], _.value = s.input_parameters, console.log("input_parameters_to_execute after adding prompt", { input_parameters_to_execute: _ }), U.value = s.prompt_id, i.value = !0, console.log(`is_save_completed ${i.value}`), K.value = !0, B.value = !0;
|
|
279
|
+
} catch (a) {
|
|
280
|
+
B.value = !0, console.log("Error in saving prompt details", { message: a.message });
|
|
281
|
+
}
|
|
282
|
+
}, be = async () => {
|
|
283
|
+
let a = [];
|
|
284
|
+
if (m.value && (a = m.value), !k.value || !k.value.length) {
|
|
285
|
+
de.value = "Rules is required to create input parameters";
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
const t = k.value;
|
|
289
|
+
m.value = [];
|
|
290
|
+
let s = 0, d = t.indexOf("$");
|
|
291
|
+
for (; d > -1; ) {
|
|
292
|
+
const c = t.indexOf("$", s);
|
|
293
|
+
if (c === -1)
|
|
294
|
+
break;
|
|
295
|
+
if (s = c + 1, d = t.indexOf("$", s), d > -1 && t.substring(c + 1, d) !== `
|
|
296
|
+
`) {
|
|
297
|
+
let C = t.substring(c, d + 1);
|
|
298
|
+
if (C = C.split(" ").join(""), C === "$$")
|
|
299
|
+
continue;
|
|
300
|
+
const ue = {
|
|
301
|
+
parameter_name: C,
|
|
302
|
+
parameter_value: "",
|
|
303
|
+
parameter_type: "text",
|
|
304
|
+
is_mandatory: !0,
|
|
305
|
+
display_name: ""
|
|
306
|
+
};
|
|
307
|
+
if (m.value) {
|
|
308
|
+
let ne = a.find((Ee) => Ee.parameter_name === C);
|
|
309
|
+
ne ? m.value.push(ne) : m.value.push(ue);
|
|
310
|
+
} else
|
|
311
|
+
m.value.push(ue);
|
|
312
|
+
}
|
|
313
|
+
s = d + 1;
|
|
314
|
+
}
|
|
315
|
+
console.log("input_parameters", { inputs: m.value });
|
|
316
|
+
}, he = (a, t) => {
|
|
317
|
+
const s = `uploadResume-${t}`;
|
|
318
|
+
console.log(`input_name ${s}`), l.value || (l.value = {}), l.value[`uploadResume-${t}`] = { value: a.target.files[0], error_message: "", success_message: "", afterResumeuploaded: !1 }, console.log("event", a.target.files[0]), console.log("uploadedFile.value", l.value);
|
|
319
|
+
const d = 1024 * 1024 * 5;
|
|
320
|
+
if (a.target.files[0].size > d) {
|
|
321
|
+
l.value[s] = {
|
|
322
|
+
value: null,
|
|
323
|
+
error_message: "File size exceeds the maximum allowed size (1MB).",
|
|
324
|
+
success_message: "",
|
|
325
|
+
afterResumeuploaded: !1
|
|
326
|
+
};
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
const c = ["application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "text/plain"];
|
|
330
|
+
if (console.log("uploadedFile.value.type", a.target.files[0].type, c.includes(a.target.files[0].type)), !c.includes(a.target.files[0].type)) {
|
|
331
|
+
l.value[s] = {
|
|
332
|
+
value: null,
|
|
333
|
+
error_message: "Invalid file type. Please upload valid file.",
|
|
334
|
+
success_message: "",
|
|
335
|
+
afterResumeuploaded: !1
|
|
336
|
+
};
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
console.log("event", a.target.files[0]), console.log("uploadedFile.value", l.value[s].value), console.log("uploadFilename.value", l.value[s].value);
|
|
340
|
+
}, we = async (a) => {
|
|
341
|
+
const t = `uploadResume-${a}`;
|
|
342
|
+
if (console.log(`input_name ${t}`), console.log("uploadedFiles.value", { val: l.value }), console.log(
|
|
343
|
+
`uploadedFiles.value || (uploadedFiles.value && !uploadedFiles.value[input_name].value) ${!l.value || l.value && !l.value[t] || l.value && l.value[t] && !l.value[t].value}`
|
|
344
|
+
), !l.value || l.value && !l.value[t] || l.value && l.value[t] && !l.value[t].value)
|
|
345
|
+
l.value || (l.value = {}), l.value[t] ? l.value[t].error_message = "Please Select valid file to upload" : l.value[t] = {
|
|
346
|
+
value: null,
|
|
347
|
+
error_message: "Please Select valid file to upload",
|
|
348
|
+
success_message: "",
|
|
349
|
+
afterResumeuploaded: !1
|
|
350
|
+
}, setTimeout(() => {
|
|
351
|
+
l.value[t].error_message = null;
|
|
352
|
+
}, 6e3);
|
|
353
|
+
else {
|
|
354
|
+
l.value[t].renderWaiting = !0;
|
|
355
|
+
const s = await oe("/delphi/signed_url", {
|
|
356
|
+
file_name: l.value[t].value.name
|
|
357
|
+
});
|
|
358
|
+
console.log("preSignedRes", s);
|
|
359
|
+
const d = s.data.messsage.url, c = s.data.messsage.file_key;
|
|
360
|
+
console.log("preSignedUrl", d), console.log("fileKey", c), (await Ye(d, l.value[t].value)).status === 200 && (l.value[t].success_message = "Resume has been uploaded successfully", setTimeout(() => {
|
|
361
|
+
l.value[t].success_message = null;
|
|
362
|
+
}, 6e3), console.log(`index ${a}`), console.log("input_parameters_to_execute", { params: _.value }), _.value[a].parameter_value = c, await ae(), l.value[t].afterResumeuploaded = !0, l.value[t].renderWaiting = !1);
|
|
363
|
+
}
|
|
364
|
+
}, ke = async () => {
|
|
365
|
+
try {
|
|
366
|
+
const { data: a } = await le(`/delphi/prompt/${U.value}`);
|
|
367
|
+
if (a && a.is_access_not_allowed) {
|
|
368
|
+
Y.value = !1, N.value = a.message, setTimeout(() => {
|
|
369
|
+
N.value = null;
|
|
370
|
+
}, 6e3);
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
a && a.is_edit_not_allowed && (te.value = a.is_edit_not_allowed);
|
|
374
|
+
const t = a && a.data ? a.data : null;
|
|
375
|
+
z.value = t.desc, P.value = t.prompt_display_name, R.value = t.persona, S.value = t.intent, k.value = t.rules ? t.rules : "", m.value = t.input_parameters ? t.input_parameters : [], A.value = t.is_public === 1, _.value = t.input_parameters, console.log("input_parameters_to_execute", { params: _ }), W.value = !0, K.value = !0, i.value = !0;
|
|
376
|
+
} catch (a) {
|
|
377
|
+
W.value = !0, console.log("Error in fetching all prompts", { message: a.message });
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
return Re(async () => {
|
|
381
|
+
U.value = Z.query && Z.query.prompt_id ? Z.query.prompt_id : null, console.log(`prompt_id ${U.value}`), Y.value = await Fe(), Y.value && (U.value && await ke(), W.value = !0);
|
|
382
|
+
}), (a, t) => W.value ? (o(), u(V, { key: 0 }, [
|
|
383
|
+
Y.value ? (o(), u("div", Le, [
|
|
384
|
+
e("nav", Me, [
|
|
385
|
+
Se(Ae)
|
|
386
|
+
]),
|
|
387
|
+
e("section", Oe, [
|
|
388
|
+
e("div", ze, [
|
|
389
|
+
e("div", Ie, [
|
|
390
|
+
Be,
|
|
391
|
+
X.value ? (o(), u("div", De, [
|
|
392
|
+
e("span", Ke, b(X.value), 1)
|
|
393
|
+
])) : p("", !0),
|
|
394
|
+
te.value ? p("", !0) : (o(), u("div", Qe, [
|
|
395
|
+
e("div", je, [
|
|
396
|
+
B.value ? (o(), u(V, { key: 0 }, [
|
|
397
|
+
i.value ? p("", !0) : (o(), u("button", {
|
|
398
|
+
key: 0,
|
|
399
|
+
class: "flex items-center rounded bg-background-secondary px-4 py-2 text-white",
|
|
400
|
+
onClick: t[0] || (t[0] = (s) => ye())
|
|
401
|
+
}, [
|
|
402
|
+
f(" Save "),
|
|
403
|
+
He
|
|
404
|
+
])),
|
|
405
|
+
i.value ? (o(), u("button", {
|
|
406
|
+
key: 1,
|
|
407
|
+
class: "flex items-center rounded bg-background-secondary px-4 py-2 text-white",
|
|
408
|
+
onClick: t[1] || (t[1] = (s) => pe())
|
|
409
|
+
}, [
|
|
410
|
+
f(" Edit "),
|
|
411
|
+
qe
|
|
412
|
+
])) : p("", !0)
|
|
413
|
+
], 64)) : (o(), u("img", Ge))
|
|
414
|
+
])
|
|
415
|
+
])),
|
|
416
|
+
N.value ? (o(), u("div", We, [
|
|
417
|
+
e("span", Xe, b(N.value), 1)
|
|
418
|
+
])) : p("", !0)
|
|
419
|
+
]),
|
|
420
|
+
Je,
|
|
421
|
+
e("div", Ze, [
|
|
422
|
+
e("div", et, [
|
|
423
|
+
tt,
|
|
424
|
+
e("div", st, [
|
|
425
|
+
x(e("input", {
|
|
426
|
+
"onUpdate:modelValue": t[2] || (t[2] = (s) => P.value = s),
|
|
427
|
+
disabled: K.value,
|
|
428
|
+
class: E([K.value ? "cursor-not-allowed" : "", "block w-full appearance-none rounded border border-gray-200 px-4 py-2 text-[15px] leading-tight text-gray-700 focus:border-gray-500 focus:bg-white focus:outline-none"]),
|
|
429
|
+
type: "text",
|
|
430
|
+
onKeyup: _e
|
|
431
|
+
}, null, 42, at), [
|
|
432
|
+
[g, P.value]
|
|
433
|
+
])
|
|
434
|
+
]),
|
|
435
|
+
ee.value ? (o(), u("div", lt, ut)) : p("", !0),
|
|
436
|
+
!h.value && (!P.value || P.value && !P.value.trim()) ? (o(), u("div", nt, dt)) : p("", !0)
|
|
437
|
+
]),
|
|
438
|
+
e("div", it, [
|
|
439
|
+
e("div", null, [
|
|
440
|
+
ct,
|
|
441
|
+
e("div", pt, [
|
|
442
|
+
e("label", _t, [
|
|
443
|
+
x(e("input", {
|
|
444
|
+
"onUpdate:modelValue": t[3] || (t[3] = (s) => A.value = s),
|
|
445
|
+
disabled: i.value,
|
|
446
|
+
class: E(i.value ? "cursor-not-allowed" : ""),
|
|
447
|
+
type: "checkbox",
|
|
448
|
+
onClick: ve
|
|
449
|
+
}, null, 10, vt), [
|
|
450
|
+
[Ue, A.value]
|
|
451
|
+
]),
|
|
452
|
+
mt
|
|
453
|
+
])
|
|
454
|
+
])
|
|
455
|
+
])
|
|
456
|
+
])
|
|
457
|
+
]),
|
|
458
|
+
e("div", xt, [
|
|
459
|
+
ft,
|
|
460
|
+
e("div", gt, [
|
|
461
|
+
x(e("input", {
|
|
462
|
+
"onUpdate:modelValue": t[4] || (t[4] = (s) => R.value = s),
|
|
463
|
+
disabled: i.value,
|
|
464
|
+
class: E([i.value ? "cursor-not-allowed" : "", "block w-full appearance-none rounded border border-gray-200 px-4 py-2 text-[15px] leading-tight text-gray-700 focus:border-gray-500 focus:bg-white focus:outline-none"]),
|
|
465
|
+
type: "text"
|
|
466
|
+
}, null, 10, yt), [
|
|
467
|
+
[g, R.value]
|
|
468
|
+
])
|
|
469
|
+
]),
|
|
470
|
+
!h.value && (!R.value || R.value && !R.value.trim()) ? (o(), u("div", bt, wt)) : p("", !0)
|
|
471
|
+
]),
|
|
472
|
+
e("div", kt, [
|
|
473
|
+
Et,
|
|
474
|
+
e("div", $t, [
|
|
475
|
+
x(e("input", {
|
|
476
|
+
"onUpdate:modelValue": t[5] || (t[5] = (s) => z.value = s),
|
|
477
|
+
disabled: i.value,
|
|
478
|
+
class: E([i.value ? "cursor-not-allowed" : "", "block w-full appearance-none rounded border border-gray-200 px-4 py-2 leading-tight text-gray-700 focus:border-gray-500 focus:bg-white focus:outline-none"]),
|
|
479
|
+
type: "text"
|
|
480
|
+
}, null, 10, Pt), [
|
|
481
|
+
[g, z.value]
|
|
482
|
+
])
|
|
483
|
+
])
|
|
484
|
+
]),
|
|
485
|
+
e("div", Tt, [
|
|
486
|
+
Rt,
|
|
487
|
+
e("div", St, [
|
|
488
|
+
x(e("textarea", {
|
|
489
|
+
"onUpdate:modelValue": t[6] || (t[6] = (s) => S.value = s),
|
|
490
|
+
disabled: i.value,
|
|
491
|
+
class: E([i.value ? "cursor-not-allowed" : "", "m-0 w-full border border-solid border-gray-300 bg-white bg-clip-padding px-3 py-1.5 text-gray-700 ease-in-out focus:border-blue-600 focus:bg-white focus:text-gray-700 focus:outline-none"]),
|
|
492
|
+
rows: "10"
|
|
493
|
+
}, null, 10, Ut), [
|
|
494
|
+
[g, S.value]
|
|
495
|
+
])
|
|
496
|
+
]),
|
|
497
|
+
!h.value && (!S.value || S.value && !S.value.trim()) ? (o(), u("div", Nt, Vt)) : p("", !0)
|
|
498
|
+
]),
|
|
499
|
+
e("div", At, [
|
|
500
|
+
Ft,
|
|
501
|
+
e("div", Yt, [
|
|
502
|
+
x(e("textarea", {
|
|
503
|
+
id: k.value,
|
|
504
|
+
"onUpdate:modelValue": t[7] || (t[7] = (s) => k.value = s),
|
|
505
|
+
disabled: i.value,
|
|
506
|
+
class: E([i.value ? "cursor-not-allowed" : "", "m-0 w-full border border-solid border-gray-300 bg-white bg-clip-padding px-3 py-1.5 text-gray-700 ease-in-out focus:border-blue-600 focus:bg-white focus:text-gray-700 focus:outline-none"]),
|
|
507
|
+
rows: "10",
|
|
508
|
+
onKeyup: be
|
|
509
|
+
}, null, 42, Lt), [
|
|
510
|
+
[g, k.value]
|
|
511
|
+
])
|
|
512
|
+
])
|
|
513
|
+
]),
|
|
514
|
+
k.value && m.value && m.value.length ? (o(), u("div", Mt, [
|
|
515
|
+
Ot,
|
|
516
|
+
(o(!0), u(V, null, H(m.value, (s, d) => (o(), u("div", {
|
|
517
|
+
key: s.parameter_name,
|
|
518
|
+
class: "shadow box-wrap-1 mb-2 border border-gray-400 p-2 text-left font-bold text-background-secondary"
|
|
519
|
+
}, [
|
|
520
|
+
e("div", null, b(d + 1) + ". " + b(s.parameter_name), 1),
|
|
521
|
+
e("div", zt, [
|
|
522
|
+
It,
|
|
523
|
+
e("div", Bt, [
|
|
524
|
+
x(e("input", {
|
|
525
|
+
"onUpdate:modelValue": (c) => s.display_name = c,
|
|
526
|
+
disabled: i.value,
|
|
527
|
+
class: E([i.value ? "cursor-not-allowed" : "", "block w-full appearance-none rounded border border-gray-200 px-4 py-1 leading-tight text-gray-700 focus:border-gray-500 focus:bg-white focus:outline-none"]),
|
|
528
|
+
type: "text"
|
|
529
|
+
}, null, 10, Dt), [
|
|
530
|
+
[g, s.display_name]
|
|
531
|
+
])
|
|
532
|
+
]),
|
|
533
|
+
F.value && F.value[d].disply_error_message ? (o(), u("div", Kt, jt)) : p("", !0)
|
|
534
|
+
]),
|
|
535
|
+
e("div", Ht, [
|
|
536
|
+
qt,
|
|
537
|
+
e("div", Gt, [
|
|
538
|
+
x(e("select", {
|
|
539
|
+
"onUpdate:modelValue": (c) => s.is_mandatory = c,
|
|
540
|
+
disabled: i.value,
|
|
541
|
+
class: E([i.value ? "cursor-not-allowed" : "", "block w-full appearance-none rounded border border-gray-200 px-4 py-1 leading-tight text-gray-700 focus:border-gray-500 focus:bg-white focus:outline-none"])
|
|
542
|
+
}, Zt, 10, Wt), [
|
|
543
|
+
[re, s.is_mandatory]
|
|
544
|
+
])
|
|
545
|
+
])
|
|
546
|
+
]),
|
|
547
|
+
e("div", es, [
|
|
548
|
+
ts,
|
|
549
|
+
e("div", ss, [
|
|
550
|
+
x(e("select", {
|
|
551
|
+
"onUpdate:modelValue": (c) => s.parameter_type = c,
|
|
552
|
+
disabled: i.value,
|
|
553
|
+
class: E([i.value ? "cursor-not-allowed" : "", "block w-full appearance-none rounded border border-gray-200 px-4 py-1 leading-tight text-gray-700 focus:border-gray-500 focus:bg-white focus:outline-none"])
|
|
554
|
+
}, us, 10, as), [
|
|
555
|
+
[re, s.parameter_type]
|
|
556
|
+
])
|
|
557
|
+
])
|
|
558
|
+
])
|
|
559
|
+
]))), 128))
|
|
560
|
+
])) : p("", !0)
|
|
561
|
+
]),
|
|
562
|
+
e("div", ns, [
|
|
563
|
+
e("div", rs, [
|
|
564
|
+
e("button", {
|
|
565
|
+
disabled: !i.value || Q.value,
|
|
566
|
+
class: E(["inline-block rounded px-4 py-2 text-white", !i.value || Q.value ? "cursor-not-allowed bg-gray-500" : "cursor-pointer bg-background-secondary"]),
|
|
567
|
+
onClick: t[8] || (t[8] = (s) => ce())
|
|
568
|
+
}, " Execute Prompt ", 10, ds)
|
|
569
|
+
]),
|
|
570
|
+
O.value ? (o(), u("div", is, [
|
|
571
|
+
e("span", cs, b(O.value), 1)
|
|
572
|
+
])) : p("", !0),
|
|
573
|
+
Q.value ? (o(), u(V, { key: 1 }, [
|
|
574
|
+
e("div", ps, [
|
|
575
|
+
_.value ? (o(), u("div", _s, "Input Parameters :")) : p("", !0),
|
|
576
|
+
(o(!0), u(V, null, H(_.value, (s, d) => (o(), u("div", {
|
|
577
|
+
key: s.parameter_name,
|
|
578
|
+
class: "text-left text-xs text-background-secondary"
|
|
579
|
+
}, [
|
|
580
|
+
e("div", vs, [
|
|
581
|
+
f(b(s.display_name) + " ", 1),
|
|
582
|
+
s.is_mandatory ? (o(), u("span", ms, "*")) : p("", !0)
|
|
583
|
+
]),
|
|
584
|
+
s.parameter_type === "file" ? (o(), u("div", xs, [
|
|
585
|
+
e("div", fs, [
|
|
586
|
+
e("div", gs, [
|
|
587
|
+
ys,
|
|
588
|
+
e("label", {
|
|
589
|
+
for: `uploadResume-${d}`,
|
|
590
|
+
class: "pointer text-gray-500"
|
|
591
|
+
}, [
|
|
592
|
+
e("input", {
|
|
593
|
+
disabled: l.value && l.value[`uploadResume-${d}`].afterResumeuploaded,
|
|
594
|
+
type: "file",
|
|
595
|
+
accept: ".pdf,.docx,.doc,.txt",
|
|
596
|
+
onChange: (c) => he(c, d)
|
|
597
|
+
}, null, 40, hs)
|
|
598
|
+
], 8, bs),
|
|
599
|
+
ws,
|
|
600
|
+
l.value && l.value[`uploadResume-${d}`].error_message ? (o(), u("div", ks, [
|
|
601
|
+
e("span", Es, b(l.value[`uploadResume-${d}`].error_message), 1)
|
|
602
|
+
])) : p("", !0),
|
|
603
|
+
l.value && l.value[`uploadResume-${d}`].success_message ? (o(), u("div", $s, [
|
|
604
|
+
e("span", Ps, b(l.value[`uploadResume-${d}`].success_message), 1)
|
|
605
|
+
])) : p("", !0)
|
|
606
|
+
]),
|
|
607
|
+
e("div", Ts, [
|
|
608
|
+
e("button", {
|
|
609
|
+
disabled: l.value && l.value[`uploadResume-${d}`].afterResumeuploaded,
|
|
610
|
+
class: E([
|
|
611
|
+
l.value && l.value[`uploadResume-${d}`].afterResumeuploaded || l.value && l.value[`uploadResume-${d}`].error_message ? "cursor-not-allowed bg-gray-500" : "cursor-pointer bg-background-secondary",
|
|
612
|
+
"inline-block rounded px-6 py-1.5 text-white"
|
|
613
|
+
]),
|
|
614
|
+
onClick: (c) => we(d)
|
|
615
|
+
}, " Upload ", 10, Rs),
|
|
616
|
+
l.value && l.value[`uploadResume-${d}`].renderWaiting ? (o(), u("img", Ss)) : p("", !0)
|
|
617
|
+
])
|
|
618
|
+
])
|
|
619
|
+
])) : p("", !0),
|
|
620
|
+
s.parameter_type === "text" ? (o(), u("div", Us, [
|
|
621
|
+
x(e("textarea", {
|
|
622
|
+
id: s.parameter_name,
|
|
623
|
+
"onUpdate:modelValue": (c) => s.parameter_value = c,
|
|
624
|
+
class: "m-0 w-full border border-solid border-gray-300 bg-white bg-clip-padding px-3 py-1.5 text-gray-700 ease-in-out focus:border-blue-600 focus:bg-white focus:text-gray-700 focus:outline-none",
|
|
625
|
+
rows: "3",
|
|
626
|
+
onKeyup: t[9] || (t[9] = (c) => ae())
|
|
627
|
+
}, null, 40, Ns), [
|
|
628
|
+
[g, s.parameter_value]
|
|
629
|
+
])
|
|
630
|
+
])) : p("", !0)
|
|
631
|
+
]))), 128))
|
|
632
|
+
]),
|
|
633
|
+
e("div", Cs, [
|
|
634
|
+
Vs,
|
|
635
|
+
e("div", As, [
|
|
636
|
+
Fs,
|
|
637
|
+
e("div", Ys, [
|
|
638
|
+
x(e("input", {
|
|
639
|
+
"onUpdate:modelValue": t[10] || (t[10] = (s) => v.value.MAX_TOKENS = s),
|
|
640
|
+
class: "block w-full appearance-none rounded border border-gray-200 px-4 py-1 text-xs leading-tight text-gray-700 focus:border-gray-500 focus:bg-white focus:outline-none",
|
|
641
|
+
type: "number"
|
|
642
|
+
}, null, 512), [
|
|
643
|
+
[g, v.value.MAX_TOKENS]
|
|
644
|
+
])
|
|
645
|
+
])
|
|
646
|
+
]),
|
|
647
|
+
e("div", Ls, [
|
|
648
|
+
Ms,
|
|
649
|
+
e("div", Os, [
|
|
650
|
+
x(e("input", {
|
|
651
|
+
"onUpdate:modelValue": t[11] || (t[11] = (s) => v.value.TEMPERATURE = s),
|
|
652
|
+
class: "block w-full appearance-none rounded border border-gray-200 px-4 py-1 text-xs leading-tight text-gray-700 focus:border-gray-500 focus:bg-white focus:outline-none",
|
|
653
|
+
type: "number"
|
|
654
|
+
}, null, 512), [
|
|
655
|
+
[g, v.value.TEMPERATURE]
|
|
656
|
+
])
|
|
657
|
+
])
|
|
658
|
+
]),
|
|
659
|
+
e("div", zs, [
|
|
660
|
+
Is,
|
|
661
|
+
e("div", Bs, [
|
|
662
|
+
x(e("input", {
|
|
663
|
+
"onUpdate:modelValue": t[12] || (t[12] = (s) => v.value.TOP_P = s),
|
|
664
|
+
class: "block w-full appearance-none rounded border border-gray-200 px-4 py-1 text-xs leading-tight text-gray-700 focus:border-gray-500 focus:bg-white focus:outline-none",
|
|
665
|
+
type: "number"
|
|
666
|
+
}, null, 512), [
|
|
667
|
+
[g, v.value.TOP_P]
|
|
668
|
+
])
|
|
669
|
+
])
|
|
670
|
+
]),
|
|
671
|
+
e("div", Ds, [
|
|
672
|
+
Ks,
|
|
673
|
+
e("div", Qs, [
|
|
674
|
+
x(e("input", {
|
|
675
|
+
"onUpdate:modelValue": t[13] || (t[13] = (s) => v.value.STOP_SEQUENCE = s),
|
|
676
|
+
class: "block w-full appearance-none rounded border border-gray-200 px-4 py-1 text-xs leading-tight text-gray-700 focus:border-gray-500 focus:bg-white focus:outline-none",
|
|
677
|
+
type: "text"
|
|
678
|
+
}, null, 512), [
|
|
679
|
+
[g, v.value.STOP_SEQUENCE]
|
|
680
|
+
])
|
|
681
|
+
])
|
|
682
|
+
]),
|
|
683
|
+
e("div", js, [
|
|
684
|
+
Hs,
|
|
685
|
+
e("div", qs, [
|
|
686
|
+
x(e("input", {
|
|
687
|
+
"onUpdate:modelValue": t[14] || (t[14] = (s) => v.value.FREQUENCY_PENALTY = s),
|
|
688
|
+
default: "",
|
|
689
|
+
min: "0",
|
|
690
|
+
class: "block w-full appearance-none rounded border border-gray-200 px-4 py-1 text-xs leading-tight text-gray-700 focus:border-gray-500 focus:bg-white focus:outline-none",
|
|
691
|
+
type: "number"
|
|
692
|
+
}, null, 512), [
|
|
693
|
+
[g, v.value.FREQUENCY_PENALTY]
|
|
694
|
+
])
|
|
695
|
+
])
|
|
696
|
+
]),
|
|
697
|
+
e("div", Gs, [
|
|
698
|
+
Ws,
|
|
699
|
+
e("div", Xs, [
|
|
700
|
+
x(e("input", {
|
|
701
|
+
"onUpdate:modelValue": t[15] || (t[15] = (s) => v.value.PRESENCE_PENALTY = s),
|
|
702
|
+
class: "block w-full appearance-none rounded border border-gray-200 px-4 py-1 text-xs leading-tight text-gray-700 focus:border-gray-500 focus:bg-white focus:outline-none",
|
|
703
|
+
type: "number"
|
|
704
|
+
}, null, 512), [
|
|
705
|
+
[g, v.value.PRESENCE_PENALTY]
|
|
706
|
+
])
|
|
707
|
+
])
|
|
708
|
+
])
|
|
709
|
+
]),
|
|
710
|
+
e("div", Js, [
|
|
711
|
+
Zs,
|
|
712
|
+
x(e("input", {
|
|
713
|
+
"onUpdate:modelValue": t[16] || (t[16] = (s) => J.value = s),
|
|
714
|
+
class: "block w-full appearance-none rounded border border-gray-200 px-4 py-1 leading-tight text-gray-700 focus:border-gray-500 focus:bg-white focus:outline-none",
|
|
715
|
+
type: "text"
|
|
716
|
+
}, null, 512), [
|
|
717
|
+
[g, J.value]
|
|
718
|
+
])
|
|
719
|
+
]),
|
|
720
|
+
e("div", {
|
|
721
|
+
class: "mt-4 w-full",
|
|
722
|
+
disabled: $.value || !w.value
|
|
723
|
+
}, [
|
|
724
|
+
I.value ? (o(), u("button", {
|
|
725
|
+
key: 0,
|
|
726
|
+
class: E(["mr-4 mt-4 inline-block px-4 py-2 text-white", $.value || !w.value ? "cursor-not-allowed bg-gray-500" : "cursor-pointer bg-background-secondary"]),
|
|
727
|
+
onClick: t[17] || (t[17] = (s) => fe())
|
|
728
|
+
}, " Start Execution ", 2)) : (o(), u("img", ta))
|
|
729
|
+
], 8, ea),
|
|
730
|
+
D.value ? (o(), u("div", sa, [
|
|
731
|
+
e("span", aa, b(D.value), 1)
|
|
732
|
+
])) : p("", !0),
|
|
733
|
+
$.value ? (o(), u("div", la, [
|
|
734
|
+
oa,
|
|
735
|
+
T.value && T.value.length ? (o(), u("div", ua, [
|
|
736
|
+
e("div", null, [
|
|
737
|
+
f("Your execution id is " + b($.value) + " and status is ", 1),
|
|
738
|
+
na
|
|
739
|
+
]),
|
|
740
|
+
T.value && T.value.length ? (o(), u("table", ra, [
|
|
741
|
+
e("thead", da, [
|
|
742
|
+
e("tr", ia, [
|
|
743
|
+
ca,
|
|
744
|
+
(o(!0), u(V, null, H(j.value, (s, d) => (o(), u("th", {
|
|
745
|
+
key: d,
|
|
746
|
+
class: "w-1/2 p-2"
|
|
747
|
+
}, b(s), 1))), 128))
|
|
748
|
+
])
|
|
749
|
+
]),
|
|
750
|
+
e("tbody", pa, [
|
|
751
|
+
(o(!0), u(V, null, H(T.value, (s, d) => (o(), u("tr", {
|
|
752
|
+
key: d,
|
|
753
|
+
class: "flex w-full justify-between border-b hover:bg-gray-300"
|
|
754
|
+
}, [
|
|
755
|
+
e("td", _a, b(d + 1), 1),
|
|
756
|
+
(o(!0), u(V, null, H(j.value, (c, C) => (o(), u("td", {
|
|
757
|
+
key: C,
|
|
758
|
+
class: "w-1/2 p-2"
|
|
759
|
+
}, b(s[c]), 1))), 128))
|
|
760
|
+
]))), 128))
|
|
761
|
+
])
|
|
762
|
+
])) : p("", !0)
|
|
763
|
+
])) : (o(), u("div", {
|
|
764
|
+
key: 1,
|
|
765
|
+
class: "",
|
|
766
|
+
innerHTML: L.value
|
|
767
|
+
}, null, 8, va)),
|
|
768
|
+
se.value !== "success" ? (o(), u("div", ma, [
|
|
769
|
+
M.value ? (o(), u("img", xa)) : (o(), u("button", {
|
|
770
|
+
key: 1,
|
|
771
|
+
disabled: M.value,
|
|
772
|
+
class: "mr-4 mt-4 inline-block bg-background-secondary px-4 py-2 text-white",
|
|
773
|
+
onClick: t[18] || (t[18] = (s) => ge())
|
|
774
|
+
}, "Check Status", 8, fa))
|
|
775
|
+
])) : p("", !0)
|
|
776
|
+
])) : p("", !0)
|
|
777
|
+
], 64)) : p("", !0)
|
|
778
|
+
])
|
|
779
|
+
])
|
|
780
|
+
])) : (o(), u("div", ga, "You don't have access"))
|
|
781
|
+
], 64)) : (o(), u("div", ya, wa));
|
|
782
|
+
}
|
|
783
|
+
});
|
|
784
|
+
const Ua = /* @__PURE__ */ Ve(ka, [["__scopeId", "data-v-87494603"]]);
|
|
785
|
+
export {
|
|
786
|
+
Ua as default
|
|
787
|
+
};
|