your-papa / obsidian-Smart2Brain

An Obsidian plugin to interact with your privacy focused AI-Assistant making your second brain even smarter!
GNU Affero General Public License v3.0
559 stars 37 forks source link

I doen't give back code blocks content #137

Open sekiwired opened 3 months ago

sekiwired commented 3 months ago

Feature Area

Chat

Painpoint

Hello I am sorry if this is the wrong place/categorization. I don't know who's responsible (the model or smart2Brain)

It does not give back the content of my code block . I use llama3.

Screenshot 2024-06-04 at 19 48 23

Screenshot 2024-06-04 at 20 11 38

Moreover I have to tell him i want the content of my note, not ollama personal improv 😊, given the context, shouldn't this be a default? Do you wrap anything for context (My prompt, ollama response...) ? Or is it because it can't read the answer ?

Thank you (for your time and this tool 🙏)

Describe your idea

I have a ton of documented shell command tricks/tools, it would be amazing for me to be able to use this to retrieve them, as per good practice they are all in code blocks... :/ Also it would be better for me to have the content of my note/command given back and not the one from the model.

Do i really have to indicate everytime that I want the information present in my note?

Alternatives

No response

Additional Context

No response

Leo310 commented 3 months ago

Moreover I have to tell him I want the content of my note, not ollama personal improv 😊, given the context, shouldn't this be a default?

Yes, this should be a default and your code block should also be retrieved. Not sure if this is caused by the model or by a bug in our plugin. Could you enable debugging in the advanced plugin settings and take a look at the developer console while rerunning your query? Then you should be able to see which documents are retrieved and if your code block is part of them. Also, which embedding model are you using? Because some might be worse at embedding code blocks and capturing their semantics.

Do you wrap anything for context (My prompt, ollama response...) ?

What do you mean by that?