1
0
Fork 0
Kagi FastGPT and Universal Summarizer inside Emacs.
Find a file
Bram Schoenmakers 11865f92cf
Refactor code around the curl call
This makes passing input data and setting flags more robust.
2023-12-24 23:18:57 +01:00
.gitignore Ignore *.elc 2023-12-23 23:30:04 +01:00
kagi.el Refactor code around the curl call 2023-12-24 23:18:57 +01:00
LICENSE.txt Initial commit - kagi.el provides FastGPT access from within Emacs 2023-12-21 22:27:54 +01:00
README.org Add README 2023-12-23 19:17:08 +01:00

kagi.el README

Introduction

This package provides a shell to submit prompts to FastGPT, inspired by xenodium's chatgpt-shell.

Kagi is a relatively new ad-free search engine, offering additional services such as the Universal Summarizer or more notably FastGPT, their open source LLM offering. Some functionality is provided through an API.

Usage

  1. Make a Kagi account if you haven't done so already. An account is free, and comes with 100 trial searches.
  2. In your account settings, put a balance for the API part (note that this is a separate balance than the subscription). The recommendation is to start with a one-time charge of $5. A single query ranges from 1 to 5 cents typically, depending on the amount of tokens processed.
  3. In the API portal, create an API token. Put the result in kagi-api-token.
  4. You're good to go: run the command kagi-fastgpt-shell and start prompting.

Installation and configuration

kagi.el is not on MELPA (yet?), so for now only Git access is possible.

Clone with:

git clone https://codeberg.org/bram85/kagi.el.git /path/to/kagi.el

Note that kagi.el has a dependency on the shell-maker package, which is available on MELPA.

You way want to load and configure the package with use-package, for example put the following in your Emacs init file:

  (use-package kagi
    :commands kagi-fastgpt-shell
    :ensure nil
    :load-path "/path/to/kagi.el"
    :custom
    (kagi-api-token "ABCDEF")
    ;; or use a function, e.g. with the password-store package:
    (kagi-api-token (lambda () (password-store-get "Kagi/API"))))

The token can be supplied directly as a string, but you could write a lambda to retrieve the token from a more secure location (e.g. pass(1)).