-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
WIP Add Vision capabilities via gpt 4o #123
base: master
Are you sure you want to change the base?
WIP Add Vision capabilities via gpt 4o #123
Conversation
Nice work! What do you think about using (interactive (list
(read-file-name "Image file path: " nil nil nil (or (thing-at-point 'existing-filename)
(thing-at-point 'url)))
(read-string "Question: " nil 'minibuffer-history))) when querying the user? This would prefill the input when having the cursor over a filename or link. |
Makes sense, thanks for the suggestion! The only lisp I've ever written is for my own literate config 😬
|
b147beb
to
a6319fd
Compare
665d6aa
to
a9149c5
Compare
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.
self review
(while (string-empty-p input) | ||
(setq input | ||
(read-string (if default | ||
(format "Enter image URL or file path (default %s): " default) |
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.
consider adding "URL must start with http?s://
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.
feels bulky to add more text, and people probably already know that urls must start with http[s]:// in emacs right?
(const :tag "gpt-4o" "gpt-4o") | ||
(const :tag "gpt-4-turbo" "gpt-4-turbo"))) | ||
|
||
(defcustom org-ai-query-image-file nil |
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.
@rksm you probably recognize this from org-ai-on-region-file, just calling attention in case you want me to do this in a different way
To test, do
M-x org-ai-query-image-and-display
and follow prompts.related to #122