From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Andrew Hyatt <ahyatt@gmail.com>
Newsgroups: gmane.emacs.devel
Subject: Re: [NonGNU ELPA] New package: llm
Date: Sun, 27 Aug 2023 22:32:28 -0400
Message-ID: <CAM6wYYLYrQL9+3cgUELYavUdHQg5m0bqdW89_qJFvk050-sGNQ@mail.gmail.com>
References: <CAM6wYYJHa+tCUKO_SsnT77g-4MUM0x4FrkoCekr=T9-UF1ADDA@mail.gmail.com>
 <E1qTaA2-00038O-UA@fencepost.gnu.org>
 <CAM6wYY+E=z5VqV2xXMbhbpN7vn+-tyzfOGKFAuG0s+croRmEPA@mail.gmail.com>
 <E1qV08g-0001mb-11@fencepost.gnu.org>
 <CAM6wYYLZ26E4rpo2Ae2PyxKSBYQKAXQ6U5_QGMoGx5SQy7AMSA@mail.gmail.com>
 <87v8d0iqa5.fsf@posteo.net> <E1qaR6l-00012I-VP@fencepost.gnu.org>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="000000000000115e8a0603f28209"
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="9582"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: Philip Kaludercic <philipk@posteo.net>, emacs-devel@gnu.org
To: rms@gnu.org
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 28 04:33:47 2023
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>
Envelope-to: ged-emacs-devel@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>)
	id 1qaS4Y-0002Eg-3k
	for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Aug 2023 04:33:46 +0200
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-devel-bounces@gnu.org>)
	id 1qaS3b-0002QY-69; Sun, 27 Aug 2023 22:32:47 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ahyatt@gmail.com>) id 1qaS3Z-0002On-4o
 for emacs-devel@gnu.org; Sun, 27 Aug 2023 22:32:45 -0400
Original-Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <ahyatt@gmail.com>)
 id 1qaS3W-0001RH-BX; Sun, 27 Aug 2023 22:32:44 -0400
Original-Received: by mail-ej1-x631.google.com with SMTP id
 a640c23a62f3a-977e0fbd742so336288666b.2; 
 Sun, 27 Aug 2023 19:32:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1693189960; x=1693794760;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=IfI56YzfcH5xodcxtUU1YPuccOdCiNxNLxPBiW3oJdg=;
 b=QswUWU8AZ5TVeIISXRTB8bRtkgTcuFqvBR/aUKLhm9NiMy1f9Aus+9BN7zlaLbmXfy
 s1Ha0A7P7JOKxD6tuTt8dLHrOhr/A/iTccVYYkwFanMhmIoPdQRR0vwCW7MyYQpaYuC9
 pozytVFNJ+LhMUXeWj2WQk26d+uB9rN81fXqqKLUhQT/MWxWrBQ4cHcLKGOjLqDTKi4q
 uzvlLAKnH0kphMpGlQnvKOsiy/7FSGA80mValIh4LC76F9yc77+vjgmlQ5VtCQdy+qhO
 PXMshc2dxB0aogOX8eVCs5U7Cqy4EAobCV/J7goLHFJc4dncCMOIPGLJnQCI16yEktER
 WA6Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1693189960; x=1693794760;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=IfI56YzfcH5xodcxtUU1YPuccOdCiNxNLxPBiW3oJdg=;
 b=KMGpJ8Y5rKVOrqTNpc+gzVWin9JPwQtmchZQ+UjMWNbVEvDS1KE69wY3yPX/LH5fDx
 Q5IosG8xcF08CdcsknzSr+JJeUqNr21XrRdDKExt+SAoJW7ROAqhdjUoGC7KLky3fjQr
 YB6hIDGLyl7GSvsSjdzhKzgEY+6qGJtxlds5uqZToqPGqHLap099j3aD+G27gTpMcmS0
 RiNrPhVc9fEJFf4M1rnk0b7n/w3be91aABJBOL+alj5GRV4gWdVXXuvnAMyYSzOBVfob
 ZVqd7qbUjfhNJHzsPFc79YMRh0lbdl+l946RFzNnu8Q87i8Rb8lmY9MPG3tsdgxCatff
 6vyA==
