From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 22 07:11:40 2024 Received: (at submit) by debbugs.gnu.org; 22 Dec 2024 12:11:40 +0000 Received: from localhost ([127.0.0.1]:49274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPKo7-0000XL-PR for submit@debbugs.gnu.org; Sun, 22 Dec 2024 07:11:40 -0500 Received: from lists.gnu.org ([209.51.188.17]:58060) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPKo4-0000X9-Ru for submit@debbugs.gnu.org; Sun, 22 Dec 2024 07:11:38 -0500 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 1tPKo2-00071i-CM for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2024 07:11:34 -0500 Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPKnw-0000Ku-IC for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2024 07:11:31 -0500 Received: from localhost ([::ffff:102.86.7.157]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000007DC23.00000000676801ED.00107D66; Sun, 22 Dec 2024 05:11:24 -0700 From: Jean Louis To: bug-gnu-emacs@gnu.org Subject: 31.0.50; Warning: Unused lexical variable =?utf-8?B?4oCYbWF4LXRv?= =?utf-8?B?a2Vuc+KAmQ==?= -- while used in function X-Debbugs-Cc: Date: Sun, 22 Dec 2024 15:10:54 +0300 Message-ID: <87a5cn2a0h.fsf@lco2.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) (defun rcd-llm-db (prompt &optional memory rcd-llm-model temperature max-to= kens top-p stream) "Send PROMPT to API as decided by the database. Optional MEMORY, RCD-LLM-MODEL, TEMPERATURE, MAX-TOKENS, TOP-P, and STREAM = can be used." (let ((rcd-llm-model-id (rcd-db-users-defaults "llmmodels"))) (cond ((not rcd-llm-model-id) (rcd-warning-message "Did not find defaul= t user's LLM model. Do `M-x rcd-my-defaults' to set it.")) (t (let* ((rcd-llm-model (rcd-db-get-entry "llmmodels" "llmmodels_name" = rcd-llm-model-id rcd-db)) (temperature (or temperature (rcd-db-get-entry "llmmodels" "llmmodels= _temperature" rcd-llm-model-id rcd-db))) (max-tokens (or max-tokens (rcd-db-get-entry "llmmodels" "llmmodels_m= axtokens" rcd-llm-model-id rcd-db))) (top-p (or top-p (rcd-db-get-entry "llmmodels" "llmmodels_topp" rcd-l= lm-model-id rcd-db))) (llm-endpoint-id (rcd-db-get-entry "llmmodels" "llmmodels_llmendpoint= s" rcd-llm-model-id rcd-db)) (llm-endpoint (rcd-db-get-entry "llmendpoints" "llmendpoints_name" ll= m-endpoint-id rcd-db)) (llm-provider-id (rcd-db-get-entry "llmendpoints" "llmendpoints_llmpr= oviders" llm-endpoint-id rcd-db)) (api-key (rcd-db-get-entry "llmproviders" "llmproviders_apikey" llm-p= rovider-id rcd-db)) (authorization (concat "Bearer " api-key)) (stream (if stream t :json-false)) (url-request-method "POST") (url-request-extra-headers `(("Content-Type" . "application/json") ("Authorization" . ,authorization))) (url-request-data (encode-coding-string (setq rcd-llm-last-json (json-encode `((model . ,rcd-llm-model) (messages . [((role . "user") (content . ,prompt))]) (temperature . ,temperature) (max_tokens . ,max-tokens) (top_p . ,top-p) (stream . ,stream)))) 'utf-8)) (buffer (url-retrieve-synchronously llm-endpoint))) (rcd-llm-response buffer)))))) in that above function I am using ,max-tokens, but with interpolation. Though, byte compiler gives warning: Unused lexical variable =E2=80=98max-tokens=E2=80=99 -- while used in funct= ion In GNU Emacs 31.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.16.0) of 2024-12-05 built on lco2 Repository revision: 25b4bf7fcd75564f23b2e60e29e8ff7354186371 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101007 System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --with-mailutils --with-native-compilation=3Dyes --with-tree-sitter --with-imagemagick' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ IMAGEMAGICK JPEG LCMS2 LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=3Dibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 49957 10576) (symbols 48 5434 0) (strings 32 14149 1196) (string-bytes 1 395119) (vectors 16 9194) (vector-slots 8 130226 9961) (floats 8 22 2) (intervals 56 244 8) (buffers 992 11)) --=20 Jean Louis From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 22 12:02:37 2024 Received: (at 75023) by debbugs.gnu.org; 22 Dec 2024 17:02:38 +0000 Received: from localhost ([127.0.0.1]:51670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPPLh-0006Z0-H2 for submit@debbugs.gnu.org; Sun, 22 Dec 2024 12:02:37 -0500 Received: from mail-ed1-f42.google.com ([209.85.208.42]:55490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPPLe-0006Yj-6N for 75023@debbugs.gnu.org; Sun, 22 Dec 2024 12:02:36 -0500 Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5d437235769so5904123a12.2 for <75023@debbugs.gnu.org>; Sun, 22 Dec 2024 09:02:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734886893; x=1735491693; darn=debbugs.gnu.org; h=content-transfer-encoding:to:subject:message-id:date:mime-version :references:in-reply-to:from:from:to:cc:subject:date:message-id :reply-to; bh=3CoON/QhMPaYf4NcmiMkXcVqFbhCerrzwYKRALAuwuk=; b=N4L8PPIPJkFhDugY4LzCTnY9q+5DNfDBXmRVNDz+3yTYt5Nh6LDSW6QgppSmLosDR6 I/8CJl5725mYI4MszTu7QU3r+hXnxpgii+JX8d6r7yf+IH0mC55SqluvKrAnI9RwtHhp sP+6BAg5zF6GHjLXKmro+WxYrNmb8WTSCP/CUSFgIilyLCnlzbYGgJjoFS/+YYwTncV7 +POivX/fR+hgnKjTc6oOPcNsDGCbif33augJ4fnRaNm7n6Ka3gmSMbi26WeQzlvKNEzL vhwsQwIF0H+eV+0KD7hl61mULuBwla57lrWtQihJ9gfb1MCoTUFDikqg7BJ3+DBX1bqF FSHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734886893; x=1735491693; h=content-transfer-encoding:to:subject:message-id:date:mime-version :references:in-reply-to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=3CoON/QhMPaYf4NcmiMkXcVqFbhCerrzwYKRALAuwuk=; b=Y14nB/lib+8w7mdVC2ih9oUphrZvYS7THYS55Ihcl4vJshrYVRzQ+GDnSTZU24N23G KV7wmRo9faJRNL05gtIjs8BANM4UwL4PcxbeyCgNbST6n7328oR5Nf5uZZpvxjx8XQ66 NCYDgqECdtrRDHTYJlZ9fBml4UTMPdTcFVIeoPdPjNFys8LEAmjrH0hWcz3wQaHezCN2 aL4JI2txY4Nmv2/l5A7EtBLEBknk7fzE15U0M0mkO/gUYkwfUP6p2ugt5zkuhij2wXbR np5fQaEEy76WzI3n0ruApuB7LxZIqP/UVpsf1VUF+wDK/8gBXMdLwdgv7rcSXHHKP4nz 8gTA== X-Forwarded-Encrypted: i=1; AJvYcCVXirMP92FKNxt6j+Ca19844Bg+R2VUfiTYIdA6R96t0TTiK1NBjI86dgcPwmhV4w1yqrzA7A==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yy8GBBE9DNjeYIw3fPjR0u3Po/eB80KUIpOebgx8eJPQBFIClby eknRft+v8PrBAZiPzl3dQwVg+FH5XAxP3tWHblJ3tPbdYcn6hTd3YfLoVwOChVUdGZfZ62Vb+Ao t4dkzsj6OkZqcTFPKIHZEPW+E1kc= X-Gm-Gg: ASbGncvaPJ1zx9N3rmPWEPLijR2wpjepVoqocGCn+IB9jp5snuH+ot8H3olLKuIqFzr 2GyF9m/hXCnZ6KspgId0FOQBgshk37CWlU424wWCl X-Google-Smtp-Source: AGHT+IGhzF7M+bnzWD/m9swScYdm5OtqvBL0ByKw6Ns1hVddP5mb732Vsh5jmnJqWLxUIF3ZitZqxTDVpB32qPJuaXo= X-Received: by 2002:a05:6402:5256:b0:5d0:bdc1:75df with SMTP id 4fb4d7f45d1cf-5d81ddf7fa6mr8534973a12.24.1734886892944; Sun, 22 Dec 2024 09:01:32 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 22 Dec 2024 17:01:32 +0000 From: Stefan Kangas In-Reply-To: <87a5cn2a0h.fsf@lco2.mail-host-address-is-not-set> References: <87a5cn2a0h.fsf@lco2.mail-host-address-is-not-set> MIME-Version: 1.0 Date: Sun, 22 Dec 2024 17:01:32 +0000 Message-ID: Subject: =?UTF-8?Q?Re=3A_bug=2375023=3A_31=2E0=2E50=3B_Warning=3A_Unused_lexical_vari?= =?UTF-8?Q?able_=E2=80=98max=2Dtokens=E2=80=99_=2D=2D_while_used_in_function?= To: Jean Louis , 75023@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75023 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 75023 + moreinfo thanks Jean Louis writes: > (defun rcd-llm-db (prompt &optional memory rcd-llm-model temperature max-= tokens top-p stream) > "Send PROMPT to API as decided by the database. > > Optional MEMORY, RCD-LLM-MODEL, TEMPERATURE, MAX-TOKENS, TOP-P, and STREA= M can be used." > (let ((rcd-llm-model-id (rcd-db-users-defaults "llmmodels"))) > (cond ((not rcd-llm-model-id) (rcd-warning-message "Did not find defa= ult user's LLM model. Do `M-x rcd-my-defaults' to set it.")) > (t (let* ((rcd-llm-model (rcd-db-get-entry "llmmodels" "llmmodels_name= " rcd-llm-model-id rcd-db)) > (temperature (or temperature (rcd-db-get-entry "llmmodels" "llmmode= ls_temperature" rcd-llm-model-id rcd-db))) > (max-tokens (or max-tokens (rcd-db-get-entry "llmmodels" "llmmodels= _maxtokens" rcd-llm-model-id rcd-db))) > (top-p (or top-p (rcd-db-get-entry "llmmodels" "llmmodels_topp" rcd= -llm-model-id rcd-db))) > (llm-endpoint-id (rcd-db-get-entry "llmmodels" "llmmodels_llmendpoi= nts" rcd-llm-model-id rcd-db)) > (llm-endpoint (rcd-db-get-entry "llmendpoints" "llmendpoints_name" = llm-endpoint-id rcd-db)) > (llm-provider-id (rcd-db-get-entry "llmendpoints" "llmendpoints_llm= providers" llm-endpoint-id rcd-db)) > (api-key (rcd-db-get-entry "llmproviders" "llmproviders_apikey" llm= -provider-id rcd-db)) > (authorization (concat "Bearer " api-key)) > (stream (if stream t :json-false)) > (url-request-method "POST") > (url-request-extra-headers > `(("Content-Type" . "application/json") > ("Authorization" . ,authorization))) > (url-request-data > (encode-coding-string > (setq rcd-llm-last-json > (json-encode > `((model . ,rcd-llm-model) > (messages . [((role . "user") (content . ,prompt))]) > (temperature . ,temperature) > (max_tokens . ,max-tokens) > (top_p . ,top-p) > (stream . ,stream)))) > 'utf-8)) > (buffer (url-retrieve-synchronously llm-endpoint))) > (rcd-llm-response buffer)))))) > > > in that above function I am using ,max-tokens, but with interpolation. > > Though, byte compiler gives warning: > > Unused lexical variable =E2=80=98max-tokens=E2=80=99 -- while used in fun= ction Could you please send a smaller example that reproduces the bug? From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 22 19:57:53 2024 Received: (at 75023) by debbugs.gnu.org; 23 Dec 2024 00:57:54 +0000 Received: from localhost ([127.0.0.1]:52542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPWld-0003bQ-Fv for submit@debbugs.gnu.org; Sun, 22 Dec 2024 19:57:53 -0500 Received: from mout02.posteo.de ([185.67.36.66]:57753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPWlX-0003an-Il for 75023@debbugs.gnu.org; Sun, 22 Dec 2024 19:57:51 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 95C94240101 for <75023@debbugs.gnu.org>; Mon, 23 Dec 2024 01:57:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1734915460; bh=GvfOBqy6DlWWtHV86e9jEuq1Mx4BedqS5Lz73sAPPAU=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type: Content-Transfer-Encoding:From; b=UjUzBxRBKrGf4RDs5PsyFUicfLbij4eBu9aropdX4pfTCjvxzgJYGFLHvITCc/r26 TdfMbEEcQX6Rr/tzLk3+EzeyBi/XRRKc8KCkQ6rKZjlLWMehpdoAv8NVieG4oOQaSB FN7Nu/y26lhIGuSNhVcYxBxlOM0iinck4k1KsqZmFvj5YOlkrkjY8V35rG/Kdac0Oy 9oDWXD3kw0HLbJg2GiLIf5V3EmF/5bHp6Hr7h4TrnpPoCjgByUNJ0O2EiENxO8G3DD lnQEHGzlEYFUdSzDEVt3Lv37ASka3wCCmAH8MjD37AIK3mqHKcSU7jWdV1BeGcpsXp UriSsxv52BEpA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YGfkq1xfhz9rxF; Mon, 23 Dec 2024 01:57:39 +0100 (CET) Message-ID: <53f050a3-9050-4388-9f12-42ab02af82cc@posteo.net> Date: Mon, 23 Dec 2024 00:57:37 +0000 MIME-Version: 1.0 Subject: =?UTF-8?Q?Re=3A_bug=2375023=3A_31=2E0=2E50=3B_Warning=3A_Unused_lex?= =?UTF-8?Q?ical_variable_=E2=80=98max-tokens=E2=80=99_--_while_used_in_funct?= =?UTF-8?Q?ion?= To: Jean Louis , 75023@debbugs.gnu.org References: <87a5cn2a0h.fsf@lco2.mail-host-address-is-not-set> Content-Language: en-US From: Charalampos Mitrodimas In-Reply-To: <87a5cn2a0h.fsf@lco2.mail-host-address-is-not-set> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75023 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Jean, On 22/12/24 2:10 PM, Jean Louis wrote: > (defun rcd-llm-db (prompt &optional memory rcd-llm-model temperature max-tokens top-p stream) > "Send PROMPT to API as decided by the database. > > Optional MEMORY, RCD-LLM-MODEL, TEMPERATURE, MAX-TOKENS, TOP-P, and STREAM can be used." > (let ((rcd-llm-model-id (rcd-db-users-defaults "llmmodels"))) > (cond ((not rcd-llm-model-id) (rcd-warning-message "Did not find default user's LLM model. Do `M-x rcd-my-defaults' to set it.")) > (t (let* ((rcd-llm-model (rcd-db-get-entry "llmmodels" "llmmodels_name" rcd-llm-model-id rcd-db)) > (temperature (or temperature (rcd-db-get-entry "llmmodels" "llmmodels_temperature" rcd-llm-model-id rcd-db))) > (max-tokens (or max-tokens (rcd-db-get-entry "llmmodels" "llmmodels_maxtokens" rcd-llm-model-id rcd-db))) > (top-p (or top-p (rcd-db-get-entry "llmmodels" "llmmodels_topp" rcd-llm-model-id rcd-db))) > (llm-endpoint-id (rcd-db-get-entry "llmmodels" "llmmodels_llmendpoints" rcd-llm-model-id rcd-db)) > (llm-endpoint (rcd-db-get-entry "llmendpoints" "llmendpoints_name" llm-endpoint-id rcd-db)) > (llm-provider-id (rcd-db-get-entry "llmendpoints" "llmendpoints_llmproviders" llm-endpoint-id rcd-db)) > (api-key (rcd-db-get-entry "llmproviders" "llmproviders_apikey" llm-provider-id rcd-db)) > (authorization (concat "Bearer " api-key)) > (stream (if stream t :json-false)) > (url-request-method "POST") > (url-request-extra-headers > `(("Content-Type" . "application/json") > ("Authorization" . ,authorization))) > (url-request-data > (encode-coding-string > (setq rcd-llm-last-json > (json-encode > `((model . ,rcd-llm-model) > (messages . [((role . "user") (content . ,prompt))]) > (temperature . ,temperature) > (max_tokens . ,max-tokens) > (top_p . ,top-p) > (stream . ,stream)))) > 'utf-8)) > (buffer (url-retrieve-synchronously llm-endpoint))) > (rcd-llm-response buffer)))))) > > > in that above function I am using ,max-tokens, but with interpolation. > > Though, byte compiler gives warning: > > Unused lexical variable ‘max-tokens’ -- while used in function I tried to reproduce this but got these instead, In rcd-llm-db: test.el:3:2: Warning: docstring wider than 80 characters test.el:9:100: Warning: reference to free variable ‘rcd-db’ test.el:25:29: Warning: assignment to free variable ‘rcd-llm-last-json’ In end of data: test.el:35:17: Warning: the function ‘rcd-llm-response’ is not known to be     defined. test.el:9:37: Warning: the function ‘rcd-db-get-entry’ is not known to be     defined. test.el:8:36: Warning: the function ‘rcd-warning-message’ is not known to be     defined. test.el:7:28: Warning: the function ‘rcd-db-users-defaults’ is not known to be     defined. I agree that a smaller example to reproduce this would be better. -- C. Mitrodimas From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 23 00:38:22 2024 Received: (at control) by debbugs.gnu.org; 23 Dec 2024 05:38:22 +0000 Received: from localhost ([127.0.0.1]:52920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPb94-000837-4y for submit@debbugs.gnu.org; Mon, 23 Dec 2024 00:38:22 -0500 Received: from mail-ed1-f53.google.com ([209.85.208.53]:60510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPb91-00082y-Tc for control@debbugs.gnu.org; Mon, 23 Dec 2024 00:38:20 -0500 Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-5d3ecae02beso4561142a12.0 for ; Sun, 22 Dec 2024 21:38:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734932239; x=1735537039; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=HM9vdMcfvB/wyuyPKebPNmDJQH7uCTaMH+E/ehO/Lhw=; b=Qm3rcduqqRzPNvMtdcxncx01w4nVD3eQbhF+BWjg/Dn9vgQ0WxqZaH2IDynfrxNWfd DpOC2FPP44QgkUrrxpt2u93e0Vxg6d8wafHxKTNV5/rOADY/bNofkTHDe+6r9tl0LYaJ aif1tdsHaQGiQ6lJWtF0XKh8xm38uCQK4HIfSZpcdS3KbPupdXzxy1cEyU7q38NqK5Z+ Rsn3bKvgGlQtZLvd5Zc3XumuaCP5UZMKMlr50uPvg+844RYyn7wLqbo+8ZmKrz7pOwCH t0j9zbahM0uDO8IbSWRx430RBU478dkIvGE4ds7QhRUtM2PDWwowWKDY/OxNvTc8TvM1 txcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734932239; x=1735537039; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=HM9vdMcfvB/wyuyPKebPNmDJQH7uCTaMH+E/ehO/Lhw=; b=r7RYMe9jK75HIkNAmXXrfpBd/Zqv+bJhNLI+KDn8T7pExav9qodvJWE1jtrZsD4djE mskP2NP9LL08JbGa9HkiiPaS8Ibu7fLJwZmHIj+PB6cD4DOt2QsHJ1yF5CRxizUaSplv P4IoNhz5Ta9h8QaEMkltCJwja5jpGyzV1w7VpIYu/0IPrhAi9KaMqtb5ZY42qN+W8cVX 0o802CqjMOZRP21XmMtHYRTk5kijN/werHhSDBwSkbCnH2g0W2XoyHkkLb6icZNJyoNQ DW46UDaw7G+0ERgX7u+ewBRqkFjsKS+CrviTxs8QXuHXT6UEX1VAUstHsUYmmJt5nXlL n6GA== X-Gm-Message-State: AOJu0YxWGk2kuWkEfkuL2YlPXPKQiLbX6MKYGocYnWNCGzxZqQXCN4CP qTAiUnrNdPZDldAmbRg3sp/fjbWfbNwSWvxxhAw/d5Bzvxf/eF2GiYjCbdtHU6CXwEE3P9OhmS+ cq5XhnYlD2XqTi80M0kw+b1N0IIwlR/mU X-Gm-Gg: ASbGncvYhSfqCfjBLrBhZuRw+FGXzkmuPZf567qQGzFlEFbhof7tyJ/+pC8hc4eJNiM waw01Nai4v2t8CbEotQ+1fk+LM2SX0P6Y/vJQpVd1 X-Google-Smtp-Source: AGHT+IEHkfxWBdX2V0FhBK+k+dX1d1/5zjfoyjfutJWAiCXTNdjsU4pyXVEmgAflt4NW3698XWNn6dx/WSrBM44veB8= X-Received: by 2002:a05:6402:13d0:b0:5d0:d492:970b with SMTP id 4fb4d7f45d1cf-5d81dc6d6c9mr9094779a12.0.1734932238775; Sun, 22 Dec 2024 21:37:18 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 23 Dec 2024 05:37:18 +0000 From: Stefan Kangas MIME-Version: 1.0 Date: Mon, 23 Dec 2024 05:37:18 +0000 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 75023 + moreinfo thanks Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.208.53 listed in bl.score.senderscore.com] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.53 listed in list.dnswl.org] 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.208.53 listed in sa-trusted.bondedsender.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.53 listed in wl.mailspike.net] 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 2.0 BLANK_SUBJECT Subject is present but empty X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) tags 75023 + moreinfo thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 01 20:25:24 2025 Received: (at control) by debbugs.gnu.org; 2 Jan 2025 01:25:24 +0000 Received: from localhost ([127.0.0.1]:41145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tT9xj-0000TZ-VF for submit@debbugs.gnu.org; Wed, 01 Jan 2025 20:25:24 -0500 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:55656) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tT9xi-0000TS-Rw for control@debbugs.gnu.org; Wed, 01 Jan 2025 20:25:23 -0500 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5d3d14336f0so2893833a12.3 for ; Wed, 01 Jan 2025 17:25:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735781122; x=1736385922; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=5zZxz0NoJYk+0b8vXDjoLR6PAIrqY3/iOCsPKCYFnOg=; b=TYVlX5V3ceoZXumT3Czna9q1ii4CbuT/7jclQnCgoxf++ssucglHL80ZWVADfeY8Uv gBb9OVCelFKxehfepeQPM9jMztpgQYXuCuczY7oiHSz1iTwd+556mhD8AzFYyq1xXjFw eJkpJwQhkh+cVRYSH2p+BlJSpK+a+Me0yPbhnT1WIx1JryGzsl//rmycFJIhd+ezh1pJ gEEG1djk5Xz2Twg38wJp4rdR7PyJl/3rbRD94/AJtb9FRYzqELKVZnIwZaFx2VrRel8r k3vPKRmNs67B9B4Fzkc3rDJTfuVnZ5y7XErzfyJywFLAj184p7+LTZ4NZmMlTg6g0s0y jmTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735781122; x=1736385922; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=5zZxz0NoJYk+0b8vXDjoLR6PAIrqY3/iOCsPKCYFnOg=; b=hn9CuJJ5eWmqMCZ6zt3/MMYpTOfVV5jsK7ujycJSaQIo2r99T0T/X94/M3oa8X91EO hmN3iuCEATcUCigyVRgcLbIl3GPVr6CIovoAYkYCtRynUNy8Wpu6Z6mFsYf9reJUVn/6 ah4ieTms4PsXGLB28j7SqmR0b+dqrWRQaTn6pRbmCsHQiXZ228aWcAE21+A+NyTQdGk/ ZluE9W3i7vug0CmjIfpOvgLbZGVVhZJheqMkuZ8VVT8bwQb5mmfBTcLxfZAHTwR1XH4f WUB5ibAQzOh3EQppVotoHbsNxJWbq/NFlqzH+YruuYv8lpwDr9G1sx3fIDLkvEyQBBWE qkHQ== X-Gm-Message-State: AOJu0YymmgFTFOcVf6vVEKri7ImN4ZZLHMyGj0EOwCiCvo52BblFnVrC bhSACRpk3FqsHZsKsk2RHPfizZfTxNONLvQt5rIagXif1mrTAi7tOaalE0BoYxE38OWG7mg3GyN 5wLVVMu2aMOqvBdluv2Z4LpWfVqbvb5Tz X-Gm-Gg: ASbGncu9v15zAbgIZ2v+EzMcnoKx5PHsRb02T8k+xJvWBG44aUl6v31uDHobBMWJ/NF zICGffpF9xv+bsGWixzq1s22I9Mo/04+6eMje3gCr X-Google-Smtp-Source: AGHT+IGziI+k5v1QVfgH4DPVK7sXI44m7rF1Vaj2G3qhvqPSiuYFTRIS2KqHinLO+ltkAk2Q/SdxD8cNK5poNry/IGo= X-Received: by 2002:a05:6402:388a:b0:5d0:8106:aaf4 with SMTP id 4fb4d7f45d1cf-5d81ddf80fcmr33605162a12.21.1735781121777; Wed, 01 Jan 2025 17:25:21 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 1 Jan 2025 19:25:21 -0600 From: Stefan Kangas MIME-Version: 1.0 Date: Wed, 1 Jan 2025 19:25:21 -0600 Message-ID: Subject: control message for bug #75023 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) severity 75023 minor quit From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 12 00:30:51 2025 Received: (at 75023) by debbugs.gnu.org; 12 Feb 2025 05:30:51 +0000 Received: from localhost ([127.0.0.1]:60390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ti5Kl-00082t-3U for submit@debbugs.gnu.org; Wed, 12 Feb 2025 00:30:51 -0500 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]:45128) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1ti5Kh-0007hQ-5R for 75023@debbugs.gnu.org; Wed, 12 Feb 2025 00:30:48 -0500 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-5de56ff9851so8249893a12.2 for <75023@debbugs.gnu.org>; Tue, 11 Feb 2025 21:30:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739338241; x=1739943041; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=V8H8TVXb77vc/+XJpzCYRz/O1rjX9PptUYyaSpaO2pM=; b=N2bhs5V6dj6y9h+3aBR9NCXFS2vJYKtZ9JRnny501sLJp9QJu5wh1XU4xRrOCI6Jrj w9MDjC0HDUO7O8wLGVJeCsaOny6U3KjSPXuVdVJzMZNCiaGqI2cFjV+H59WRVzzuRICQ OVLTIOSE4tgP53N0CoE/Z6lbolh9C6zOOdvk7uImtLw0Xe5yEHPGGsQPUXksDBeKpfOE ZE6VM6K2qYhRadoM3gkonr1LUWLnrfeVSHIRUyJp2YLnjtp96aQbw2HTZni01L6Jf4KZ F7etntoL5RFM5E28CGi2a0tU0+YJIy5f5I+iRZXY8mcWUMHYMBVBedNPuSXNTN/0XfOU uQ1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739338241; x=1739943041; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=V8H8TVXb77vc/+XJpzCYRz/O1rjX9PptUYyaSpaO2pM=; b=o3wCLe/tRZeW3YLz1G4Po7J8/qlRBfBDBpqNfRfcL1X+0fCR+i/MVjV+xMhoHOzqO5 N2f+xPPh2pfJcpdg78MdIEhSk1REPS/kNBADtBc9Ce5g0/BFx0QOXsskR9SgCwvkG+Cx timsvSltHbJF2crxIgtYtLiq67zhbZnXenLVIdCkWpj7RiLMLtJqyAn6cZwt4qJ6rRdk 5LDfRWDI3ZY+ui32fcw9+9XBH17w0zaCaHgfsQrWO2d2kHOpGnCNAn1RY4EWiiWguZPF cAHHn5GbaBA17kcH6T08g474pSSidKF6Iv52G8YVjGJwznXVPookE1W7jfLBJgUqXBYn oQXA== X-Gm-Message-State: AOJu0YyyBnsaUgKyXM70Zrh/Vv1Mu8zk9ACnlktiBF+27DZ1EKS+t/u2 5SIOGJeBqE3gxDlVu6YndypIoQsf5VFBLyP6IflkA1KUXWUvIa20peeg/i8l/9sOewTb0k5f0l/ omLUIq5/lJ6EeZA3GMeAx5j5GuII9GKvEg8taIw== X-Gm-Gg: ASbGnctVKbpzRFZQG3vnQJhVTdZtjjp1vMLy/V2X8eC4wpi9BymlFkxWgRlOjFkiAsr P+uliNa6BoUIg9Ym/Vud3I/iZklrrcJkUpegWFv+SCnFEzx+fWblL4u5+1LpUOzzGRhFPkXA/Tw == X-Google-Smtp-Source: AGHT+IGl7YSZcZwAKJu8iIOm8uPkZBRwq4wmmdHPEemrRlwKHVUukhX52UeKTkrL4TgFp6wSBDh+4/GSMJIM9jni8xw= X-Received: by 2002:a05:6402:268f:b0:5dc:cf9b:b033 with SMTP id 4fb4d7f45d1cf-5deb086a330mr892958a12.5.1739338240737; Tue, 11 Feb 2025 21:30:40 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 11 Feb 2025 21:30:40 -0800 From: Stefan Kangas In-Reply-To: References: <87a5cn2a0h.fsf@lco2.mail-host-address-is-not-set> MIME-Version: 1.0 Date: Tue, 11 Feb 2025 21:30:40 -0800 X-Gm-Features: AWEUYZnzIb3qoE5LEOOypo98EPG-Aj7mLQ8rS8ymLnAolAMrAWOPzQm-x-wmJZw Message-ID: Subject: =?UTF-8?Q?Re=3A_bug=2375023=3A_31=2E0=2E50=3B_Warning=3A_Unused_lexical_vari?= =?UTF-8?Q?able_=E2=80=98max=2Dtokens=E2=80=99_=2D=2D_while_used_in_function?= To: Jean Louis Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75023 Cc: 75023@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Kangas writes: > tags 75023 + moreinfo > thanks > > Jean Louis writes: > >> (defun rcd-llm-db (prompt &optional memory rcd-llm-model temperature max= -tokens top-p stream) >> "Send PROMPT to API as decided by the database. >> >> Optional MEMORY, RCD-LLM-MODEL, TEMPERATURE, MAX-TOKENS, TOP-P, and STRE= AM can be used." >> (let ((rcd-llm-model-id (rcd-db-users-defaults "llmmodels"))) >> (cond ((not rcd-llm-model-id) (rcd-warning-message "Did not find def= ault user's LLM model. Do `M-x rcd-my-defaults' to set it.")) >> (t (let* ((rcd-llm-model (rcd-db-get-entry "llmmodels" "llmmodels_nam= e" rcd-llm-model-id rcd-db)) >> (temperature (or temperature (rcd-db-get-entry "llmmodels" "llmmod= els_temperature" rcd-llm-model-id rcd-db))) >> (max-tokens (or max-tokens (rcd-db-get-entry "llmmodels" "llmmodel= s_maxtokens" rcd-llm-model-id rcd-db))) >> (top-p (or top-p (rcd-db-get-entry "llmmodels" "llmmodels_topp" rc= d-llm-model-id rcd-db))) >> (llm-endpoint-id (rcd-db-get-entry "llmmodels" "llmmodels_llmendpo= ints" rcd-llm-model-id rcd-db)) >> (llm-endpoint (rcd-db-get-entry "llmendpoints" "llmendpoints_name"= llm-endpoint-id rcd-db)) >> (llm-provider-id (rcd-db-get-entry "llmendpoints" "llmendpoints_ll= mproviders" llm-endpoint-id rcd-db)) >> (api-key (rcd-db-get-entry "llmproviders" "llmproviders_apikey" ll= m-provider-id rcd-db)) >> (authorization (concat "Bearer " api-key)) >> (stream (if stream t :json-false)) >> (url-request-method "POST") >> (url-request-extra-headers >> `(("Content-Type" . "application/json") >> ("Authorization" . ,authorization))) >> (url-request-data >> (encode-coding-string >> (setq rcd-llm-last-json >> (json-encode >> `((model . ,rcd-llm-model) >> (messages . [((role . "user") (content . ,prompt))]) >> (temperature . ,temperature) >> (max_tokens . ,max-tokens) >> (top_p . ,top-p) >> (stream . ,stream)))) >> 'utf-8)) >> (buffer (url-retrieve-synchronously llm-endpoint))) >> (rcd-llm-response buffer)))))) >> >> >> in that above function I am using ,max-tokens, but with interpolation. >> >> Though, byte compiler gives warning: >> >> Unused lexical variable =E2=80=98max-tokens=E2=80=99 -- while used in fu= nction > > Could you please send a smaller example that reproduces the bug? Ping! Without a smaller example, it will be hard to make much progress with this. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 01 23:26:11 2025 Received: (at 75023-done) by debbugs.gnu.org; 2 Mar 2025 04:26:11 +0000 Received: from localhost ([127.0.0.1]:49903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1toau2-0000ph-UV for submit@debbugs.gnu.org; Sat, 01 Mar 2025 23:26:11 -0500 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:59410) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1toau0-0000oq-M9 for 75023-done@debbugs.gnu.org; Sat, 01 Mar 2025 23:26:09 -0500 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5e4f88ea298so3412865a12.2 for <75023-done@debbugs.gnu.org>; Sat, 01 Mar 2025 20:26:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740889562; x=1741494362; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ymsx3uCQwLKuuon0cG0jTFDjMi+KDvxolgzxSiYxfcc=; b=K7JYoTsU87bnxqbQxIGyhOW2VW2ZweaPknl7VyAQzx2hinPzCE/tbQ/BgXUnYjyzid cnlVuKvuv05BGcZXZI1VGCyvAvc8T1Ru+fIWI6NjD+22CyozwmdFNPQ2j8BfSWZSy/pT JQRzy91TgF16rY8RB9WwMPktxd6xdARsgblQzMNR3tU8y1Jpv/LYcsPnco3fXltiwJnw BEE8ddxcPGQncilXmtTeskqx8X6j9zks2hOCiAK3rh8olQaJL6y5CpX1J8KQ1XcPRnzM QqEmW38uA24aeyHX6ZazZ5rR5JX9y5qUzZf9Hqll4Ctd7GXvEmsCAApH+WUo/2iPo1fb VvLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740889562; x=1741494362; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Ymsx3uCQwLKuuon0cG0jTFDjMi+KDvxolgzxSiYxfcc=; b=YloEb0+u9lYFpw83FJpBwUM2gFxihmC82cwVnN2L8jfS6cNEnL86xY4//jAYo7/Qov 6OjRJwbZhHJ5TX3ubXytt+lfLkjccJIXano91TvL99aXvKPl1aj2XGp7Q3darC155OL0 Pp5sPaaS6WJ02STKbf8wfGo5nNnngxhA4TwIZa3mJK7d68MrN4uZWh4NlUxAsxsZB6W1 MSqd38FhDXtmLtBBCCSC+6EKARUWZCiDKDIDwvDTDsSARo+OqbfLquT1o1RFWkjjXqhu cZ5cY9e9RSqBDqnI2ob9F53ERWYv+e7Yt/CgVGc9cEeQphYSwv3SfU6q5sEX+PthUO7p b3/g== X-Gm-Message-State: AOJu0YyOyHvih8M883dM1YvKBba/bPGX6ScsIKS62UrUnTYDyd9Lhr4z fMNV7UyZmblcTmKfMnS/oRAMKiwKhWyf2JWxukDzmUTclkOMIl/XBVuVQLMAFd2MER9HuJS4H/Z aF+MVD2QQ/hyrqovesKQAMHmtbL5VCaAGbz0= X-Gm-Gg: ASbGncsBSmTslMaIykYd4DjOI5+O7f9r/gSqMfJ9TwL5KjuErw3CE98YaoTxWs6qvHQ wfgfFnG+tt2DPktX3vG00BJxRcoBXmsueiOH81ZFCDe/dJ/D5MErZfuMkiO0snVr/Y/XJys7hQp e73HN0qsFOk9RbInGhh3y2uwPSCA== X-Google-Smtp-Source: AGHT+IGWOQ0dKgjZjc9+tMddDigtvTdbxlJxmmHLlcQEh30Wq2JO54FvusEnqkC8rVChF/Um2g/q1WS9CThC3Zo+HPM= X-Received: by 2002:a05:6402:2813:b0:5de:481a:cbc1 with SMTP id 4fb4d7f45d1cf-5e4d6af159cmr11860637a12.16.1740889562489; Sat, 01 Mar 2025 20:26:02 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 2 Mar 2025 04:26:02 +0000 From: Stefan Kangas In-Reply-To: References: <87a5cn2a0h.fsf@lco2.mail-host-address-is-not-set> MIME-Version: 1.0 Date: Sun, 2 Mar 2025 04:26:02 +0000 X-Gm-Features: AQ5f1JrnHrgyPqlif7qEJxGHV7TcKBp74nkr_DGi7Kd1Lk6peDLDqSOdnorOeSw Message-ID: Subject: =?UTF-8?Q?Re=3A_bug=2375023=3A_31=2E0=2E50=3B_Warning=3A_Unused_lexical_vari?= =?UTF-8?Q?able_=E2=80=98max=2Dtokens=E2=80=99_=2D=2D_while_used_in_function?= To: Jean Louis Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 75023-done Cc: 75023-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Kangas writes: > Stefan Kangas writes: > >> tags 75023 + moreinfo >> thanks >> >> Jean Louis writes: >> >>> (defun rcd-llm-db (prompt &optional memory rcd-llm-model temperature ma= x-tokens top-p stream) >>> "Send PROMPT to API as decided by the database. >>> >>> Optional MEMORY, RCD-LLM-MODEL, TEMPERATURE, MAX-TOKENS, TOP-P, and STR= EAM can be used." >>> (let ((rcd-llm-model-id (rcd-db-users-defaults "llmmodels"))) >>> (cond ((not rcd-llm-model-id) (rcd-warning-message "Did not find de= fault user's LLM model. Do `M-x rcd-my-defaults' to set it.")) >>> (t (let* ((rcd-llm-model (rcd-db-get-entry "llmmodels" "llmmodels_na= me" rcd-llm-model-id rcd-db)) >>> (temperature (or temperature (rcd-db-get-entry "llmmodels" "llmmo= dels_temperature" rcd-llm-model-id rcd-db))) >>> (max-tokens (or max-tokens (rcd-db-get-entry "llmmodels" "llmmode= ls_maxtokens" rcd-llm-model-id rcd-db))) >>> (top-p (or top-p (rcd-db-get-entry "llmmodels" "llmmodels_topp" r= cd-llm-model-id rcd-db))) >>> (llm-endpoint-id (rcd-db-get-entry "llmmodels" "llmmodels_llmendp= oints" rcd-llm-model-id rcd-db)) >>> (llm-endpoint (rcd-db-get-entry "llmendpoints" "llmendpoints_name= " llm-endpoint-id rcd-db)) >>> (llm-provider-id (rcd-db-get-entry "llmendpoints" "llmendpoints_l= lmproviders" llm-endpoint-id rcd-db)) >>> (api-key (rcd-db-get-entry "llmproviders" "llmproviders_apikey" l= lm-provider-id rcd-db)) >>> (authorization (concat "Bearer " api-key)) >>> (stream (if stream t :json-false)) >>> (url-request-method "POST") >>> (url-request-extra-headers >>> `(("Content-Type" . "application/json") >>> ("Authorization" . ,authorization))) >>> (url-request-data >>> (encode-coding-string >>> (setq rcd-llm-last-json >>> (json-encode >>> `((model . ,rcd-llm-model) >>> (messages . [((role . "user") (content . ,prompt))]) >>> (temperature . ,temperature) >>> (max_tokens . ,max-tokens) >>> (top_p . ,top-p) >>> (stream . ,stream)))) >>> 'utf-8)) >>> (buffer (url-retrieve-synchronously llm-endpoint))) >>> (rcd-llm-response buffer)))))) >>> >>> >>> in that above function I am using ,max-tokens, but with interpolation. >>> >>> Though, byte compiler gives warning: >>> >>> Unused lexical variable =E2=80=98max-tokens=E2=80=99 -- while used in f= unction >> >> Could you please send a smaller example that reproduces the bug? > > Ping! Without a smaller example, it will be hard to make much progress > with this. No further information within 9 weeks, so I'm closing this bug now. Please reopen or file a new bug if you can find a smaller recipe. Thanks. From unknown Mon Aug 18 11:15:03 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 30 Mar 2025 11:24:18 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator