unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Bruno Barbier <brubar.cs@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Including AI into Emacs
Date: Tue, 10 Dec 2024 11:03:26 +0300	[thread overview]
Message-ID: <Z1f1zn8pBkRGAVn9@lco2> (raw)
In-Reply-To: <675775ac.050a0220.1b7ef7.6fe2@mx.google.com>

[-- Attachment #1: Type: text/plain, Size: 2429 bytes --]

* Bruno Barbier <brubar.cs@gmail.com> [2024-12-10 01:57]:
> The package repository has a nice video that shows this package in
> action.  I think it will answer your questions better than I could
> (I discovered this package recently; I just tried it out of curiosity,
> no real needs).

I have so much real need. It is indispensable, and I can't wait buying
strong GPU to run it locally and fast. It already works locally, just
it is so slow as I don't have GPU. I will upgrade memory, GPU so that
I can run free LLMs locally.

(defun rcd-pie-llm-usage-per-day ()
  "Generate an R PNG image showing LLM usage per day."
  (interactive)
  (rcd-sql-pie-chart "LLM usage per day" 
		     "SELECT extract(day from log_datecreated)::text AS day, 
                             count(log_id) AS count 
                        FROM log 
                    WHERE log_logtypes IN (8, 11, 12, 14)
                      AND log_datecreated > (current_date - 30)
                    GROUP BY day 
                    ORDER BY day ASC"))

The above higher level function uses GNU R Langugage to generate the
attached file `llm-usage-per-day.png'

(defun rcd-llm-usage-by-day ()
  (interactive)
  (cf-chart-bar-quickie "SELECT date_part('day', log_datecreated)::int AS day, 
                                count(log_name) 
                           FROM log 
                          WHERE log_logtypes IN (8, 11, 12, 14)
                       GROUP BY date_part('day', log_datecreated)::int
                       ORDER BY day DESC" 
			"LLM usage by day" 
			"LLM usage by day" 
			"Totals"))

The above higher level function uses Emacs Lisp function
`chart-bar-quickie' to generate the attached file
`LLM-usage-per-day2.png'

I can't agree to asynchronous injection of text, it sounds dangerous
to me. When there is any lag in computer, my text anyway doesn't get
well written due to whatever problems and often my speed writing.

And I am often using temporary buffers for that reason that I do not
disturb my other buffers with whatever changes.

My LLM usage is such that I just do C-u F5 and then text will be added
to the previous text, or I do F5 and text will be inserted, if region
was marked it is used as part of the prompt.

Everything is logged in the database, so I can convert each response
later to other objects.

Basically I get fundamentally same result as gptel with just few functions in background.

-- 
Jean Louis

[-- Attachment #2: LLM-usage-per-day2.png --]
[-- Type: image/png, Size: 30742 bytes --]

[-- Attachment #3: llm-usage-per-day.png --]
[-- Type: image/png, Size: 51068 bytes --]

  reply	other threads:[~2024-12-10  8:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-06 17:19 Including AI into Emacs Jean Louis
2024-12-06 18:16 ` Bruno Barbier
2024-12-06 22:18   ` Jean Louis
2024-12-07  9:32     ` Bruno Barbier
2024-12-07 10:30       ` Jean Louis
2024-12-07 11:29         ` Bruno Barbier
2024-12-09 21:06           ` Jean Louis
2024-12-09 22:56             ` Bruno Barbier
2024-12-10  8:03               ` Jean Louis [this message]
2024-12-10 10:37                 ` Bruno Barbier
2024-12-10 14:27                   ` Jean Louis
2024-12-06 18:22 ` Eli Zaretskii
2024-12-06 19:11 ` Basile Starynkevitch
2024-12-06 21:14   ` Jean Louis
2024-12-06 22:26   ` Jean Louis
2024-12-06 22:59 ` Christopher Howard
2024-12-06 23:21   ` Jean Louis
2024-12-10 10:45   ` Basile Starynkevitch
  -- strict thread matches above, loose matches on Subject: below --
2024-12-06 17:22 Jean Louis
2024-12-06 18:25 ` Eli Zaretskii
2024-12-06 18:32   ` John Yates
2024-12-06 19:06   ` Jean Louis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z1f1zn8pBkRGAVn9@lco2 \
    --to=bugs@gnu.support \
    --cc=brubar.cs@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).