Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

Commit

Permalink
修复计量错误
Browse files Browse the repository at this point in the history
  • Loading branch information
sudoskys committed Mar 3, 2023
1 parent 16a68b2 commit 2173fb8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/llm_kira/client/Optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ def run(self) -> List[Interaction]:
_knowledge_token_limit = int(self.token_limit * self.reference_ratio)
_interaction_token_limit = self.token_limit - _knowledge_token_limit

# Cost - Head = Body
_desc_cost = self.tokenizer(str(self.desc))
_interaction_token_limit = _interaction_token_limit - _desc_cost

# Desc
_returner = [Interaction(single=True, ask=PromptItem(start="system", text=self.desc))]

Expand Down

0 comments on commit 2173fb8

Please sign in to comment.