Alfred GPT lookup
python3
> 3.6
requests
module (python3 -m pip install requests
)
-
Clone this repository and double click the "GPT-3 Lookup.alfredworkflow" file to add it to Alfred.
-
You must add an API KEY to config.json:
You can also change the model, temperature, or tokens here. Refer to the OpenAI docs for more information.
- Unfortunately because this is run through alfred, the tool requires absolute paths which are not the same at runtime (meaning trying to find them with tools like python's
os
module will not work).
So you must add these yourself. There are 2 manual paths to change. One in the code:
https://github.com/rfaile313/alfred-gpt/blob/54681e344ce3cd3d19c0047ede1c23e6bed71742/main.py#L12
example: SOURCE_DIR="/Users/rfaile313/alfred-gpt"
And one in the Alfred workflow itself:
example: /opt/homebrew/bin/python3 /Users/rfaile313/alfred-gpt/main.py "$1"
Note: your python3 path may be different than /opt/homebrew/bin/python3
-- you can check in your terminal with $which python3