From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrew Hyatt Newsgroups: gmane.emacs.devel Subject: Re: [NonGNU ELPA] New package: llm Date: Sun, 27 Aug 2023 22:32:28 -0400 Message-ID: References: <87v8d0iqa5.fsf@posteo.net> 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 , 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: 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 ) 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 ) 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 ) 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 ) 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: 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." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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: --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 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
On Sun, Aug 27, 2023 at 9:32=E2=80=AFPM R= ichard Stallman <rms@gnu.org> wrot= e:
[[[ To any NSA and FBI agents reading my email: please consid= er=C2=A0 =C2=A0 ]]]
[[[ whether defending the US Constitution against all enemies,=C2=A0 =C2=A0= =C2=A0]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]<= br>
=C2=A0 > > (defun llm--warn-on-nonfree (name tos)
=C2=A0 > >=C2=A0 =C2=A0"Issue a warning if `llm-warn-on-nonfree&= #39; is non-nil.
=C2=A0 > > NAME is the human readable name of the LLM (e.g 'Open = AI').
=C2=A0 > >
=C2=A0 > > TOS is the URL of the terms of service for the LLM.
=C2=A0 > >
=C2=A0 > > All non-free LLMs should call this function on each llm fu= nction
=C2=A0 > > invocation."
=C2=A0 > >=C2=A0 =C2=A0(when llm-warn-on-nonfree
=C2=A0 > >=C2=A0 =C2=A0 =C2=A0(lwarn '(llm nonfree) :warning &quo= t;%s API is not free software, and your
=C2=A0 > > freedom to use it is restricted.
=C2=A0 > > See %s for the details on the restrictions on use." n= ame 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.=C2=A0 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?=C2=A0 In other words, what are the conditions on=
which we should warn the user?=C2=A0 Let's discuss that to make sure we=
get it right.

After following Jim Porte= r's suggestion above, here is the new function, and you can see the adv= ice we're giving in the docstring:

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

If the LLM is free an= d has no restrictions on use, this should
return nil. Since this functio= n already returns nil, there is no
need to override it."
=C2=A0 = (ignore provider)
=C2=A0 nil)

So, "fre= e and no restrictions on use".=C2=A0 I'm happy to link to any reso= urces to help users understand better if you think it is needed.
= =C2=A0

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.=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.
=C2=A0
=C2=A0

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