diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-07-17 12:48:10 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-07-17 12:48:10 -0700 |
commit | 6d5c07240763b985a32bdb554d600c7423698497 (patch) | |
tree | 5cd145acff6f11feed7d3c41acf23ba0a96a1782 /continuedev/src | |
parent | e65a15f50d226acd802ffc580306e1477394ffe0 (diff) | |
download | sncontinue-6d5c07240763b985a32bdb554d600c7423698497.tar.gz sncontinue-6d5c07240763b985a32bdb554d600c7423698497.tar.bz2 sncontinue-6d5c07240763b985a32bdb554d600c7423698497.zip |
float -> int hot fix
Diffstat (limited to 'continuedev/src')
-rw-r--r-- | continuedev/src/continuedev/steps/core/core.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/continuedev/src/continuedev/steps/core/core.py b/continuedev/src/continuedev/steps/core/core.py index ea09f475..2b049ecc 100644 --- a/continuedev/src/continuedev/steps/core/core.py +++ b/continuedev/src/continuedev/steps/core/core.py @@ -162,7 +162,8 @@ class DefaultModelEditCodeStep(Step): if self._previous_contents.strip() == self._new_contents.strip(): description = "No edits were made" else: - changes = '\n'.join(difflib.ndiff(self._previous_contents.splitlines(), self._new_contents.splitlines())) + changes = '\n'.join(difflib.ndiff( + self._previous_contents.splitlines(), self._new_contents.splitlines())) description = await models.gpt3516k.complete(dedent(f"""\ Diff summary: "{self.user_input}" @@ -181,8 +182,8 @@ class DefaultModelEditCodeStep(Step): # We care because if this prompt itself goes over the limit, then the entire message will have to be cut from the completion. # Overflow won't happen, but prune_chat_messages in count_tokens.py will cut out this whole thing, instead of us cutting out only as many lines as we need. model_to_use = sdk.models.default - max_tokens = MAX_TOKENS_FOR_MODEL.get( - model_to_use.name, DEFAULT_MAX_TOKENS) / 2 + max_tokens = int(MAX_TOKENS_FOR_MODEL.get( + model_to_use.name, DEFAULT_MAX_TOKENS) / 2) TOKENS_TO_BE_CONSIDERED_LARGE_RANGE = 1200 if model_to_use.count_tokens(rif.contents) > TOKENS_TO_BE_CONSIDERED_LARGE_RANGE: |