explosion / explosion/spacy-llm
Connection time out with OpenAI API
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 110
- PR merge metrics
- No merged PRs in 30d
Description
I really like spacy-llm but it is impossible for me to use it. I keep having connection time out with a working API key from OpenAI and after spending much time at setting all the framework finding this is very frustrating.
Here's the error and my config file. Thank you for any help.
# Time out Error
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=30.0)
During handling of the above exception, another exception occurred:
raise TimeoutError(
TimeoutError: Request time out. Check your network connection and the API's availability.
# Config.cfg
`[paths]
examples = null
[nlp]
lang = "en"
pipeline = ["llm", "llm_rel"]
[components]
# Named Entity Recognition Component
[components.llm]
factory = "llm"
[components.llm.task]
@llm_tasks = "spacy.NER.v2"
labels = [##]
[components.llm.task.template]
@misc = "spacy.FileReader.v1"
path = "templates//ner_v2.jinja"
[components.llm.task.label_definitions]
##
[components.llm.model]
@llm_models = "spacy.GPT-3-5.v3"
name = "gpt-3.5-turbo-16k-0613"
config = {"temperature": 0.0, "top_p": 0.0}
max_request_time = 30.0
[components.llm.cache]
@llm_misc = "spacy.BatchCache.v1"
path = "local-cache"
batch_size = 20
max_batches_in_mem = 500
# Relationship Extraction Component
[components.llm_rel]
factory = "llm"
[components.llm_rel.task]
@llm_tasks = "spacy.REL.v1"
labels = [##]
[components.llm_rel.task.label_definitions]
##
[components.llm_rel.model]
@llm_models = "spacy.GPT-3-5.v3"
name = "gpt-3.5-turbo-16k-0613"
config = {"temperature": 0.0, "top_p": 0.0}
max_request_time = 30.0`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.