Skip to content
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

[Bug]: No token limit was applied to the context when sending knowledge base content #951

Closed
1 task done
fungaegis opened this issue May 28, 2024 · 0 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@fungaegis
Copy link

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch name

main

Commit ID

196f2b4

Other environment information

No response

Actual behavior

携带知识库未对上下文做token限制, 导致经常出现 上下文超限
image

Expected behavior

对上下文进行限制, 动态删除过多的知识库内容, 避免触发上下文限制

Steps to reproduce

当chunk块过大时, 召回容易出现过载

api.db.services.dialog_service.message_fit_in 做了上下文限制, 但该上下文只对历史上下文做了限制

api.db.services.dialog_service.chat 168行 向openai请求时并未对召回的内容做限制

Additional information

No response

@fungaegis fungaegis added the bug Something isn't working label May 28, 2024
KevinHuSh added a commit that referenced this issue May 29, 2024
### What problem does this PR solve?

#951 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
Halfknow pushed a commit to Halfknow/ragflow that referenced this issue Nov 13, 2024
…#962)

### What problem does this PR solve?

infiniflow#951 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants