zotero-gpt icon indicating copy to clipboard operation
zotero-gpt copied to clipboard

Meet.Zotero.getPDFSelection() 没有正确返回选中内容

Open qwoiqwqqwq opened this issue 1 year ago • 2 comments

这个问题是否已有issue

  • [X] 我确认没有已有issue,且已阅读常见问题

运行环境

  • OS: macOS Monterey 12.5
  • Zotero version: 7.0.0-beta.32+5e27a7501
  • Plugin version: 0.3.0

当前配置信息

api 第三方 api model gpt-4

问题详情

使用 Selection Tag 时,GPT 似乎没有收到我选中的文字。

这是我的 Prompt:

请你把你收到的所有文本,放到一个 markdown 代码框内,一字不变地返回给我。特别注意不要遗漏冒号之前的内容。

用 Selection Tag 发送,得到的回复:

||>User:
I am reading a PDF, and the following text is a part of the PDF. Please read it first, and I will ask you some question later: 
||>Assistant:
OK.
||>User:
Read these content:
?
---
Answer me in the language of my question. This is my question: 请你把你收到的所有文本,放到一个 markdown 代码框内,一字不变地返回给我。特别注意不要遗漏冒号之前的内容。

然后,我又用 Clipboard Tag 发送了同样的 Prompt,这是我得到的回复

||>User:
I am reading a PDF, and the following text is a part of the PDF. Please read it first, and I will ask you some question later: 
||>Assistant:
OK.
||>User:
Read these content:
?
---
Answer me in the language of my question. This is my question: 请你把你收到的所有文本,放到一个 markdown 代码框内,一字不变地返回给我。特别注意不要遗漏冒号之前的内容。
||>User:
This is the content in my clipboard:
Our main contributions are four-fold.
---
请你把你收到的所有文本,放到一个 markdown 代码框内,一字不变地返回给我。特别注意不要遗漏冒号之前的内容。

看上去是 Meet.Zotero.getPDFSelection() 没有正确返回选中内容。

补充说明

可以稳定复现。试过两个 PDF。

这是 Selection Tag 的内容:

#Selection[position=15][color=#D14D72][trigger=/^(这段|选中)(文本|话|文字|描述)/]
Read these content:
<code>
Meet.Zotero.getPDFSelection() ||
Meet.Global.views.messages[0].content
</code>
---
Answer me in the language of my question. This is my question: <code>Meet.Global.input</code>

qwoiqwqqwq avatar Aug 10 '23 07:08 qwoiqwqqwq

老板,windows 64 bits zotero 7 beta 33 中凡是需要获得选中文本的命令好像都失效了,是不是新版zotero的代码变化导致的?

此外两个命令之间好像会有“上下文”的感觉,后一个命令会使用前一个命令的内容作为素材。

相关issue:

  1. Zotero 7:askpdf does not work. · Issue #197 · MuiseDestiny/zotero-gpt
  2. 你好!AskPDF无法正确回答问题 · Issue #204 · MuiseDestiny/zotero-gpt

模仿新的模板,已经解决,打扰了 多谢

Geo123abc avatar Aug 14 '23 15:08 Geo123abc

老板,windows 64 bits zotero 7 beta 33 中凡是需要获得选中文本的命令好像都失效了,是不是新版zotero的代码变化导致的?

此外两个命令之间好像会有“上下文”的感觉,后一个命令会使用前一个命令的内容作为素材。

相关issue:

  1. Zotero 7:askpdf does not work. · Issue #197 · MuiseDestiny/zotero-gpt
  2. 你好!AskPDF无法正确回答问题 · Issue #204 · MuiseDestiny/zotero-gpt

模仿新的模板,已经解决,打扰了 多谢

你好,请问新的模版在哪里。

boundary1995 avatar Aug 21 '23 17:08 boundary1995