Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why the answer string show duplicated words on front end? #300

Closed
jinjunzh opened this issue Apr 10, 2024 · 4 comments · Fixed by #301
Closed

Why the answer string show duplicated words on front end? #300

jinjunzh opened this issue Apr 10, 2024 · 4 comments · Fixed by #301

Comments

@jinjunzh
Copy link

Tried to set up chat-langchain locally , but it looks answers in browser has below problems which show duplicated words, but debug backtrace from smith , it looks response works fine, why this issue happen?
..........
Answer
<<||useruser||>>
CanCan you you provide provide me me with with instructions instructions on on how how to to.........

@iiitmahesh
Copy link

@jinjunzh Check this #299

@jinjunzh jinjunzh reopened this Apr 19, 2024
@jinjunzh
Copy link
Author

jinjunzh commented Apr 19, 2024

This solution #299 looks doesn't work for me, anything else missing? @iiitmahesh

diff --git a/frontend/app/components/ChatWindow.tsx b/frontend/app/components/ChatWindow.tsx
index f4aa4dd..2fb0a98 100644
--- a/frontend/app/components/ChatWindow.tsx
+++ b/frontend/app/components/ChatWindow.tsx
@@ -2,7 +2,7 @@

import React, { useEffect, useRef, useState } from "react";
import { useSearchParams } from "next/navigation";
-import { RemoteRunnable } from "@langchain/core/runnables/remote";
+import { RemoteRunnable } from "langchain/runnables/remote";
import { applyPatch } from "@langchain/core/utils/json_patch";


diff --git a/frontend/package.json b/frontend/package.json
index 5e562b7..50766ce 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -15,7 +15,7 @@
"@chakra-ui/react": "^2.8.1",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
- "@langchain/core": "^0.1.27",
+ "@langchain/core": "0.1.44",
"@types/dompurify": "^3.0.5",
"@types/marked": "^5.0.1",
"@types/node": "20.4.9",
@@ -29,6 +29,7 @@
"framer-motion": "^10.16.4",
"graphql": "^16.8.1",
"highlight.js": "^11.8.0",
+ "langchain": "0.1.26",
"langsmith": "^0.0.41",
"marked": "^7.0.2",
"next": "13.5.4",

@luca-git
Copy link

Which would be the python langchain version needed?

@jinjunzh
Copy link
Author

Which would be the python langchain version needed?

python 3.10
Langchain version: 0.1.16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants