branch: elpa/gptel
commit 24c35563262cfa6c1d5abfe8f8aff02325f196cd
Author: Karthik Chikmagalur <[email protected]>
Commit: Karthik Chikmagalur <[email protected]>

    gptel-request: Improve gptel-context documentation
    
    * NEWS (New features and UI changes):
    * gptel-request.el (gptel-context):
---
 NEWS             | 13 ++++++++++---
 gptel-request.el |  7 ++++---
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/NEWS b/NEWS
index 5be49f9bb22..691ae260ca4 100644
--- a/NEWS
+++ b/NEWS
@@ -85,9 +85,16 @@
   additional context sources for gptel queries, usually files or
   buffers.  It serves the longstanding requests of enabling buffer-local
   context specification, as well as context specification in gptel
-  presets and programmatic gptel use.  Each entry is a file path or a
-  buffer object, but other kinds of specification are possible.  See its
-  documentation for details.
+  presets and programmatic gptel use.  As always, in a preset definition
+  this corresponds to the key with name of the variable with the
+  "gptel-" prefix stripped:
+  #+begin_src emacs-lisp
+  (gptel-make-preset 'with-docs
+    :context '("./README.md" "./README" "./README.org"))
+  #+end_src
+  Each entry in ~gptel-context~ is a file path or a buffer object, but
+  other kinds of specification are possible.  See its documentation for
+  details.
 
 - ~gptel-mcp-connect~ can now start MCP servers synchronously.  This
   is useful for scripting purposes, when MCP tools need to be
diff --git a/gptel-request.el b/gptel-request.el
index fded267d18e..6590fea518c 100644
--- a/gptel-request.el
+++ b/gptel-request.el
@@ -729,9 +729,10 @@ their MIME-types:
 
   (\"/path/to/image\" :mime \"image/png\")
 
-gptel tries to guess file MIME types, but is not always successful.
-Additional plist keys (besides :mime) are ignored, but support for more
-keys may be implemented in the future.
+gptel tries to guess file MIME types, but is not always successful, so
+it is recommended to provide it with non-text files.  Additional plist
+keys (besides :mime) are ignored, but support for more keys may be
+implemented in the future.
 
 Usage of context commands (such as `gptel-add' and `gptel-add-file')
 will modify this variable.  You can also set this variable

Reply via email to