ninegrid2 6.512.0 → 6.514.0

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.
@@ -98,11 +98,8 @@ class aiContainer extends HTMLElement
98
98
  return colInfo;
99
99
  };
100
100
 
101
+
101
102
  #generateQdrantFilter = async (userInput) => {
102
- return JSON.parse(userInput);
103
- }
104
-
105
- #generateQdrantFilter1 = async (userInput) => {
106
103
 
107
104
  const systemMessage = "You are a helpful assistant.";
108
105
  // Qdrant 필터로 변환하기 위한 프롬프트 엔지니어링
@@ -158,8 +155,7 @@ filterString = "a" + filterString;
158
155
  // 안정적인 JSON 파싱을 위해 'JSON Mode' 또는 Function Calling 사용을 강력히 권장
159
156
  // LangChain의 SelfQueryRetriever를 사용하면 이 부분을 자동화할 수 있습니다.
160
157
  //try {
161
- const a = JSON.parse(filterString);
162
- return a;
158
+ return JSON.parse(filterString);
163
159
  //} catch (parseError) {
164
160
  // console.error("Failed to parse filter string as JSON:", parseError);
165
161
  // console.error("String that failed to parse:", filterString);
@@ -219,8 +215,10 @@ filterString = "a" + filterString;
219
215
  e.target.value = "";
220
216
  });
221
217
 
222
- this.shadowRoot.querySelector("nx-ai-chat").add("me", question);
223
- this.shadowRoot.querySelector("nx-ai-chat").add("ing", question);
218
+ const elAiChat = this.shadowRoot.querySelector("nx-ai-chat");
219
+
220
+ elAiChat.add("me", question);
221
+ elAiChat.add("ing", question);
224
222
 
225
223
  try {
226
224
  this.#createModel();
@@ -235,8 +233,8 @@ filterString = "a" + filterString;
235
233
  await this.#q3();
236
234
  }
237
235
  } catch (error) {
238
- console.error("Error generating Qdrant filter:", error);
239
- return null;
236
+ //console.error("Error generating Qdrant filter:", error);
237
+ elAiChat.add("ai", error);
240
238
  }
241
239
 
242
240
 
@@ -27952,11 +27952,8 @@ class aiContainer extends HTMLElement
27952
27952
  return colInfo;
27953
27953
  };
27954
27954
 
27955
+
27955
27956
  #generateQdrantFilter = async (userInput) => {
27956
- return JSON.parse(userInput);
27957
- }
27958
-
27959
- #generateQdrantFilter1 = async (userInput) => {
27960
27957
 
27961
27958
  const systemMessage = "You are a helpful assistant.";
27962
27959
  // Qdrant 필터로 변환하기 위한 프롬프트 엔지니어링
@@ -28012,8 +28009,7 @@ filterString = "a" + filterString;
28012
28009
  // 안정적인 JSON 파싱을 위해 'JSON Mode' 또는 Function Calling 사용을 강력히 권장
28013
28010
  // LangChain의 SelfQueryRetriever를 사용하면 이 부분을 자동화할 수 있습니다.
28014
28011
  //try {
28015
- const a = JSON.parse(filterString);
28016
- return a;
28012
+ return JSON.parse(filterString);
28017
28013
  //} catch (parseError) {
28018
28014
  // console.error("Failed to parse filter string as JSON:", parseError);
28019
28015
  // console.error("String that failed to parse:", filterString);
@@ -28072,8 +28068,10 @@ filterString = "a" + filterString;
28072
28068
  e.target.value = "";
28073
28069
  });
28074
28070
 
28075
- this.shadowRoot.querySelector("nx-ai-chat").add("me", question);
28076
- this.shadowRoot.querySelector("nx-ai-chat").add("ing", question);
28071
+ const elAiChat = this.shadowRoot.querySelector("nx-ai-chat");
28072
+
28073
+ elAiChat.add("me", question);
28074
+ elAiChat.add("ing", question);
28077
28075
 
28078
28076
  try {
28079
28077
  this.#createModel();
@@ -28088,8 +28086,8 @@ filterString = "a" + filterString;
28088
28086
  await this.#q3();
28089
28087
  }
28090
28088
  } catch (error) {
28091
- console.error("Error generating Qdrant filter:", error);
28092
- return null;
28089
+ //console.error("Error generating Qdrant filter:", error);
28090
+ elAiChat.add("ai", error);
28093
28091
  }
28094
28092
 
28095
28093
 
