Comments (3)
Hi @pecto2020, this seems like you're experiencing connection issues with the OpenAI API. Under which circumstances does this happen?
from spacy-llm.
Hi @rmitsch , the issue arises when I process multiple texts, each around 4,000 tokens in size. I attempted to adjust the batch parameters in the configuration to address this, but I continued to encounter the same error. Currently, I've adapted my approach to process the text files individually, sending them to OpenAI one at a time for named entity recognition and relationship extraction. Added also sleep(5) after each iteration. Yet, the time request error persists. Additionally, I've noticed that sometimes the GPT's raw output presents labels in bullet points, as opposed to being comma-separated. It appears that when this formatting occurs, the likelihood of a time request error increases, though I'm not sure of a direct correlation (I see they are not correctly parsed by spacy-llm, so basically the information extracted by the model is lost with an empty json or I got time error request)
Is there anything else you'd like to know about the circumstances?
from spacy-llm.
the issue arises when I process multiple texts, each around 4,000 tokens in size. I attempted to adjust the batch parameters in the configuration to address this, but I continued to encounter the same error.
You're running into rate limitations on OpenAI's side. Unfortunately there isn't anything we can do about that. The batch size config won't make a difference here, but you'll want to experiment with interval
and max_request_time
.
Additionally, I've noticed that sometimes the GPT's raw output presents labels in bullet points, as opposed to being comma-separated. It appears that when this formatting occurs, the likelihood of a time request error increases, though I'm not sure of a direct correlation
I don't see a correlation here either. LLM output is not guaranteed to be consistent. Setting temperature
to 0 is usually a good start, if you haven't done that yet.
from spacy-llm.
Related Issues (20)
- FileNotFoundError: [Errno 2] No such file or directory: 'local-ner-cache/9963044417883968883.spacy' HOT 3
- [Warning] the current text generation call will exceed the model's predefined maximum length (4096). HOT 2
- Bug: Custom Endpoint Validation Breaks Feature Support HOT 1
- Working dummy example for custom LLM endpoint integration HOT 1
- spacy-llm custom task configuration HOT 5
- How to surpass BERT through large models HOT 1
- Many returns are not what I want HOT 1
- out put with llm in a string?
- Entity extraction and mapping
- Can't use Gpt4 models
- ValueError: max() arg is an empty sequence
- Potential REL sharding issue HOT 3
- How to write the correct config file for GPT4All? HOT 1
- How to load a model that's not supported by spacy RestAPI nor HF? HOT 1
- I have downloaded the llama2 model to local path, but program always try downloaded the llama2 from huggingface
- A tutorial to integrate other open-source LLMs on HF HOT 1
- GPT4ALL basically all the small models reply mess up the parser HOT 1
- GPT4 context_length is not working
- Few-Shot Relationship Extraction Example Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spacy-llm.