-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input Length Exceeds Maximum Limit in LLama:8B Model API (Deep Infra) #395
Comments
@sanchitsingh001 I assume you are using the LLM extraction strategy, such limits relates to the model. However, you can fix the issue in certain ways. The LLM extraction strategy can chunk the content into smaller sizes, send each chunk to the LLM in parallel, and then combine the results. You can't adjust that threshold size. Share with me your codesnippet and the URL, and I will show you how to do that. I am working on a set of new documents where I explain the different strategies you can use. It is currently in draft mode. I will give you the links so you can check them and get some ideas. https://github.com/unclecode/crawl4ai/blob/main/docs/md_v3/tutorials/json-extraction-basic.md |
Thank you for your detailed response and for sharing the helpful documentation links. I have attached the requested code snippet and the product page URL for reference. To provide more context, I primarily scrape e-commerce websites like Amazon and eBay to extract product details. However, I have encountered some challenges: Hallucinated Responses: The structured data returned often includes hallucinated entries. For example, if I provide a page containing a single product, the response may include a list of products that do not exist. Is using a more advanced LLM the only way to ensure highly accurate and reliable structured data? Here's my code: Define the schema for product detailsclass ProductDetails(BaseModel): Function to extract product details from the webpageasync def extract_product_details():
asyncio.run(extract_product_details()) |
@sanchitsingh001 You're welcom, sure I will take a look on this, coming weekend. |
Thank You |
Here's a clearer version of your message:
Hi,
I am using Deep Infra's model API, specifically the LLama:8B model, to scrape product data from e-commerce websites. However, for certain websites like amazon etc, I encounter the following error:
json
Copy code
{
"index": 0,
"error": true,
"tags": [
"error"
],
"content": "litellm.APIError: APIError: DeepinfraException - Error code: 500 - {'error': {'message': 'Requested input length 10452 exceeds maximum input length 8191'}}"
}
Is there a way to increase the input length, or can the model's structure handle longer inputs? If not, do you recommend any strategies for managing this limitation?
The text was updated successfully, but these errors were encountered: