Jump to content

Kagi FastGPT


Recommended Posts

 
Get access to [Kagi's FastGPT](https://kagi.com/fastgpt) directly within Alfred.
 
FastGPT.webp
You will need to:
 
1. configure it with [your API Key and buy credits](https://help.kagi.com/kagi/api/fastgpt.html#quick-start).
2. have curl and jq installed, you can do this by installing [Dorothy](https://github.com/bevry/dorothy)
 
Edited by balupton
embed the image
Link to comment
Posted (edited)

Didn't know about that, will be sure to use that when the feature goes into stable. Thanks for the tip! Glad that doing such things doesn't require that unconventional approach anymore.

Edited by balupton
Link to comment
  • 3 months later...
  • 2 months later...

I have tried this.  I regularly get permission denied when debugging the workflow on the jq directory.  I am trying to run this on an M1 mac with Macos Sequoia.  I cannot install dorothy because it says my OS is too old to be supported.  all this to say, I would like to run fastgpt, because I am a paid kagi user, but your workflow breaks.  any help would be appreciated. I am using alfred release 5.5

 

this is the debug view:

[13:30:34.360] FastGPT[Keyword] Processing complete
[13:30:34.363] FastGPT[Keyword] Passing output 'is kagi awesome?' to Run Script
[13:30:34.363] FastGPT[Keyword] Passing output 'is kagi awesome?' to Arg and Vars
[13:30:34.364] FastGPT[Arg and Vars] Processing complete
[13:30:34.365] FastGPT[Arg and Vars] Passing output 'Generating your Kagi FastGPT response...' to Text View
[13:30:34.956] ERROR: FastGPT[Run Script] zsh:3: no such file or directory: /Users/balupton/.local/bin/jq
curl: (56) The requested URL returned error: 401
[13:30:34.962] FastGPT[Run Script] Processing complete
[13:30:34.963] FastGPT[Run Script] Passing output '' to Text View

Edited by antiduplicity
Link to comment

@balupton The current version of the workflow isn’t suitable for sharing, because it hard codes /Users/balupton/.local/bin/jq making it not work for anyone else. curl has shipped with macOS since forever and jq started shipping with it since Sequoia.

 

@antiduplicity You might get it to work by editing the Run Script object and replacing everything in it with:

 

curl --fail --silent --show-error --location --header "Authorization: Bot $KAGI_API_TOKEN" --header 'Content-Type: application/json' --data '{"query": "{query}"}' https://kagi.com/api/v0/fastgpt | jq -r .data.output

 

This is untested, as I don’t have Kagi.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...