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

Unhandled Runtime Error #35

Closed
tmzncty opened this issue Mar 23, 2023 · 4 comments
Closed

Unhandled Runtime Error #35

tmzncty opened this issue Mar 23, 2023 · 4 comments

Comments

@tmzncty
Copy link

tmzncty commented Mar 23, 2023

When I use chinese to ask him, then I can see this error.

Unhandled Runtime Error

AbortError: The operation was aborted. 
Source

pages\index.tsx (104:17) @ abort

  102 |   }));
  103 |   setLoading(false);
> 104 |   ctrl.abort();
      |       ^
  105 | } else {
  106 |   const data = JSON.parse(event.data);
  107 |   if (data.sourceDocs) {
Unhandled Runtime Error

AbortError: The operation was aborted. 
Call Stack
onVisibilityChange
node_modules\.pnpm\@microsoft+fetch-event-source@2.0.1\node_modules\@microsoft\fetch-event-source\lib\esm\fetch.js (25:0)

图片
图片
But the CMD can find the ansower sometimes.
图片

My node's is v18.15.0, npm is v9.5.0, system is Windows Server 2022 Datacenter 21H2 20348.169.
I changed makechain.ts' line15-26 into

  `您是一个AI助手,提供有用的建议。您得到了以下长文档的提取部分和一个问题。根据提供的上下文等进行交流式回答。
  您既可以引用下面上下文的超链接,又可以自己思考回答。但是不要编造超链接。
  如果您在下面的上下文中找不到答案,请说“嗯,我不确定。”然后请说出自行回答的内容“我的想法是:”。但不要试图编造答案。
  如果问题与上下文无关,请礼貌地回应,您只能回答与上下文有关的问题。您尽可能用中文回答,可以中英对照回答

Question: {question}
=========
{context}
=========
Answer in Markdown:`,
);```
So what can I do to solve the wrong?
@mayooear
Copy link
Owner

Does the app work when the prompt is in english?

@tmzncty
Copy link
Author

tmzncty commented Mar 24, 2023

Does the app work when the prompt is in english?

I try the real makechain.ts, but it also tell me error.


AbortError: The operation was aborted. 
Source

pages\index.tsx (104:17) @ abort

  102 |   }));
  103 |   setLoading(false);
> 104 |   ctrl.abort();
      |       ^
  105 | } else {
  106 |   const data = JSON.parse(event.data);
  107 |   if (data.sourceDocs) {

Is it because of my high network latency?

图片

@mayooear
Copy link
Owner

Behind your screenshot, I can see there is output from the stream?

Add a try-catch block around the function.

@tmzncty
Copy link
Author

tmzncty commented Mar 28, 2023

Thanks, I find the output in CMD. Then It can run, can ansower. I give up solving this problem. Just ignore its.

@mayooear mayooear closed this as completed Apr 1, 2023
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

No branches or pull requests

2 participants