diff --git a/packages/chat-component/src/main.ts b/packages/chat-component/src/main.ts index e4fedacf..318ddbff 100644 --- a/packages/chat-component/src/main.ts +++ b/packages/chat-component/src/main.ts @@ -340,7 +340,7 @@ export class ChatComponent extends LitElement { } // Render text entries in bubbles renderTextEntry(textEntry: ChatMessageText) { - const entries = [html`
${unsafeHTML(textEntry.value)}
`]; + const entries = [html`${unsafeHTML(textEntry.value)}
`]; // render steps if (textEntry.followingSteps && textEntry.followingSteps.length > 0) { diff --git a/tests/e2e/hars/default-ask-response.har b/tests/e2e/hars/default-ask-response.har new file mode 100644 index 00000000..941cbd18 --- /dev/null +++ b/tests/e2e/hars/default-ask-response.har @@ -0,0 +1,75 @@ +{ + "log": { + "version": "1.2", + "creator": { + "name": "Playwright", + "version": "1.39.0" + }, + "browser": { + "name": "chromium", + "version": "119.0.6045.9" + }, + "entries": [ + { + "startedDateTime": "2023-10-27T08:26:30.487Z", + "time": 260.506, + "request": { + "method": "POST", + "url": "http://localhost:5173/ask", + "httpVersion": "HTTP/2.0", + "cookies": [], + "headers": [ + { "name": ":authority", "value": "http://localhost:5173" }, + { "name": ":method", "value": "POST" }, + { "name": ":path", "value": "/ask" }, + { "name": ":scheme", "value": "https" }, + { "name": "accept", "value": "*/*" }, + { "name": "accept-encoding", "value": "gzip, deflate, br" }, + { "name": "accept-language", "value": "en-US" }, + { "name": "content-length", "value": "416" }, + { "name": "content-type", "value": "application/json" }, + { "name": "origin", "value": "http://localhost:5173" }, + { "name": "sec-fetch-dest", "value": "empty" }, + { "name": "sec-fetch-mode", "value": "cors" }, + { "name": "sec-fetch-site", "value": "cross-site" }, + { + "name": "user-agent", + "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.6045.9 Safari/537.36" + } + ], + "queryString": [], + "headersSize": -1, + "bodySize": -1, + "postData": { + "mimeType": "application/json", + "text": "{\"messages\":[{\"content\":\"How to search and book rentals?\",\"role\":\"user\"}],\"context\":{\"retrieval_mode\":\"hybrid\",\"semantic_ranker\":true,\"semantic_captions\":false,\"suggest_followup_questions\":true,\"retrievalMode\":\"hybrid\",\"retrieveCount\":3,\"useSemanticRanker\":true,\"useSemanticCaptions\":false,\"excludeCategory\":\"\",\"promptTemplate\":\"\",\"promptTemplatePrefix\":\"\",\"promptTemplateSuffix\":\"\",\"approach\":\"rrr\"},\"stream\":false}", + "params": [] + } + }, + "response": { + "status": 200, + "statusText": "", + "httpVersion": "HTTP/2.0", + "cookies": [], + "headers": [ + { "name": "access-control-allow-origin", "value": "http://localhost:5173" }, + { "name": "content-length", "value": "277" }, + { "name": "content-type", "value": "application/json; charset=utf-8" }, + { "name": "date", "value": "Fri, 27 Oct 2023 08:26:31 GMT" }, + { "name": "vary", "value": "Origin" } + ], + "content": { + "size": -1, + "mimeType": "application/json; charset=utf-8", + "text": "{\"choices\":[{\"index\":0,\"message\":{\"content\":\"I don't know the answer to that question.\",\"role\":\"assistant\",\"context\":{\"data_points\":[],\"thoughts\":\"[chain/start] [1:chain:AgentExecutor] Entering chain