Kav-K/GPTDiscord

[BUG] New openai models not usable

Paillat-dev opened this issue · 2 comments

Describe the bug
When using the new preview models with /internet search for example, an error is raised

To Reproduce
Steps to reproduce the behaviour:

  1. Use /internet search with gpt-4-vision-preview

Expected behaviour
Get a response

Additional context

  File "c:\Users\<REDACTED>\Documents\GitHub\GPTDiscord\venv\lib\site-packages\llama_index\llms\openai_utils.py", line 219, in openai_modelname_to_contextsize
    raise ValueError(
ValueError: Unknown model 'gpt-4-1106-preview'. Please provide a valid OpenAI model name in: gpt-4, gpt-4-32k, gpt-4-0613, gpt-4-32k-0613, gpt-4-0314, gpt-4-32k-0314, gpt-3.5-turbo, gpt-3.5-turbo-16k, gpt-3.5-turbo-0613, gpt-3.5-turbo-16k-0613, gpt-3.5-turbo-0301, text-davinci-003, text-davinci-002, gpt-3.5-turbo-instruct, text-ada-001, text-babbage-001, text-curie-001, ada, babbage, curie, davinci, gpt-35-turbo-16k, gpt-35-turbo

Ty, will look into it

Just tested this out, seems to work for me