@@ -27950,11 +27950,8 @@ class aiContainer extends HTMLElement
27950
27950
  return colInfo;
27951
27951
  };
27952
27952
 
27953
+
27953
27954
  #generateQdrantFilter = async (userInput) => {
27954
- return JSON.parse(userInput);
27955
- }
27956
-
27957
- #generateQdrantFilter1 = async (userInput) => {
27958
27955
 
27959
27956
  const systemMessage = "You are a helpful assistant.";
27960
27957
  // Qdrant 필터로 변환하기 위한 프롬프트 엔지니어링
@@ -28010,8 +28007,7 @@ filterString = "a" + filterString;
28010
28007
  // 안정적인 JSON 파싱을 위해 'JSON Mode' 또는 Function Calling 사용을 강력히 권장
28011
28008
  // LangChain의 SelfQueryRetriever를 사용하면 이 부분을 자동화할 수 있습니다.
28012
28009
  //try {
28013
- const a = JSON.parse(filterString);
28014
- return a;
28010
+ return JSON.parse(filterString);
28015
28011
  //} catch (parseError) {
28016
28012
  // console.error("Failed to parse filter string as JSON:", parseError);
28017
28013
  // console.error("String that failed to parse:", filterString);
@@ -28070,8 +28066,10 @@ filterString = "a" + filterString;
28070
28066
  e.target.value = "";
28071
28067
  });
28072
28068
 
28073
- this.shadowRoot.querySelector("nx-ai-chat").add("me", question);
28074
- this.shadowRoot.querySelector("nx-ai-chat").add("ing", question);
28069
+ const elAiChat = this.shadowRoot.querySelector("nx-ai-chat");
28070
+
28071
+ elAiChat.add("me", question);
28072
+ elAiChat.add("ing", question);
28075
28073
 
28076
28074
  try {
28077
28075
  this.#createModel();
@@ -28086,8 +28084,8 @@ filterString = "a" + filterString;
28086
28084
  await this.#q3();
28087
28085
  }
28088
28086
  } catch (error) {
28089
- console.error("Error generating Qdrant filter:", error);
28090
- return null;
28087
+ //console.error("Error generating Qdrant filter:", error);
28088
+ elAiChat.add("ai", error);
28091
28089
  }
28092
28090
 
28093
28091
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.512.0",
4
+ "version": "6.514.0",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
7
  "import": "./dist/index.js",
@@ -98,11 +98,8 @@ class aiContainer extends HTMLElement
98
98
  return colInfo;
99
99
  };
100
100
 
101
+
101
102
  #generateQdrantFilter = async (userInput) => {
102
- return JSON.parse(userInput);
103
- }
104
-
105
- #generateQdrantFilter1 = async (userInput) => {
106
103
 
107
104
  const systemMessage = "You are a helpful assistant.";
108
105
  // Qdrant 필터로 변환하기 위한 프롬프트 엔지니어링
@@ -158,8 +155,7 @@ filterString = "a" + filterString;
158
155
  // 안정적인 JSON 파싱을 위해 'JSON Mode' 또는 Function Calling 사용을 강력히 권장
159
156
  // LangChain의 SelfQueryRetriever를 사용하면 이 부분을 자동화할 수 있습니다.
160
157
  //try {
161
- const a = JSON.parse(filterString);
162
- return a;
158
+ return JSON.parse(filterString);
163
159
  //} catch (parseError) {
164
160
  // console.error("Failed to parse filter string as JSON:", parseError);
165
161
  // console.error("String that failed to parse:", filterString);
@@ -219,8 +215,10 @@ filterString = "a" + filterString;
219
215
  e.target.value = "";
220
216
  });
221
217
 
222
- this.shadowRoot.querySelector("nx-ai-chat").add("me", question);
223
- this.shadowRoot.querySelector("nx-ai-chat").add("ing", question);
218
+ const elAiChat = this.shadowRoot.querySelector("nx-ai-chat");
219
+
220
+ elAiChat.add("me", question);
221
+ elAiChat.add("ing", question);
224
222
 
225
223
  try {
226
224
  this.#createModel();
@@ -235,8 +233,8 @@ filterString = "a" + filterString;
235
233
  await this.#q3();
236
234
  }
237
235
  } catch (error) {
238
- console.error("Error generating Qdrant filter:", error);
239
- return null;
236
+ //console.error("Error generating Qdrant filter:", error);
237
+ elAiChat.add("ai", error);
240
238
  }
241
239
 
242
240