Comments (18)
Support for Chat models (GPT 3.5/4) now works on my fork!
Feel free to use it here:
https://github.com/AntonOsika/CLI-Co-Pilot
The required changes in the code were small but non-obvious.
from codex-cli.
It seems code-davinci-002
and code-cushman-001
have been removed, but yes, the Codex CLI does not seem to support gpt-3.5-turbo
at the same time.
from codex-cli.
I'm still getting "cannot find openAI model" errors, even with gpt-3.5-turbo
as my model.
EDIT: That was with using the fork mentioned above: https://github.com/Lukas-LLS/Codex-CLI
Using the main branch, I get Codex CLI error: Invalid request - This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions?
when I use gpt-3.5-turbo as my model, and gpt-4 straight up doesn't work.
I use this tool every day, so a bugfix would be great!
from codex-cli.
I can think of two possible causes for your problem:
- You might have an old version of the fork, because at the time my fork was posted into this issue I was still working on it and at that point it was not operational (If you update to a newer version make sure to use a cleanup script and setup thereafter, because there a some changes that will break an older setup)
- It could also be possible that you still have the setup from https://github.com/microsoft/Codex-CLI. If that is the case, you should run the cleanup script from the original project before running the setup from the fork. (I don't know how you migrated to the fork, so this is just a possibility)
And for gpt-4 make sure you have the model available to you, for that to be the case you must have either signed up on the waitlist: https://openai.com/waitlist/gpt-4-api (from the waitlist you gain access to the gpt-4
model) or you must have the ChatGPT Plus subscription: https://chat.openai.com/chat in the lower left corner the button Upgrade to Plus
(from ChatGPT Plus you gain access to the gpt-4-32k
model)
If your issue still persists after these steps, let me know and I will look further into it
from codex-cli.
@Lukas-LLS still having problems. Both gpt-4-32k
and gpt-3.5-turbo
return Cannot find OpenAI model
errors. I have Chat GPT Plus.
The only difference I can think of between what I did and the installation instructions is that I copied my openAI secret key from where I originally stored it - since I think the picture where you can copy it directly from the OpenAI website is outdated (I cannot do that)
from codex-cli.
I already have submitted a PR #131
from codex-cli.
do you know how to fix it?
Try updating the openai
package with pip.
from codex-cli.
This fork is intended to fix this, https://github.com/Lukas-LLS/Codex-CLI. A PR from @Lukas-LLS would be great.
from codex-cli.
Note:
As of March 2023, the Codex models are now deprecated. Please check out our newer Chat models which are able to do many coding tasks with similar capability
as per:
https://platform.openai.com/docs/guides/code
Use gpt-3.5-turbo
for best results! Once you get API access to GPT-4, move up to that, no point in using Codex models, like davinci anymore.
from codex-cli.
@Lukas-LLS , could you consider submitting a PR to the official project?
from codex-cli.
@loftusa I have found and fixed your problem. It was limited to the zsh_setup.sh script, therefore I did not find it immediately. The problem was that in some cases the variable name of modelId
was modelID
. That was due to me carelessly refactoring the name without checking it afterwards. The problem should be fixed with the latest commit.
I also found out that the zsh_setup.sh does only work for macOS and not for zsh under normal Linux due to different implementations of the
sed
command under these two different operating systems.
from codex-cli.
@AntonOsika , for Bash, your fork is inserting an space at the beginning of the generated commands preventing them to be stored in the history. Can I change this behavior by configuration?
from codex-cli.
from codex-cli.
@loftusa I have found and fixed your problem. It was limited to the zsh_setup.sh script, therefore I did not find it immediately. The problem was that in some cases the variable name of
modelId
wasmodelID
. That was due to me carelessly refactoring the name without checking it afterwards. The problem should be fixed with the latest commit.I also found out that the zsh_setup.sh does only work for macOS and not for zsh under normal Linux due to different implementations of the
sed
command under these two different operating systems.
I found that after pressing ctrl+G, the generated commands will only be displayed after the issue I raised.like this:
what is running on port 3306sudo lsof -i :3306
from codex-cli.
That was the original behavior of Codex-CLI. I found that `# Your comment here` &&
had worked for this behavior, although I did not like that way of writing a prompt. I have now changed that way the command is insert in bash and zsh to match Powershell allowing to write normal comments then hitting Ctrl+G and then the command appearing in a new line below the comment. For this to take effect you must update your local repository.
from codex-cli.
That was the original behavior of Codex-CLI. I found that
`# Your comment here` &&
had worked for this behavior, although I did not like that way of writing a prompt. I have now changed that way the command is insert in bash and zsh to match Powershell allowing to write normal comments then hitting Ctrl+G and then the command appearing in a new line below the comment. For this to take effect you must update your local repository.
Now it can run great. Thank you.🙏
from codex-cli.
Support for Chat models (GPT 3.5/4) now works on my fork!
Feel free to use it here:
https://github.com/AntonOsika/CLI-Co-Pilot
The required changes in the code were small but non-obvious.
getting this error in zsh:
Codex CLI error: Unexpected exception - module 'openai' has no attribute 'ChatCompletion'
do you know how to fix it?
from codex-cli.
@hablutzel1 looks like it works, thanks!!!
from codex-cli.
Related Issues (20)
- Documentation improvement request HOT 4
- ZSH script assumes that the .zshrc file is already present, which causes the script to fail HOT 1
- Bash script installing on mac, but not doing anything after hitting Ctrl+G HOT 8
- No response when in a conda environment HOT 4
- zsh_plugin.zsh:12: parse error near `interactivecomments' HOT 1
- zsh_setup fails when calling sed and exits immediately HOT 4
- [powershell] `Failed to access OpenAI api` with working API key HOT 4
- No response on Windows 11 powershell HOT 9
- # Codex CLI error: Rate limit exceeded, try later HOT 3
- Unexpected exception - 'PromptFile' object has no attribute 'config' HOT 1
- Installations fails on W11 with `error: Microsoft Visual C++ 14.0 or greater is required` HOT 1
- No openaiapirc file being created with bash_setup.sh HOT 1
- any update on Azure Open AI Service? HOT 2
- Codex CLI error: Rate limit exceeded, try later
- Azure Open AI not giving desired results HOT 1
- scaling questions HOT 1
- The API deployment for this resource does not exist error from codex_query.py HOT 1
- This is not a chat model and thus not supported in the v1/chat/completions endpoint
- Error on macos12 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codex-cli.