From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bruno Barbier Newsgroups: gmane.emacs.help Subject: Re: Including AI into Emacs Date: Sat, 07 Dec 2024 12:29:17 +0100 Message-ID: <6754318e.df0a0220.314e38.6466@mx.google.com> References: <61ffb7417fcfe6fc0c1291aa53d1398b.support1@rcdrun.com> <67533f62.5d0a0220.74bfb.65e6@mx.google.com> <67541628.050a0220.1c50f6.91ff@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34186"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 07 12:30:02 2024 Return-path: Envelope-to: geh-help-gnu-emacs@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 1tJt0c-0008jB-AC for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 07 Dec 2024 12:30:02 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJt00-00022q-Vv; Sat, 07 Dec 2024 06:29:25 -0500 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 1tJszz-00022c-NR for help-gnu-emacs@gnu.org; Sat, 07 Dec 2024 06:29:23 -0500 Original-Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tJszy-0002NZ-3S for help-gnu-emacs@gnu.org; Sat, 07 Dec 2024 06:29:23 -0500 Original-Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-434aa222d96so31966285e9.0 for ; Sat, 07 Dec 2024 03:29:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733570960; x=1734175760; darn=gnu.org; h=mime-version:date:references:in-reply-to:subject:cc:to:from :message-id:from:to:cc:subject:date:message-id:reply-to; bh=gzh/JFIPI5Tv2NUu8gSoAuV3O8KKh+OuIzDsbgtBAmY=; b=H9jslnX08JqY5r0kGNhbb9oZzNfJ+9oIY7+wiOI5aNKooeiai/N5/0GoUQYjRQWF1X LFmhYrQl87ZzR6dXhRSVqWSM70++xg7O1NeZE8d1t/2/pZ93josUDvEYGhRV0nmUmD8T 9A6yo2Ozdk7KdN6+LKdqqm/GkrrLXrQAyD0+aaxwtIGcHLLZZxiXVCd9K7vAKMdm3jrG 34duBTnuDuU48V+dmQy1Sy8UwXeiNfxUXV5HsOzuCONQdBt5EtrAWElxYtOcPZgUkkQI Saz2inKDbB2Y2RtF/MbAo0LgT1qmWGv996K22+YcxBsLheOSgNd+LcemxZCT0FfXzNBy g6Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733570960; x=1734175760; h=mime-version:date:references:in-reply-to:subject:cc:to:from :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gzh/JFIPI5Tv2NUu8gSoAuV3O8KKh+OuIzDsbgtBAmY=; b=JlF6aIPqU4j1OXPYLBK2R8uccCC2Uxmm6UOFvZNH5KhnLPnW/zuQfGVbKzEpvdh5eS RJFMibS9prKd8KgTAl6S0XsBdzmsorP8oIy29byHj42BYokLqG+5rsxcvpBWuUnz/9dl QoFDjdxH120Cx7gDBviSCC/PbkMjEUg1Ex5VIXRA0Hl19K8K5vZndZx0xJzfms6HsuAr r4z37fQCr1Anq5vtd76O+njZzBMvUX8d0LBIpjAMMTdp6tprCmPbFr78lMf1ORESDWiN 25UAHcGxqWEH018XWPzkizZYys5yN/UqbfZwqgl0enyIdA/NgrOen+/EOt0QJHTmBmZc yw1g== X-Gm-Message-State: AOJu0Yz5X98wVL0vmgNLIj10kcg7XUmVZqlrEOpwRuKvPmrsqUUJlRs2 YDXNCtGYya5yMUYoK98G8ECTw1Kn1/NSD91XULm83TUnk1Plx+DG X-Gm-Gg: ASbGncsAhMh5DTWi2MHhdabUwH+CtBq66buS3dB3IeNdsJJDUodS2CRPLOUYINt/u+T bCJgV3ca4aET9hltFxtBaAA0cqk5N5w0seEXRUO19WdU+QRYMFmDTpumdtO9Taidatr5K1/9Mnc 6frQ4l+R6891A6JTIBHnE2XkPR+7W1uWcVJdxOVom5AhZynHeYatw7nwu2KMTQCau5S9yIUnoXB NxATS6dkpLVeHDh8svKRkdgO4ZLL8esOoz4PP3JhM9N3X92 X-Google-Smtp-Source: AGHT+IFDUvyJBSeIBzILQHBlPxY6k4pW4wo52EeFrgwSdJ1NmLHk6jnNx7IUHt/9T1tAaIFqCTZItw== X-Received: by 2002:a05:600c:46d1:b0:431:5c7b:e939 with SMTP id 5b1f17b1804b1-434ddebb016mr61307155e9.18.1733570959880; Sat, 07 Dec 2024 03:29:19 -0800 (PST) Original-Received: from localhost ([2a01:e0a:505:3460:1c18:688d:ece4:372e]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3861f59ceb6sm7131305f8f.42.2024.12.07.03.29.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Dec 2024 03:29:18 -0800 (PST) Original-Received: by localhost (sSMTP sendmail emulation); Sat, 07 Dec 2024 12:29:17 +0100 In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=brubar.cs@gmail.com; helo=mail-wm1-x332.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, MSGID_FROM_MTA_HEADER=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: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148650 Archived-At: Jean Louis writes: > * Bruno Barbier [2024-12-07 12:32]: >> > I was using in invalidated manner the emacs-chatgpt but in general I >> > can do myself Curl and http requests. My usage is totally specific, I >> > have memories, various memories that I select from Dynamic Knowledge >> > Repository, then I can replace region with the information, or add new >> > information into buffer. >> > >> > I could not try gptel, it doesn't work. But will try in future. > > I found out why, tried it out and it works. But programming, inside, > is for me too difficult as I am not used to that type of > programming. I am used for functions which always return something, > but gptel is more than that. Actually I just see too many > complications for my uses. > > I need to be able to get result without complications. Synchronous > request is fine and better, rather than asynchronous, where it is > vague what is going to happen with the buffer information. gptel works asynchronously indeed (which IMHO is a good thing), but I understand that it might not fit in your workflow. > ... > and 3-4 functions replace all of the catch-all functions in gptel > > I have tried understanding gptel code, but I don't. And it doesn't look like I should be going into it. > > Yes, it works, but I do not know how to get clear, easy to capture > response, to be returned for easy database logging. > > Another issue, I don't see why I need too many files, whole package with many models, not needed. > > Like for llamafile, I can easily change the model and same function > can work, as above. IIUC, all you would need is to use the documented API ('gptel-request') and use its callback. But, if you don't need integration with org, conversations, multiple backends, etc. , or just for fun, it makes sense to roll your own solution. I just wanted to mention gptel in case you weren't aware of it. Best regards, Bruno