cmooredev / RepoReader

Explore and ask questions about a GitHub code repository using OpenAI's GPT.
158 stars 77 forks source link

The model `text-davinci-003` has been deprecated #9

Closed nandni22jain closed 2 months ago

nandni22jain commented 2 months ago

The Error I am facing is :

Repository cloned. Indexing files...
WARNING! api_key is not default parameter.
                    api_key was transfered to model_kwargs.
                    Please confirm that api_key is what you intended.

Ask a question about the repository (type 'exit()' to quit): what is this repo doing?
Thinking...
/Users/najain/RepoReader/reporeader/lib/python3.11/site-packages/sklearn/feature_extraction/text.py:528: UserWarning: The parameter 'token_pattern' will not be used since 'tokenizer' is not None'
  warnings.warn(
An error occurred: The model `text-davinci-003` has been deprecated, learn more here: https://platform.openai.com/docs/deprecations
  1. Tried changing model_name in config.py, from "gpt-3.5-turbo" to "gpt-3.5-turbo-instruct"
  2. openai==0.27.4 to openai==0.28.1, but it didn't help.
nandni22jain commented 2 months ago

fixed! updated llm = OpenAI(api_key=OPENAI_API_KEY, temperature=0.2, model_name="gpt-3.5-turbo-instruct")