2025-01-05

<2025-01-05 Sun>

(excellent_advice_for_living.t2t)

cultivate 12 people who love you because they are worth more than 12 million people who like you.

๋‚˜๋ฅผ ์ข‹์•„ํ•˜๋Š” 12๋ช…์˜ ์‚ฌ๋žŒ๋“ค์€ ๋‚˜๋ฅผ ์ข‹์•„ํ•˜๋Š” 1,200๋งŒ ๋ช… ์ด์ƒ์˜ ๊ฐ€์น˜๊ฐ€ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๋‚˜๋ฅผ ์ข‹์•„ํ•˜๋Š” 12๋ช…์„ ์œก์„ฑํ•˜์„ธ์š”.

11:44 ์‹œ์ž‘

11:51 ๋ฉฐ์น  ์•“์Œ. ์บ ํ•‘๊ฐ€์„œ ์ฐจ์—์„œ ์ž๋‹ค๊ฐ€ ํƒˆ๋‚จ

๋ฐฑ๋งํฌ

[2025-01-05 Sun 12:20]

์ง€ํ”ผํ…”

(โ€œPerplexity: Citations ยท Issue #299 ยท Karthink/Gptelโ€ n.d.)

Perplexity: citations ยท Issue #299 ยท karthink/gptel

  • First, Thank you very much for this great package! Iโ€™m (also) using perplexity. So far I successfully managed to set gptel in order to make API calls to the perplexity models. One of the nice pointโ€ฆ
  • Perplexity

๋™์ž‘ํ•จ

[2025-01-05 Sun 12:35]

;;--------------------------------------------------------------------------------
;; Workaround: show citations
;;--------------------------------------------------------------------------------
(cl-defmethod gptel-curl--parse-stream ((_backend gptel-openai) _info)
  (let* ((content-strs)
         (citations-strs (or (plist-get _info :citations-strs) '()))  ;; ไปŽ info ไธญ่Žทๅ– citations-strs
         (citations-added (plist-get _info :citations-added)))  ;; ไปŽ info ไธญ่Žทๅ– citations-added
    (condition-case nil
        (while (re-search-forward "^data:" nil t)
          (save-match-data
            (unless (looking-at " *$$DONE$$")
              (let* ((response (gptel--json-read))
                     (delta (map-nested-elt
                             response '(:choices 0 :delta)))
                     (content (plist-get delta :content))
                     (citations (plist-get response :citations)))
                (push content content-strs)
                (unless citations-added
                  (when citations
                    (setq citations-strs
                          (let ((index 0))
                            (concat "Citations:\n"
                                    (mapconcat (lambda (citation)
                                                 (setq index (1+ index))
                                                 (format "[%d] %s \n" index citation))
                                               citations)
                                    "\n")))
                    (plist-put _info :citations-strs citations-strs)  ;; ๆ›ดๆ–ฐ info ไธญ็š„ citations-strs
                    (plist-put _info :citations-added t)  ;; ๆ›ดๆ–ฐ info ไธญ็š„ citations-added
                    ))
                ))))
      (error
       (goto-char (match-beginning 0))))
    (apply #'concat (append (unless citations-added
                              (list citations-strs))
                            (nreverse content-strs)
                            ))))

๋‹ค๋ฅธ ์ฝ”๋“œ - ์ฐธ๊ณ ์šฉ

 
(defun rdu-gptel-perplexity-insert-references (end)
  "From gptel output for Perplexity, extract citations.
gptel-log-level must be set to debug.
\"end\" is the response end position, as passed from gptel-post-response-functions.
"
  (interactive)
  (let ((pbuffer (buffer-name)))
    (switch-to-buffer "*gptel-log*")
    (end-of-buffer)
    (search-backward-regexp " \"citations\": ")
    (search-forward "[")
    (forward-char)
    (copy-region-as-kill (point) (- (search-forward "]") 1))
 
    (switch-to-buffer pbuffer)
    (goto-char end)
    (beginning-of-line)
    (open-line 1)
    (yank)
    (open-line 1)
 
    (mark-paragraph)
    (replace-string-in-region "\"," "\n")
    (replace-string-in-region " \"" "")
    (replace-string-in-region "\"" "")
 
    (rectangle-number-lines (+ (region-beginning) 1) (- (region-end) 1) 1 "[%d] ")
    (goto-char (region-end))
    (deactivate-mark)
 
    ;; From gptel-end-of-response in gptel.el, by Karthik Chikmagalur
    (when (looking-at (concat "\n\\{1,2\\}"
                              (regexp-quote
                               (gptel-prompt-prefix-string))
                              "?"))
      (goto-char (match-end 0)))))
 
(defun rdu-gptel-post-response-function (&optional _ end arg)
  "If Perplexity is the backend, extract and insert citations.
O.w. use gptel-end-of-response.
gptel-log-level must be set to debug."
  (interactive)
  (if (string= (slot-value gptel-backend 'name) "Perplexity")
      (rdu-gptel-perplexity-insert-references end)
    (gptel-end-of-response _ end arg)))
 

TODO EmacsConf 2024: Emacs 30 Highlights - Philip Kaludercic

https://youtube.com/watch?v=V1mnDK_tuAs&si=B7jRlUHrsghqldkC

TODO Emacs: sequence notes with Denote (denote-sequence.el)

[2025-01-05 Sun 12:28] https://youtube.com/watch?v=27krzVtflQY&si=upTOLJxTQfqrigjH

Emacs: sequence notes with Denote (denote-sequence.el)

(Protesilaos Stavrou 2025)

TODO ํผํ”Œ

[2025-01-01 Wed 07:35]

Perplexity: citations ยท Issue #299 ยท karthink/gptel :

(โ€œPerplexity: Citations ยท Issue #299 ยท Karthink/Gptelโ€ n.d.)

  • First, Thank you very much for this great package! Iโ€™m (also) using perplexity. So far I successfully managed to set gptel in order to make API calls to the perplexity models. One of the nice pointโ€ฆ
 
  In case it helps someone else, the following function, rdu-gptel-perplexity-insert-references, inserts Perplexity's citations into the buffer. For it to work, you must set gptel-log-level to debug (the function grabs the citations from the *gptel-log* buffer). I also (add-hook 'gptel-post-response-functions 'rdu-gptel-post-response-function) so the function is called when the buffer is using a Perplexity backend (but calls gptel-end-of-response otherwise); here, I assume that the name used in gptel-make-openai (when creating the backend) is "Perplexity".
 
Beware: my elisp is completely rudimentary and this code is way too procedural; but it works for me.
 
(Side note: for reasons I don't understand, Perplexity always returns exactly five citations.)
 
(defun rdu-gptel-perplexity-insert-references (end)
  "From gptel output for Perplexity, extract citations.
gptel-log-level must be set to debug.
\"end\" is the response end position, as passed from gptel-post-response-functions.
"
  (interactive)
  (let ((pbuffer (buffer-name)))
    (switch-to-buffer "*gptel-log*")
    (end-of-buffer)
    (search-backward-regexp " \"citations\": ")
    (search-forward "[")
    (forward-char)
    (copy-region-as-kill (point) (- (search-forward "]") 1))
 
    (switch-to-buffer pbuffer)
    (goto-char end)
    (beginning-of-line)
    (open-line 1)
    (yank)
    (open-line 1)
 
    (mark-paragraph)
    (replace-string-in-region "\"," "\n")
    (replace-string-in-region " \"" "")
    (replace-string-in-region "\"" "")
 
    (rectangle-number-lines (+ (region-beginning) 1) (- (region-end) 1) 1 "[%d] ")
    (goto-char (region-end))
    (deactivate-mark)
 
    ;; From gptel-end-of-response in gptel.el, by Karthik Chikmagalur
    (when (looking-at (concat "\n\\{1,2\\}"
                              (regexp-quote
                               (gptel-prompt-prefix-string))
                              "?"))
      (goto-char (match-end 0)))))
 
(defun rdu-gptel-post-response-function (&optional _ end arg)
  "If Perplexity is the backend, extract and insert citations.
O.w. use gptel-end-of-response.
gptel-log-level must be set to debug."
  (interactive)
  (if (string= (slot-value gptel-backend 'name) "Perplexity")
      (rdu-gptel-perplexity-insert-references end)
    (gptel-end-of-response _ end arg)))

TODO ๋งํฌ

[2025-01-01 Wed 09:05]

ligarto.org/rdiaz |

(Diaz-Uriarte 2017)

  • Diaz-Uriarte, Ramon

์ตœ๊ณ ์˜ ๊ต์‹ค - ์„œ๋ฐ‹์Šค์ฟจ ๋งž์ถคํ˜•๊ต์œก

(๋‹ค์ด์•ค ํƒœ๋ธŒ๋„ˆ 2021)

  • ๋‹ค์ด์•ค ํƒœ๋ธŒ๋„ˆ ์šฐ๋ฏธ์ • ๋นŒ ๊ฒŒ์ด์ธ 
  • ๋‚ด ์•„์ด๋ฅผ ๋ฏธ๋ž˜ํ˜• ์ธ์žฌ๋กœ ๋งŒ๋“œ๋Š” 1์ธ ๋งž์ถคํ˜• ๊ต์œกโ€œํ•œ ๋ช… ํ•œ ๋ช…์—๊ฒŒ ์ดˆ์ ์„ ๋งž์ถ”๋Š” ๊ต์‹ค์ด ๊ฐ€๋Šฅํ• ๊นŒ?โ€์•„์ด๋“ค์˜ ๋ฏธ๋ž˜๋ฅผ ์–ด๋–ป๊ฒŒ ์ค€๋น„ํ•ด์•ผ ํ• ๊นŒ? ์šฐ๋ฆฌ๊ฐ€ ๊ต์œก์— ๊ทธํ† ๋ก ๊ด€์‹ฌ๊ณผ ์—ด์ •์„ ์Ÿ๋Š” ์ด์œ ๊ฐ€ ์•„์ด๋“ค์„ ๋ช…๋ฌธ ๋Œ€ํ•™์— ์ž…ํ•™์‹œํ‚ค๋ ค๋Š” ๋ชฉ์ ๋ฟ์ธ๊ฐ€? ๊ทธ๋ ‡๊ฒŒ ํ•ด์„œ ๋Œ€ํ•™ ์ดํ›„์˜ โ€ฆ
  • Prepared: What kids need for fulfilled life

GPTEL GEMINI ๊ธฐ๋ณธ

์‹คํ—˜์šฉ ๋ชจ๋ธ | Gemini API | Google AI for Developers :

(โ€œ์‹คํ—˜์šฉ ๋ชจ๋ธ | Gemini API | Google AI for Developersโ€ n.d.)

ammaarreshi/Gemini-Search Perplexity style AI Search :2025

(ammaar [2025] 2025)

  • ammaar
  • Perplexity style AI Search engine clone built with Gemini 2.0 Flash and Grounding

์ƒ์„ฑ AI ํ™œ์šฉ๊ธฐ 2024: Copilot, Claude, Gemini :

(โ€œ์ƒ์„ฑ AI ํ™œ์šฉ๊ธฐ 2024: Copilot, Claude, Geminiโ€ n.d.)

  • ใ€Š์ƒ์„ฑ AI ํ™œ์šฉ๊ธฐใ€‹ ์ฑ…์— ๋‹ค๋ฃจ์ง€ ์•Š์•˜๊ฑฐ๋‚˜ ์—…๋ฐ์ดํŠธ๋œ ๋‚ด์šฉ์„ ์ด๊ณณ์— ์”๋‹ˆ๋‹ค. ๋ชฉ์ฐจ: 1. [์•คํŠธ๋กœํ”ฝ(Antโ€ฆ
  • ์ƒ์„ฑ AI ํ™œ์šฉ๊ธฐ 2024

Aider-AI/aider AI pair programming in your terminal :2024

(โ€œAider-AI/Aider AI Pair Programming in Your Terminalโ€ [2023] 2024)

  • aider is AI pair programming in your terminal

aider gemini

[2025-01-05 Sun 22:44]

pipx inject aider-chat google-generativeai
 pipx install google-generativeai --include-deps
โš ๏ธ  Note: normalizer was already on your PATH at /usr/bin/normalizer
โš ๏ธ  Note: tqdm was already on your PATH at /usr/bin/tqdm
  installed package google-generativeai 0.8.3, installed using Python 3.12.3
  These apps are now globally available
    - normalizer
    - pyrsa-decrypt
    - pyrsa-encrypt
    - pyrsa-keygen
    - pyrsa-priv2pub
    - pyrsa-sign
    - pyrsa-verify
    - tqdm
done! โœจ ๐ŸŒŸ โœจ
~ via ๎œ˜ v20.14.0 via ๐Ÿ v3.12.3
โžœ