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

Analyse this document. #1551

Closed
iplayfast opened this issue Dec 15, 2023 · 4 comments
Closed

Analyse this document. #1551

iplayfast opened this issue Dec 15, 2023 · 4 comments
Labels
feature request New feature or request

Comments

@iplayfast
Copy link

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 ....

@iplayfast
Copy link
Author

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.

@technovangelist
Copy link
Contributor

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.

@iplayfast
Copy link
Author

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.

@technovangelist technovangelist added the feature request New feature or request label Jan 3, 2024
@jmorganca
Copy link
Member

Hi @iplayfast, will merge this with #834

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants