Closed ghost closed 2 years ago
Do you have oh-my-zsh installed? It might be necessary for the plugin to work. https://ohmyz.sh/
Did you follow the installation instructions again and tried to complete some text using Ctrl+x?
On Sun, Sep 26, 2021, 19:26 Eric @.***> wrote:
OK, that worked, how do I open zsh_codex, it only goes to the default git(main)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tom-doerr/zsh_codex/issues/1#issuecomment-927341101, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFSYSFBQSHUDPMYVVFITUDLUD5JVXANCNFSM5EY4T5XQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
I followed all the steps and installed everything from the instructions but it still doesn't work trying to complete some text with Ctrl+x or anything. I like the idea. would be nice to test it.
Do you get any output or is nothing happening at all?
On Mon, Sep 27, 2021, 19:01 John Garcia @.***> wrote:
I followed all the steps and installed everything from the instructions but it still doesn't work trying to complete some text with Ctrl+x or anything. I like the idea. would be nice to test it.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tom-doerr/zsh_codex/issues/1#issuecomment-928073462, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFSYSFCV7HVIN6YL5L7QALDUECPODANCNFSM5EY4T5XQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
it's just showing the next message: No such shell function create_completion
i'm using ZSH version: 5.8
Iterm2 version: 3.4.10
pip version: 21.2.4
openai last version
like this looks my oh-my-zsh plugins config
plugins=( git zsh-syntax-highlighting zsh-autosuggestions zsh-codex bundler ) zle -N create_completion bindkey '^X' create_completion
i already check the repositories in ~/.oh-my-zsh/plugins and the Repo zsh_codex is there.
Could you try to change zsh-codex to zsh_codex ? Also the plugin needs to
be at ~/.oh-my-zsh/custom/plugins
and not ~/.oh-my-zsh/plugins
.
On Mon, Sep 27, 2021, 21:49 John Garcia @.***> wrote:
it's just showing the next message: No such shell function create_completion'` i'm using ZSH version: 5.8 Iterm2 version: 3.4.10 python version: 2.7.16 openai last version
like this looks my oh-my-zsh plugins config plugins=( git zsh-syntax-highlighting zsh-autosuggestions zsh-codex bundler ) zle -N create_completion bindkey '^X' create_completion
i already check the repositories in ~/.oh-my-zsh/plugins and the Repo zsh_codex is there.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tom-doerr/zsh_codex/issues/1#issuecomment-928216872, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFSYSFEPL2L366SXB4NAJULUEDDDXANCNFSM5EY4T5XQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
I already did it and it does not work. I had instinctively put it in the main plugins folder after the fatal destination path error was generated after trying to download it with the instructions in the documentation.
It must complete words after ctrl + x anywhere in the terminal? or what should be the behavior? not very clear with the gif example.
Yes, it should always complete your text when you press ctrl + x. Could you add
plugins=(zsh_codex)
zle -N create_completion
bindkey '^X' create_completion
to the very end of your .zshrc
? Maybe something gets overwritten by another plugin.
Well now it is trying to do something.
create_completion.py", line 3, in <module>
import openai ModuleNotFoundError: No module named 'openai'
Try pip3 install openai
Thanks Tom, now it seems to be a problem with the engine davinci-codex.
line 67, in <module> response = openai.Completion.create(engine='davinci-codex', prompt=input_prompt, temperature=0.5, max_tokens=32, stream=STREAM)
line 31, in create return super().create(*args, **kwargs)
line 66, in create response, _, api_key = requestor.request( File "api_requestor.py", line 129, in request resp = self.interpret_response(rbody, rcode, rheaders, stream=stream)
line 348, in interpret_response return self.interpret_response_line(rbody, rcode, rheaders, stream)
line 367, in interpret_response_line raise self.handle_error_response( openai.error.InvalidRequestError: Engine not found
It works properly changing he engine='davinci-codex' to engine='davinci' openai default engine. I already tested it and works
but it should work with the engine='davinci-codex' right?
Yes, it should. davinci
is just the normal language model. You might be able to use this to complete the text in the shell, but I suspect it's far from the performance of Codex.
To access davinci-codex you need to get Codex access from OpenAI, just having access to the normal API is not enough.
https://openai.com/blog/openai-codex/
Please comment again if you are still having issues.
Could you post your ~/.zshrc
?
Traditionally it's located in your home directory (~
). Do you mean by admin directory the home directory?
Just to clarify: You home directory can very well be named admin
. If you are not sure if this is your home directory, please run the commands pwd
and echo ~
and post the outputs.
That looks good. Please go to ~/.oh-my-zsh/custom/plugins/zsh_codex
and run the commands pwd
and ls -la
and send the ouput.
Please run echo $ZSH_CUSTOM
Please run echo $plugins
.
which create_completion
It's a command :D Please run it.
Please run
source ~/.oh-my-zsh/custom/plugins/zsh_codex/zsh_codex.plugin.zsh
zle -N create_completion
bindkey '^X' create_completion
and then hit Ctrl + X to see what happens.
cat ~/.oh-my-zsh/custom/plugins/zsh_codex/zsh_codex.plugin.zsh
I'm starting to run out of ideas. We should be able to access the function create_completion
after we loaded it using source ~/.oh-my-zsh/custom/plugins/zsh_codex/zsh_codex.plugin.zsh
.
No such shell function 'create_completion'
I am getting the same problem.
what do we have to write in organization_id?
@JaskiratSudan The organization ID that OpenAI assigns to you. If you have access to Codex, you can find it here: https://beta.openai.com/account/api-keys
@architkuiya What operating system are you using?
Parrot OS
@architkuiya What operating system are you using?
@architkuiya When you run
source ~/.oh-my-zsh/custom/plugins/zsh_codex/zsh_codex.plugin.zsh
zle -N create_completion
bindkey '^X' create_completion
do you get the same error as well?
create_completion:3: no such file or directory: /plugins/zsh_codex/create_completion.py
Please try to set your ZSH_CUSTOM path using
export ZSH_CUSTOM=~/.oh-my-zsh/custom
Hi, I have been waiting long for the openai account , is there any one who got an account from them,
My plugin installation completed , only need to get secret/organization_id to try out this plugin
@architkuiya Could you clone the repo again?
git clone https://github.com/tom-doerr/zsh_codex.git ~/.oh-my-zsh/custom/plugins/
@architkuiya Could you clone the repo again?
git clone https://github.com/tom-doerr/zsh_codex.git ~/.oh-my-zsh/custom/plugins/
fatal: destination path '/home/archit/.oh-my-zsh/custom/plugins' already exists and is not an empty directory.
For those who got:
raise self.handle_error_response( openai.error.InvalidRequestError: The model: "code-davinci-002" does not exist
Just replace engine
with model
and code-davinci-002
with text-davinci-003
(latest).
Enjoy.
N