llmasaservice-ui 0.3.1 → 0.3.2

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/index.js CHANGED
@@ -198,7 +198,7 @@ var ChatPanel = ({
198
198
  });
199
199
  });
200
200
  let promptToSend = nextPrompt;
201
- if (Object.keys(history).length === 1 && promptTemplate && promptTemplate !== "") {
201
+ if (Object.keys(history).length === 0 && promptTemplate && promptTemplate !== "") {
202
202
  promptToSend = promptTemplate.replace("{{prompt}}", nextPrompt);
203
203
  for (let i = 0; i < data.length; i++) {
204
204
  promptToSend = promptToSend.replace(
package/dist/index.mjs CHANGED
@@ -165,7 +165,7 @@ var ChatPanel = ({
165
165
  });
166
166
  });
167
167
  let promptToSend = nextPrompt;
168
- if (Object.keys(history).length === 1 && promptTemplate && promptTemplate !== "") {
168
+ if (Object.keys(history).length === 0 && promptTemplate && promptTemplate !== "") {
169
169
  promptToSend = promptTemplate.replace("{{prompt}}", nextPrompt);
170
170
  for (let i = 0; i < data.length; i++) {
171
171
  promptToSend = promptToSend.replace(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "llmasaservice-ui",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Prebuilt UI components for LLMAsAService.io",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/src/ChatPanel.tsx CHANGED
@@ -194,7 +194,7 @@ const ChatPanel: React.FC<ChatPanelProps & ExtraProps> = ({
194
194
 
195
195
  // if this is the first user message, use the template. otherwise it is a follow-on question(s)
196
196
  if (
197
- Object.keys(history).length === 1 &&
197
+ Object.keys(history).length === 0 &&
198
198
  promptTemplate &&
199
199
  promptTemplate !== ""
200
200
  ) {