From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.devel Subject: Re: [NonGNU ELPA] New package: llm Date: Sun, 27 Aug 2023 19:59:15 -0700 Message-ID: References: <87v8d0iqa5.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11823"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philip Kaludercic , emacs-devel@gnu.org To: Andrew Hyatt , rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 28 05:00:02 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 1qaSTw-0002pw-RK for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Aug 2023 05:00:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaSTL-0006qr-7D; Sun, 27 Aug 2023 22:59:23 -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 1qaSTJ-0006qi-5h for emacs-devel@gnu.org; Sun, 27 Aug 2023 22:59:21 -0400 Original-Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qaSTG-00061R-P7; Sun, 27 Aug 2023 22:59:20 -0400 Original-Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1bc3d94d40fso21119235ad.3; Sun, 27 Aug 2023 19:59:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693191557; x=1693796357; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=9LmBhx8RFfMZLybPHFc60ZYGoI59vDDn+1KtxRJK9oY=; b=nSjGa0oQnJLcrOF0ywYBp9X/CWWv0ORxmkK9+uPKj5GzeAJ9fBZJZzJYtMIigaGKAh 6LL0pdy+RuIl6AQdHiKKy0HUsOFbpfUgfnqZtZ5Tg22+Zuvjn6nEo/d/OsIbcptUaP/S A+nuy6Rf9S/aHcYddcO8lY8QC5TJO6E3HMm02jYFZJA8H70vP4qmjpUl+EFrCVIAOjo6 2sqtkZLZqcrHdwJ2I1cxuBrE0Dm2EZQ5Jx11nKodyUTdI6ZZfGa9Qm+PNXqnjdIfwgJ4 e7U5wdvZ/7eBos4aH0ib0iMnoAbx/BNS3Oh0Tdb16elZKVBwYOgTvZOrtDNtw4groiJ/ 9M9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693191557; x=1693796357; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9LmBhx8RFfMZLybPHFc60ZYGoI59vDDn+1KtxRJK9oY=; b=bUsmKoTvrhCJ3WQHE37LEYT/ZX0sOMrSpA/cuvbKubrXt4rEkeQVPGerFm07Lb4hfe r/Lh7qtvKrEAvuuB8pJwHpvanD07ebv7R9XkJWW6MVFEKkHIcYAf2aIbppvvs9/REW8D oU8WJ7EF/krjV2q8T5+duX8uN1TPj644omgMUCiHmV0azpIYsDiSVahCL6RODUO2fmCP 0cqXVFTN1q9vA3khcUPxJLg+khn+GsE2R0Lbi7X/utLHZnEMaxck89KaR9A/8N4GKHoU WplS0Bt9a81ug6NKJarwjhSCdZCzNBy/TtXYNjNCuPirNTKepdlogAG/VIttHePt/dRj kI1A== X-Gm-Message-State: AOJu0YxQg76teDFbuHdZ15YWW1581+eW9wmP4NYIfoYEZpr2vtejhcxa mugLRu6iAHb2mQXeFIgFXv0W5OppmgQ= X-Google-Smtp-Source: AGHT+IFbouoNU6RI5ZmIeyNyP+pdgbp9MtvAf27uOueJgGQxgAPCwcKoIV6MWcbPrZ3idD6kK6XIwQ== X-Received: by 2002:a17:90b:19c3:b0:268:14d7:bc34 with SMTP id nm3-20020a17090b19c300b0026814d7bc34mr22565128pjb.20.1693191556878; Sun, 27 Aug 2023 19:59:16 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id i17-20020a17090acf9100b00264044cca0fsm20416432pju.1.2023.08.27.19.59.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Aug 2023 19:59:16 -0700 (PDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=jporterbugs@gmail.com; helo=mail-pl1-x634.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, 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:309397 Archived-At: On 8/27/2023 7:32 PM, Andrew Hyatt wrote: > 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) For what it's worth, I was thinking about having the default be the opposite: warn users by default, since we don't really know if an LLM provider is free unless the Elisp code indicates it. (Otherwise, it could simply mean the author of that provider forgot to override 'llm-nonfree-message-info'.) In other words, assume the worst by default. :) That said, if everyone else thinks this isn't an issue, I won't stamp my feet about it. As for the docstring, I see that many models use ordinary software licenses, such as the Apache license. That could make it easier for us to define the criteria for a libre provider: is the model used by the provider available under a license the FSF considers a free software license?[1] (For LLM providers that you use by making a web request, we could also expect that all the code for their web API is libre too. However, that code is comparatively uninteresting, and so long as you could get the model to use on a self-hosted system[2], I don't see a need to warn the user.) (Also, if you prefer to avoid having to say '(ignore provider)', you can also prefix 'provider' with an underscore. That'll make the byte compiler happy.) [1] https://www.gnu.org/licenses/license-list.en.html [2] At least, in theory. A user might not have enough computing power to use the model in practice, but I don't think that matters for this case.