float -> int hot fix
This commit is contained in:
parent
436225436e
commit
36a2b72db5
3 changed files with 7 additions and 6 deletions
|
|
@ -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:
|
||||
|
|
|
|||
4
extension/package-lock.json
generated
4
extension/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "continue",
|
||||
"version": "0.0.177",
|
||||
"version": "0.0.178",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "continue",
|
||||
"version": "0.0.177",
|
||||
"version": "0.0.178",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@electron/rebuild": "^3.2.10",
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
"displayName": "Continue",
|
||||
"pricing": "Free",
|
||||
"description": "The open-source coding autopilot",
|
||||
"version": "0.0.177",
|
||||
"version": "0.0.178",
|
||||
"publisher": "Continue",
|
||||
"engines": {
|
||||
"vscode": "^1.67.0"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue