[GH-ISSUE #1551] Analyse this document. #26607

Closed
opened 2026-04-22 02:57:48 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @iplayfast on GitHub (Dec 15, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1551

Thinking of an enhancement. With llava, you could ask what a picture is about and give the file location.
I wonder if it would be useful or worthwhile to analyse a document by giving it the file location.

Downsides, no rag so info can't be easily stored.
Upsides, would be super useful and can use as a reference, using the document itself as the storage medium while its running, ie load the vectors into memory that links to file locations.

Use case:
rewrite the code located at ./oldcode.py and save the new version at ./newcode.py change it to do ....

Originally created by @iplayfast on GitHub (Dec 15, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1551 Thinking of an enhancement. With llava, you could ask what a picture is about and give the file location. I wonder if it would be useful or worthwhile to analyse a document by giving it the file location. Downsides, no rag so info can't be easily stored. Upsides, would be super useful and can use as a reference, using the document itself as the storage medium while its running, ie load the vectors into memory that links to file locations. Use case: rewrite the code located at ./oldcode.py and save the new version at ./newcode.py change it to do ....
GiteaMirror added the feature request label 2026-04-22 02:57:48 -05:00
Author
Owner

@iplayfast commented on GitHub (Dec 15, 2023):

maybe using a /set parameter to insure safefy.
eg
/set parameter outDir "/home/ollama/generatedcode/"
anytime a file is written, the outDir is prepended it the directory.

<!-- gh-comment-id:1858359006 --> @iplayfast commented on GitHub (Dec 15, 2023): maybe using a /set parameter to insure safefy. eg /set parameter outDir "/home/ollama/generatedcode/" anytime a file is written, the outDir is prepended it the directory.
Author
Owner

@technovangelist commented on GitHub (Dec 19, 2023):

Hi, thanks for the issue.

If the file fits in the context of the model, then you can do something like this today:

ollama run llama2 "can you rewrite this fish function more efficiently: $(cat md.fish)"

We won't write to the filesystem, so it would be up to you to redirect output to a file. But usually you should verify before writing.

<!-- gh-comment-id:1862161092 --> @technovangelist commented on GitHub (Dec 19, 2023): Hi, thanks for the issue. If the file fits in the context of the model, then you can do something like this today: ``` ollama run llama2 "can you rewrite this fish function more efficiently: $(cat md.fish)" ``` We won't write to the filesystem, so it would be up to you to redirect output to a file. But usually you should verify before writing.
Author
Owner

@iplayfast commented on GitHub (Dec 19, 2023):

Hi, thanks for this great project. I've never enjoyed AI more!
Yes I've been doing exactly as you've said, and I don't know how this would work using llama.cpp just felt that if you can do it for images, you should be able to do it for text.
and if I specify a file to write to, it should be able to write to the file.

<!-- gh-comment-id:1863470950 --> @iplayfast commented on GitHub (Dec 19, 2023): Hi, thanks for this great project. I've never enjoyed AI more! Yes I've been doing exactly as you've said, and I don't know how this would work using llama.cpp just felt that if you can do it for images, you should be able to do it for text. and if I specify a file to write to, it should be able to write to the file.
Author
Owner

@jmorganca commented on GitHub (May 10, 2024):

Hi @iplayfast, will merge this with #834

<!-- gh-comment-id:2103643873 --> @jmorganca commented on GitHub (May 10, 2024): Hi @iplayfast, will merge this with #834
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#26607