mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-11 15:15:18 +02:00
fixbug: summary too long
This commit is contained in:
parent
3112680324
commit
2647995411
1 changed files with 2 additions and 1 deletions
|
|
@ -233,7 +233,8 @@ class OpenAIGPTAPI(BaseGPTAPI, RateLimiter):
|
|||
if len(text) < max_token_count:
|
||||
return await self._get_summary(text, max_words=max_words)
|
||||
|
||||
text_windows = self.split_texts(text, window_size=max_token_count - max_words)
|
||||
padding_size = 20 if max_token_count > 20 else 0
|
||||
text_windows = self.split_texts(text, window_size=max_token_count - padding_size)
|
||||
summaries = []
|
||||
for ws in text_windows:
|
||||
response = await self._get_summary(ws, max_words=max_words)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue