updated readme

This commit is contained in:
Rudis Muiznieks 2025-04-02 18:07:04 -05:00
parent b01443815c
commit 0357a8e436
Signed by: rudism
GPG key ID: CABF2F86EF7884F9

View file

@ -1,7 +1,33 @@
## Kagi FastGPT Fallback Skill for OVOS
### Plans
### Install or Upgrade
- Sent utterance directly to FastGPT, strip references from the answer, and speak it.
- Initially configure with API key, call FastGPT API.
- Hopefully configure with session link, call FastGPT via same url the web app uses to avoid the need for API credits if you're already a Kagi subscriber.
```
pip install --upgrade git+https://code.sitosis.com/rudism/skill-ovos-fallback-kagi.git
```
Then reboot.
### Configure
To use the [Kagi FastGPT API](https://help.kagi.com/kagi/api/fastgpt.html), add your Kagi API key to the `settings.json` (usually found in `~/.config/mycroft/skills/skill-ovos-fallback-kagi.rudism`). Each search that isn't cached will use up your Kagi API credits.
```json
{
"__mycroft_skill_firstrun": false,
"kagiApiKey": "your-api-key-here"
}
```
If you are a Kagi Professional or Kagi Ultimate subscriber, you can use the session-based API instead without the need for API credits. This uses the same unofficial API that the [FastGPT web interface](https://kagi.com/fastgpt) uses. Keep in mind that since this is not an official API it is more prone to break without notice. To use it, get your session token from Kagi by going to Settings -> Account and looking at your "Session Link." The token is the string of random characters at the end of the url, which should look like `https://kagi.com/search?token=abc123xyz`. In that example, the token is `abc123xyz` and your `settings.json` should look like this:
```json
{
"__mycroft_skill_firstrun": false,
"kagiSession": "abc123xyz"
}
```
### Usage
The skill should catch all unrecognized utterances and pass those directly to FastGPT, then read the answer. Best attempt has been made to strip the response of formatting and references. If it doesn't respond you can check the skill logs for possible clues as to why (usually at `~/.local/state/mycroft/skills.log`).