X-Gm-Message-State: AOJu0Yw9F/MDpQw2foqrusduWnQqVLQYmDNupWmr3PX3VTH+wtacG/pj
 yP092EqL+K7rqRs1u3naVbn5wBN2TXURsB0I4/kz3RoJYMw=
X-Google-Smtp-Source: AGHT+IGxZ4J1uGGeZ/56uMnXiQvfk8uq4Q0l4UW5vQCqRhxBDf64eYtyS7nf/WiXzxJgFJTPVskgKyqNTSHLRm7JOmQ=
X-Received: by 2002:a17:906:32cf:b0:9a1:e371:e238 with SMTP id
 k15-20020a17090632cf00b009a1e371e238mr9383518ejk.64.1693189959408; Sun, 27
 Aug 2023 19:32:39 -0700 (PDT)
In-Reply-To: <E1qaR6l-00012I-VP@fencepost.gnu.org>
Received-SPF: pass client-ip=2a00:1450:4864:20::631;
 envelope-from=ahyatt@gmail.com; helo=mail-ej1-x631.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-devel>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=subscribe>
Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org
Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org
Xref: news.gmane.io gmane.emacs.devel:309395
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/309395>

--000000000000115e8a0603f28209
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sun, Aug 27, 2023 at 9:32=E2=80=AFPM Richard Stallman <rms@gnu.org> wrot=
e:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > > (defun llm--warn-on-nonfree (name tos)
>   > >   "Issue a warning if `llm-warn-on-nonfree' is non-nil.
>   > > NAME is the human readable name of the LLM (e.g 'Open AI').
>   > >
>   > > TOS is the URL of the terms of service for the LLM.
>   > >
>   > > All non-free LLMs should call this function on each llm function
>   > > invocation."
>   > >   (when llm-warn-on-nonfree
>   > >     (lwarn '(llm nonfree) :warning "%s API is not free software, an=
d
> your
>   > > freedom to use it is restricted.
>   > > See %s for the details on the restrictions on use." name tos)))
>
> I presume that the developers judge whether any given LLM calls for a
> warning, and add a call to this function if it does.  Right?
>
> The basic approach looks right, bit it raises two questions about
> details:
>
> 1. What exactly is the criterion for deciding whether a given LLM
> should call this function?  In other words, what are the conditions on
> which we should warn the user?  Let's discuss that to make sure we
> get it right.
>

After following Jim Porter's suggestion above, here is the new function,
and you can see the advice we're giving in the docstring:

(cl-defgeneric llm-nonfree-message-info (provider)
  "If PROVIDER is non-free, return info for a warning.
This should be a cons of the name of the LLM, and the URL of the
terms of service.

If the LLM is free and has no restrictions on use, this should
return nil. Since this function already returns nil, there is no
need to override it."
  (ignore provider)
  nil)

So, "free and no restrictions on use".  I'm happy to link to any resources
to help users understand better if you think it is needed.


>
> 2. Is it better to include the TSO URL in the warning, or better NOT
> to include it and thus avoid helping bad guys publicize their demands?


I think it's best to include it.  To claim there are restrictions on use,
but not reference those same restrictions strikes me as incomplete, from
the point of view of the user who will be looking at the warning.


>
>

> --
> Dr Richard Stallman (https://stallman.org)
> Chief GNUisance of the GNU Project (https://gnu.org)
> Founder, Free Software Foundation (https://fsf.org)
> Internet Hall-of-Famer (https://internethalloffame.org)
>
>
>

--000000000000115e8a0603f28209
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">On Sun, Aug 27, 2023 at 9:32=E2=80=AFPM R=
ichard Stallman &lt;<a href=3D"mailto:rms@gnu.org">rms@gnu.org</a>&gt; wrot=
e:<br></div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padd=
ing-left:1ex">[[[ To any NSA and FBI agents reading my email: please consid=
er=C2=A0 =C2=A0 ]]]<br>
[[[ whether defending the US Constitution against all enemies,=C2=A0 =C2=A0=
 =C2=A0]]]<br>
[[[ foreign or domestic, requires you to follow Snowden&#39;s example. ]]]<=
br>
<br>
=C2=A0 &gt; &gt; (defun llm--warn-on-nonfree (name tos)<br>
=C2=A0 &gt; &gt;=C2=A0 =C2=A0&quot;Issue a warning if `llm-warn-on-nonfree&=
#39; is non-nil.<br>
=C2=A0 &gt; &gt; NAME is the human readable name of the LLM (e.g &#39;Open =
AI&#39;).<br>
=C2=A0 &gt; &gt;<br>
=C2=A0 &gt; &gt; TOS is the URL of the terms of service for the LLM.<br>
=C2=A0 &gt; &gt;<br>
=C2=A0 &gt; &gt; All non-free LLMs should call this function on each llm fu=
nction<br>
=C2=A0 &gt; &gt; invocation.&quot;<br>
=C2=A0 &gt; &gt;=C2=A0 =C2=A0(when llm-warn-on-nonfree<br>
=C2=A0 &gt; &gt;=C2=A0 =C2=A0 =C2=A0(lwarn &#39;(llm nonfree) :warning &quo=
t;%s API is not free software, and your<br>
=C2=A0 &gt; &gt; freedom to use it is restricted.<br>
=C2=A0 &gt; &gt; See %s for the details on the restrictions on use.&quot; n=
ame tos)))<br>
<br>
I presume that the developers judge whether any given LLM calls for a<br>
warning, and add a call to this function if it does.=C2=A0 Right?<br>
<br>
The basic approach looks right, bit it raises two questions about<br>
details:<br>
<br>
1. What exactly is the criterion for deciding whether a given LLM<br>
should call this function?=C2=A0 In other words, what are the conditions on=
<br>
which we should warn the user?=C2=A0 Let&#39;s discuss that to make sure we=
<br>
get it right.<br></blockquote><div><br></div><div>After following Jim Porte=
r&#39;s suggestion above, here is the new function, and you can see the adv=
ice we&#39;re giving in the docstring:</div><div><br></div><div>(cl-defgene=
ric llm-nonfree-message-info (provider)<br>=C2=A0 &quot;If PROVIDER is non-=
free, return info for a warning.<br>This should be a cons of the name of th=
e LLM, and the URL of the<br>terms of service.<br><br>If the LLM is free an=
d has no restrictions on use, this should<br>return nil. Since this functio=
n already returns nil, there is no<br>need to override it.&quot;<br>=C2=A0 =
(ignore provider)<br>=C2=A0 nil)<br></div><div><br></div><div>So, &quot;fre=
e and no restrictions on use&quot;.=C2=A0 I&#39;m happy to link to any reso=
urces to help users understand better if you think it is needed.</div><div>=
=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
2. Is it better to include the TSO URL in the warning, or better NOT<br>
to include it and thus avoid helping bad guys publicize their demands?</blo=
ckquote><div><br></div><div>I think it&#39;s best to include it.=C2=A0 To c=
laim there are restrictions on use, but not reference those same restrictio=
ns strikes me as incomplete,=C2=A0from the point of view of the user who wi=
ll be looking at the warning.</div><div>=C2=A0<br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex">=C2=A0<br></blockquote><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex">
<br>
-- <br>
Dr Richard Stallman (<a href=3D"https://stallman.org" rel=3D"noreferrer" ta=
rget=3D"_blank">https://stallman.org</a>)<br>
Chief GNUisance of the GNU Project (<a href=3D"https://gnu.org" rel=3D"nore=
ferrer" target=3D"_blank">https://gnu.org</a>)<br>
Founder, Free Software Foundation (<a href=3D"https://fsf.org" rel=3D"noref=
errer" target=3D"_blank">https://fsf.org</a>)<br>
Internet Hall-of-Famer (<a href=3D"https://internethalloffame.org" rel=3D"n=
oreferrer" target=3D"_blank">https://internethalloffame.org</a>)<br>
<br>
<br>
</blockquote></div></div>

--000000000000115e8a0603f28209--