1+ {
2+ "nodes" : [
3+ {
4+ "id" : " chat_input_0" ,
5+ "position" : {
6+ "x" : -104.87337962629226 ,
7+ "y" : 133.0786252446273
8+ },
9+ "type" : " customNode" ,
10+ "data" : {
11+ "label" : " Chat Input" ,
12+ "name" : " chat_input" ,
13+ "version" : 1 ,
14+ "type" : " ChatCompletionRequest" ,
15+ "icon" : " /usr/src/packages/server/src/nodes/opea-icon-color.svg" ,
16+ "category" : " Controls" ,
17+ "description" : " User Input from Chat Window" ,
18+ "baseClasses" : [
19+ " ChatCompletionRequest"
20+ ],
21+ "tags" : [
22+ " OPEA"
23+ ],
24+ "inMegaservice" : false ,
25+ "filePath" : " /usr/src/packages/server/src/nodes/chat_input.js" ,
26+ "inputAnchors" : [],
27+ "inputParams" : [],
28+ "inputs" : {},
29+ "outputs" : {},
30+ "outputAnchors" : [
31+ {
32+ "id" : " chat_input_0-output-chat_input-ChatCompletionRequest" ,
33+ "name" : " chat_input" ,
34+ "label" : " ChatCompletionRequest" ,
35+ "description" : " User Input from Chat Window" ,
36+ "type" : " ChatCompletionRequest"
37+ }
38+ ],
39+ "id" : " chat_input_0" ,
40+ "selected" : false
41+ },
42+ "width" : 300 ,
43+ "height" : 143 ,
44+ "selected" : false ,
45+ "positionAbsolute" : {
46+ "x" : -104.87337962629226 ,
47+ "y" : 133.0786252446273
48+ },
49+ "dragging" : false
50+ },
51+ {
52+ "id" : " opea_service@llm_tgi_0" ,
53+ "position" : {
54+ "x" : 320.28599745224875 ,
55+ "y" : 74.42581341053906
56+ },
57+ "type" : " customNode" ,
58+ "data" : {
59+ "label" : " LLM Text Generation" ,
60+ "name" : " opea_service@llm_tgi" ,
61+ "version" : 1 ,
62+ "type" : " GeneratedDoc" ,
63+ "icon" : " /usr/src/packages/server/src/nodes/opea-icon-color.svg" ,
64+ "category" : " LLM" ,
65+ "description" : " LLM Text Generation Inference" ,
66+ "baseClasses" : [
67+ " GeneratedDoc" ,
68+ " StreamingResponse" ,
69+ " ChatCompletion"
70+ ],
71+ "tags" : [
72+ " OPEA"
73+ ],
74+ "inMegaservice" : true ,
75+ "dependent_services" : {
76+ "tgi" : {
77+ "modelName" : " " ,
78+ "huggingFaceToken" : " NA"
79+ }
80+ },
81+ "inputs" : {
82+ "text" : " {{chat_input_0.data.instance}}" ,
83+ "modelName" : " Intel/neural-chat-7b-v3-3" ,
84+ "huggingFaceToken" : " " ,
85+ "max_tokens" : 17 ,
86+ "top_k" : 10 ,
87+ "top_p" : 0.95 ,
88+ "typical_p" : 0.95 ,
89+ "temperature" : 0.01 ,
90+ "presence_penalty" : 1.03 ,
91+ "frequency_penalty" : " " ,
92+ "streaming" : true ,
93+ "chat_template" : " ### You are a helpful, respectful and honest assistant to help the user with questions.\n ### Context: {context}\n ### Question: {question}\n ### Answer:"
94+ },
95+ "filePath" : " /usr/src/packages/server/src/nodes/llm.js" ,
96+ "inputAnchors" : [
97+ {
98+ "label" : " LLM Params Document" ,
99+ "name" : " text" ,
100+ "type" : " LLMParamsDoc|ChatCompletionRequest|SearchedDoc" ,
101+ "id" : " opea_service@llm_tgi_0-input-text-LLMParamsDoc|ChatCompletionRequest|SearchedDoc"
102+ }
103+ ],
104+ "inputParams" : [
105+ {
106+ "label" : " Model Name" ,
107+ "name" : " modelName" ,
108+ "type" : " options" ,
109+ "default" : " Intel/neural-chat-7b-v3-3" ,
110+ "options" : [
111+ {
112+ "name" : " Intel/neural-chat-7b-v3-3" ,
113+ "label" : " Intel/neural-chat-7b-v3-3"
114+ },
115+ {
116+ "name" : " Llama-2-7b-chat-hf" ,
117+ "label" : " Llama-2-7b-chat-hf"
118+ },
119+ {
120+ "name" : " Llama-2-70b-chat-hf" ,
121+ "label" : " Llama-2-70b-chat-hf"
122+ },
123+ {
124+ "name" : " Meta-Llama-3-8B-Instruct" ,
125+ "label" : " Meta-Llama-3-8B-Instruct"
126+ },
127+ {
128+ "name" : " Meta-Llama-3-70B-Instruct" ,
129+ "label" : " Meta-Llama-3-70B-Instruct"
130+ },
131+ {
132+ "name" : " Phi-3" ,
133+ "label" : " Phi-3"
134+ }
135+ ],
136+ "id" : " opea_service@llm_tgi_0-input-modelName-options"
137+ },
138+ {
139+ "label" : " HuggingFace Token" ,
140+ "name" : " huggingFaceToken" ,
141+ "type" : " password" ,
142+ "optional" : true ,
143+ "id" : " opea_service@llm_tgi_0-input-huggingFaceToken-password"
144+ },
145+ {
146+ "label" : " Maximum Tokens" ,
147+ "name" : " max_tokens" ,
148+ "type" : " number" ,
149+ "default" : 17 ,
150+ "optional" : true ,
151+ "additionalParams" : true ,
152+ "id" : " opea_service@llm_tgi_0-input-max_tokens-number"
153+ },
154+ {
155+ "label" : " Top K" ,
156+ "name" : " top_k" ,
157+ "type" : " number" ,
158+ "default" : 10 ,
159+ "optional" : true ,
160+ "additionalParams" : true ,
161+ "id" : " opea_service@llm_tgi_0-input-top_k-number"
162+ },
163+ {
164+ "label" : " Top P" ,
165+ "name" : " top_p" ,
166+ "type" : " number" ,
167+ "default" : 0.95 ,
168+ "optional" : true ,
169+ "additionalParams" : true ,
170+ "id" : " opea_service@llm_tgi_0-input-top_p-number"
171+ },
172+ {
173+ "label" : " Typical P" ,
174+ "name" : " typical_p" ,
175+ "type" : " number" ,
176+ "default" : 0.95 ,
177+ "optional" : true ,
178+ "additionalParams" : true ,
179+ "id" : " opea_service@llm_tgi_0-input-typical_p-number"
180+ },
181+ {
182+ "label" : " Temperature" ,
183+ "name" : " temperature" ,
184+ "type" : " number" ,
185+ "default" : 0.01 ,
186+ "optional" : true ,
187+ "additionalParams" : true ,
188+ "id" : " opea_service@llm_tgi_0-input-temperature-number"
189+ },
190+ {
191+ "label" : " Presence Penalty" ,
192+ "name" : " presence_penalty" ,
193+ "type" : " number" ,
194+ "default" : 1.03 ,
195+ "optional" : true ,
196+ "additionalParams" : true ,
197+ "id" : " opea_service@llm_tgi_0-input-presence_penalty-number"
198+ },
199+ {
200+ "label" : " Frequency Penalty" ,
201+ "name" : " frequency_penalty" ,
202+ "type" : " number" ,
203+ "default" : 0 ,
204+ "optional" : true ,
205+ "additionalParams" : true ,
206+ "id" : " opea_service@llm_tgi_0-input-frequency_penalty-number"
207+ },
208+ {
209+ "label" : " Streaming" ,
210+ "name" : " streaming" ,
211+ "type" : " boolean" ,
212+ "default" : true ,
213+ "optional" : true ,
214+ "additionalParams" : true ,
215+ "id" : " opea_service@llm_tgi_0-input-streaming-boolean"
216+ },
217+ {
218+ "label" : " Chat Template" ,
219+ "name" : " chat_template" ,
220+ "type" : " string" ,
221+ "rows" : true ,
222+ "default" : " ### You are a helpful, respectful and honest assistant to help the user with questions.\n ### Context: {context}\n ### Question: {question}\n ### Answer:" ,
223+ "optional" : true ,
224+ "additionalParams" : true ,
225+ "id" : " opea_service@llm_tgi_0-input-chat_template-string"
226+ }
227+ ],
228+ "outputs" : {},
229+ "outputAnchors" : [
230+ {
231+ "id" : " opea_service@llm_tgi_0-output-opea_service@llm_tgi-GeneratedDoc|StreamingResponse|ChatCompletion" ,
232+ "name" : " opea_service@llm_tgi" ,
233+ "label" : " GeneratedDoc" ,
234+ "description" : " LLM Text Generation Inference" ,
235+ "type" : " GeneratedDoc | StreamingResponse | ChatCompletion"
236+ }
237+ ],
238+ "id" : " opea_service@llm_tgi_0" ,
239+ "selected" : false
240+ },
241+ "width" : 300 ,
242+ "height" : 478 ,
243+ "selected" : false ,
244+ "positionAbsolute" : {
245+ "x" : 320.28599745224875 ,
246+ "y" : 74.42581341053906
247+ },
248+ "dragging" : false
249+ },
250+ {
251+ "id" : " chat_completion_0" ,
252+ "position" : {
253+ "x" : 856.6184063184758 ,
254+ "y" : 137.45379050568326
255+ },
256+ "type" : " customNode" ,
257+ "data" : {
258+ "label" : " Chat Completion" ,
259+ "name" : " chat_completion" ,
260+ "version" : 1 ,
261+ "type" : " ChatCompletion" ,
262+ "icon" : " /usr/src/packages/server/src/nodes/opea-icon-color.svg" ,
263+ "category" : " Controls" ,
264+ "description" : " Send Chat Response to UI" ,
265+ "baseClasses" : [],
266+ "tags" : [
267+ " OPEA"
268+ ],
269+ "inMegaservice" : false ,
270+ "inputs" : {
271+ "llm_response" : " {{opea_service@llm_tgi_0.data.instance}}"
272+ },
273+ "hideOutput" : true ,
274+ "filePath" : " /usr/src/packages/server/src/nodes/chat_completion.js" ,
275+ "inputAnchors" : [
276+ {
277+ "label" : " LLM Response" ,
278+ "name" : " llm_response" ,
279+ "type" : " ChatCompletion" ,
280+ "id" : " chat_completion_0-input-llm_response-ChatCompletion"
281+ }
282+ ],
283+ "inputParams" : [],
284+ "outputs" : {},
285+ "outputAnchors" : [],
286+ "id" : " chat_completion_0" ,
287+ "selected" : false
288+ },
289+ "width" : 300 ,
290+ "height" : 143 ,
291+ "positionAbsolute" : {
292+ "x" : 856.6184063184758 ,
293+ "y" : 137.45379050568326
294+ },
295+ "selected" : false
296+ }
297+ ],
298+ "edges" : [
299+ {
300+ "source" : " chat_input_0" ,
301+ "sourceHandle" : " chat_input_0-output-chat_input-ChatCompletionRequest" ,
302+ "target" : " opea_service@llm_tgi_0" ,
303+ "targetHandle" : " opea_service@llm_tgi_0-input-text-LLMParamsDoc|ChatCompletionRequest|SearchedDoc" ,
304+ "type" : " buttonedge" ,
305+ "id" : " chat_input_0-chat_input_0-output-chat_input-ChatCompletionRequest-opea_service@llm_tgi_0-opea_service@llm_tgi_0-input-text-LLMParamsDoc|ChatCompletionRequest|SearchedDoc"
306+ },
307+ {
308+ "source" : " opea_service@llm_tgi_0" ,
309+ "sourceHandle" : " opea_service@llm_tgi_0-output-opea_service@llm_tgi-GeneratedDoc|StreamingResponse|ChatCompletion" ,
310+ "target" : " chat_completion_0" ,
311+ "targetHandle" : " chat_completion_0-input-llm_response-ChatCompletion" ,
312+ "type" : " buttonedge" ,
313+ "id" : " opea_service@llm_tgi_0-opea_service@llm_tgi_0-output-opea_service@llm_tgi-GeneratedDoc|StreamingResponse|ChatCompletion-chat_completion_0-chat_completion_0-input-llm_response-ChatCompletion"
314+ }
315+ ]
316+ }
0 commit comments