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

askpdf出现问题 #259

Open
1 task done
ChukieWu opened this issue Oct 22, 2023 · 4 comments
Open
1 task done

askpdf出现问题 #259

ChukieWu opened this issue Oct 22, 2023 · 4 comments

Comments

@ChukieWu
Copy link

这个问题是否已有issue

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

运行环境

  • OS: 14.0 (23A344)
  • Zotero version: 7.0.0-beta.46+c27bac2ad
  • Plugin version: 0.3.2

当前配置信息

api https://api.openai.com
secretKey sk-...mszc
model gpt-3.5-turbo-16k
temperature 1.0

问题详情

针对整个文献提问的时候出现如下提示
根据提供的上下文信息,Meet.Global.input 是一个变量或属性名。根据代码片段中的信息,我们可以确定以下几点:

  1. 首先,Meet.Global.views.messagesMeet.Global 对象的一个属性,它被赋值为空数组[]。这个属性可能是用来存储消息或其他相关的数据。
  2. 其次,Meet.Zotero.getRelatedText() 是一个函数调用,它使用了Meet.Global.input作为参数。根据函数名和参数名,我们可以猜测这个函数的目的可能是获取一个与Meet.Global.input相关的文本信息。
    然而,根据给定的上下文信息,我们无法准确确定Meet.Global.input的具体含义。它可能是一个用户输入的值、一个来自其他地方的数据,或者可能由其他代码定义并赋给了Meet.Global.input属性。
    为了更好地回答这个问题,我们需要更多关于Meet.Global.input的上下文信息。如果您能提供更多代码或上下文信息,我将尽力帮助您解答问题。[1]

补充说明

稳定复线,而且就算一次偶然成功了,下一次还是会这样。
然后还又一个问题,那就是回答成功了之后怎么针对这个问题接着往下问?

@zfb132
Copy link
Collaborator

zfb132 commented Oct 26, 2023

稳定复线,而且就算一次偶然成功了,下一次还是会这样。

长按标签进入编辑模式,确保每个标签的内容如下

let defaultTags: any = [
`
#🪐AskPDF[color=#0EA293][position=10][trigger=/^(本文|这篇文章|论文)/]
You are a helpful assistant. Context information is below.
$\{
Meet.Global.views.messages = [];
Meet.Zotero.getRelatedText(Meet.Global.input)
\}
Using the provided context information, write a comprehensive reply to the given query. Make sure to cite results using [number] notation after the reference. If the provided context information refer to multiple subjects with the same name, write separate answers for each subject. Use prior knowledge only if the given context didn't provide enough information.
Answer the question: $\{Meet.Global.input\}
Reply in ${Zotero.locale}
`,
`
#🌟Translate[c=#D14D72][pos=11][trigger=/^翻译/]
Translate these content to 简体中文:
$\{
Meet.Global.input.replace("翻译", "") ||
Meet.Zotero.getPDFSelection() ||
Meet.Global.views.messages[0].content
\}
`,
`
#✨Improve writing[color=#8e44ad][pos=12][trigger=/^润色/]
Below is a paragraph from an academic paper. Polish the writing to meet the academic style, improve the spelling, grammar, clarity, concision and overall readability. When necessary, rewrite the whole sentence. Furthermore, list all modification and explain the reasons to do so in markdown table. Paragraph: "$\{
Meet.Global.input.replace("润色", "") ||
Meet.Global.views.messages[0].content
\}"
`,
`
#Clipboard[c=#576CBC][pos=13][trigger=/(剪贴板|复制内容)/]
This is the content in my clipboard:
$\{Meet.Zotero.getClipboardText()\}
---
$\{Meet.Global.input\}
`,
`
#Annotations[c=#F49D1A][pos=14][trigger=/(选中|选择的|选择|所选)?(注释|高亮|标注)/]
These are PDF Annotation contents:
$\{
Meet.Zotero.getPDFAnnotations(Meet.Global.input.match(/(选中|选择的|选择|所选)/))
\}
Please answer me in the language of my question. Make sure to cite results using [number] notation after the reference.
My question is: $\{Meet.Global.input\}
`,
`
#Selection[c=#D14D72][pos=15][trigger=/^(这段|选中)(文本|话|文字|描述)/]
Read these content:
$\{
Meet.Zotero.getPDFSelection() ||
Meet.Global.views.messages[0].content
\}
---
Answer me in the language of my question. This is my question: $\{Meet.Global.input\}
`,
`
#Item[c=#159895][pos=16][trigger=/这篇(文献|论文|文章)/]
This is a Zotero item presented in JSON format:
$\{
JSON.stringify(ZoteroPane.getSelectedItems()[0].toJSON())
\}
Base on this JSON: $\{Meet.Global.input\}
`,
`
#Items[c=#159895][pos=17][trigger=/这些(文献|论文)/]
These are Zotero items presented in JSON format:
$\{
Meet.Zotero.getRelatedText(Meet.Global.input)
\}
Please answer me using the lanaguage as same as my question. Make sure to cite results using [number] notation after the reference.
My question is: $\{Meet.Global.input\}
`,
]

回答成功了之后怎么针对这个问题接着往下问?

把输入框的内容清空,输入你的新问题即可

@SadBergling
Copy link

我这边也是这个情况,偶尔能正常回复

@zfb132
Copy link
Collaborator

zfb132 commented Nov 1, 2023

查看是否是下面的问题
#256 (comment)

@SadBergling
Copy link

查看是否是下面的问题 #256 (comment)

感谢!已解决

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

3 participants