explosion / explosion/spacy-llm

Can't use Gpt4 models

Open
#448 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.4k
Forks
110
PR merge metrics
No merged PRs in 30d

Description

I'm trying to use spacy with gpt4-turbo, but there is no way for me to run anything as I always get the same error:
```
spacy_llm/models/rest/openai/model.py", line 67, in _verify_auth
raise ValueError(
ValueError: The specified model 'gpt-4-turbo-0125' is not available. Choices are: ['babbage-002', 'dall-e-2', 'dall-e-3', 'davinci-002', 'gpt-3.5-turbo', 'gpt-3.5-turbo-0125', 'gpt-3.5-turbo-0301', 'gpt-3.5-turbo-0613', 'gpt-3.5-turbo-1106', 'gpt-3.5-turbo-16k', 'gpt-3.5-turbo-16k-0613', 'gpt-3.5-turbo-instruct', 'gpt-3.5-turbo-instruct-0914', 'text-embedding-3-large', 'text-embedding-3-small', 'text-embedding-ada-002', 'tts-1', 'tts-1-1106', 'tts-1-hd', 'tts-1-hd-1106', 'whisper-1']
```

I'm using spacy-llm version 0.7.1 (presumably the latest) and in my spacy config.cfg file I have:
```
[nlp]
lang = "en"
pipeline = ["llm"]

[components]

[components.llm]
factory = "llm"

[components.llm.task]
@llm_tasks = "spacy.TextCat.v3"
labels = ["COMPLIMENT", "INSULT"]

[components.llm.model]
@llm_models = "spacy.GPT-4.v3"
name = "gpt-4-turbo-0125"
```
Any clue of what's happening? Thank you!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in spacy_llm/models/rest/openai/model.py at _verify_auth and compare its model validation with the gpt-4-turbo-0125 value in the provided config.cfg. Reproduce the error with spacy-llm 0.7.1 and check how the available-model list is obtained; done means supported GPT-4 model names are handled consistently or the limitation is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.