agentitive / agentitive/spellbound

Spellbound spams the endpoint when context length is exceeded.

Đang mở
#44 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
22
Fork
2
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Right now, we don't detect the context length error properly:

```
Unexpected chunk: {
"error": {
"message": "This model's maximum context length is 8192 tokens. However, your messages resulted in 9074 tokens. Please reduce the length of the messages.",
"type": "invalid_request_error",
"param": "messages",
"code": "context_length_exceeded"
}
}
```

Since we retry this error, we end up accidentally causing a rate limit problem:

```
Unexpected chunk: {
"error": {
"message": "Rate limit reached for default-gpt-4 in organization org-XXXXX on tokens per min. Limit: 40000 / min. Please try again in 1ms. Contact us through our help center at help.openai.com if you continue to have issues.",
"type": "tokens",
"param": null,
"code": null
}
}
```

This error is not handled correctly either.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.