Open raghavkarol opened 9 months ago
The default model text-davinci-003 has been deprecated. This causes codegpt command to fail. Running openapi with debug-mode shows the error message:
text-davinci-003
codegpt
[ENCODED]: {"model":"text-davinci-003","prompt":"What is the following?\n\n(cl-defun openai-completion ( prompt callback\n\n","max_tokens":2000,"temperature":1.0} [error] request--callback: peculiar error: 404 [ERROR]: #s(request-response 404 nil ((error (message . The model `text-davinci-003` has been deprecated, learn more here: https://platform.openai.com/docs/deprecations) (type . invalid_request_error) (param) (code . model_not_found))) (error http 404) error https://api.openai.com/v1/completions nil (:error (closure (t) (&rest --cl-rest--)
https://github.com/emacs-openai/codegpt/blob/be35070c133e89fbaa7bccb5a276cb074bf6dc68/codegpt.el#L72
Updating the model resolved the issue
(use-package codegpt :ensure t :config (setq codegpt-model "gpt-3.5-turbo-instruct"))
The default model
text-davinci-003
has been deprecated. This causescodegpt
command to fail. Running openapi with debug-mode shows the error message:https://github.com/emacs-openai/codegpt/blob/be35070c133e89fbaa7bccb5a276cb074bf6dc68/codegpt.el#L72
Updating the model resolved the issue