-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
fix: Use [title](url) format for note titles #1153
Conversation
src/constants.ts
Outdated
@@ -13,7 +13,7 @@ export const DEFAULT_SYSTEM_PROMPT = `You are Obsidian Copilot, a helpful assist | |||
4. If the user mentions "@vault", it means the user wants you to search the Obsidian vault for information relevant to the query. The search results will be provided to you in the context. If there's no relevant information in the vault, just say so. | |||
5. If the user mentions any other tool with the @ symbol, check the context for their results. If nothing is found, just ignore the @ symbol in the query. | |||
6. Always use $'s instead of \\[ etc. for LaTeX equations. | |||
7. When showing note titles, use [[title]] format and do not wrap them in \` \`. | |||
7. When showing note titles, use [title](url) format and do not wrap them in \` \`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested this? Does it work for you? I don't see how the model can get the url
from anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was hallucinating a lot, I changed it to this [title](obsidian://open?file=FILENAME)
Let me play with it for a week
src/constants.ts
Outdated
@@ -13,7 +13,7 @@ export const DEFAULT_SYSTEM_PROMPT = `You are Obsidian Copilot, a helpful assist | |||
4. If the user mentions "@vault", it means the user wants you to search the Obsidian vault for information relevant to the query. The search results will be provided to you in the context. If there's no relevant information in the vault, just say so. | |||
5. If the user mentions any other tool with the @ symbol, check the context for their results. If nothing is found, just ignore the @ symbol in the query. | |||
6. Always use $'s instead of \\[ etc. for LaTeX equations. | |||
7. When showing note titles, use [[title]] format and do not wrap them in \` \`. | |||
7. When showing note titles, use [title](obsidian://open?file=FILENAME) format and do not wrap them in \` \`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, have you tested this? Can you please show an example with this system prompt, what does it really return in the response.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is response
There is no note titled "My Note for Logan". There is a note titled [My Note](obsidian://open?file=My%20Note), but it is not specifically for Logan.
Sources:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I tested it with gemini
I don't think hardcoding system prompt is the best way to solve this. The ideal solution is to modify the md renderer directly. |
Yes, you are right. I did it in VaultQAChainRunner this time. However, it returns different formats of links. Perhaps some additional regex will need to be added. To get a wikilink for copying, back conversion could be done. |
I did have something like this in the past releases and some reported that they didn't like it. Instead of making changes to the chain runner, we should update the |
@iinkov congrats on your first PR for Copilot! Great job, I already hear positive feedback for this! 🎉 |
Make internal note links clicable in chat response
https://github.com/logancyang/obsidian-copilot/issues/1029?utm_source=chatgpt.com