summaryrefslogtreecommitdiff
path: root/server/continuedev/core
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2023-10-19 00:04:44 -0700
committerTuowen Zhao <ztuowen@gmail.com>2023-10-19 00:04:44 -0700
commit2128f5fe9386dcf2f0597c8035f951c5b60d7562 (patch)
treeac3ab65a87bd4971275ae91d7b61176eced13774 /server/continuedev/core
parent08f38574fa2633bbf709d24e1c79417d4285ba61 (diff)
downloadsncontinue-2128f5fe9386dcf2f0597c8035f951c5b60d7562.tar.gz
sncontinue-2128f5fe9386dcf2f0597c8035f951c5b60d7562.tar.bz2
sncontinue-2128f5fe9386dcf2f0597c8035f951c5b60d7562.zip
cleanup server
Diffstat (limited to 'server/continuedev/core')
-rw-r--r--server/continuedev/core/config.py12
-rw-r--r--server/continuedev/core/models.py31
-rw-r--r--server/continuedev/core/steps.py7
3 files changed, 11 insertions, 39 deletions
diff --git a/server/continuedev/core/config.py b/server/continuedev/core/config.py
index 2bbb42cc..bf555b59 100644
--- a/server/continuedev/core/config.py
+++ b/server/continuedev/core/config.py
@@ -2,7 +2,7 @@ from typing import Dict, List, Optional, Type
from pydantic import BaseModel, Field, validator
-from ..libs.llm.openai_free_trial import OpenAIFreeTrial
+from ..libs.llm import Ollama
from .context import ContextProvider
from .main import Policy, Step
from .models import Models
@@ -48,8 +48,14 @@ class ContinueConfig(BaseModel):
)
models: Models = Field(
Models(
- default=OpenAIFreeTrial(model="gpt-4"),
- summarize=OpenAIFreeTrial(model="gpt-3.5-turbo"),
+ default=Ollama(
+ title="CodeLlama-7b-Instruct",
+ model="codellama:7b-instruct"
+ ),
+ summarize=Ollama(
+ title="CodeLlama-7b-Instruct",
+ model="codellama:7b-instruct"
+ )
),
description="Configuration for the models used by Continue. Read more about how to configure models in the documentation.",
)
diff --git a/server/continuedev/core/models.py b/server/continuedev/core/models.py
index 21ebd8f6..c31177b9 100644
--- a/server/continuedev/core/models.py
+++ b/server/continuedev/core/models.py
@@ -2,18 +2,9 @@ from typing import List, Optional
from pydantic import BaseModel
-from ..libs.llm.anthropic import AnthropicLLM
from ..libs.llm.base import LLM
-from ..libs.llm.ggml import GGML
-from ..libs.llm.google_palm_api import GooglePaLMAPI
-from ..libs.llm.hf_inference_api import HuggingFaceInferenceAPI
-from ..libs.llm.hf_tgi import HuggingFaceTGI
from ..libs.llm.llamacpp import LlamaCpp
from ..libs.llm.ollama import Ollama
-from ..libs.llm.openai import OpenAI
-from ..libs.llm.openai_free_trial import OpenAIFreeTrial
-from ..libs.llm.replicate import ReplicateLLM
-from ..libs.llm.together import TogetherLLM
class ContinueSDK(BaseModel):
@@ -30,32 +21,14 @@ ALL_MODEL_ROLES = [
MODEL_CLASSES = {
cls.__name__: cls
for cls in [
- OpenAI,
- OpenAIFreeTrial,
- GGML,
- TogetherLLM,
- AnthropicLLM,
- ReplicateLLM,
Ollama,
- LlamaCpp,
- HuggingFaceInferenceAPI,
- HuggingFaceTGI,
- GooglePaLMAPI,
+ LlamaCpp
]
}
MODEL_MODULE_NAMES = {
- "OpenAI": "openai",
- "OpenAIFreeTrial": "openai_free_trial",
- "GGML": "ggml",
- "TogetherLLM": "together",
- "AnthropicLLM": "anthropic",
- "ReplicateLLM": "replicate",
"Ollama": "ollama",
- "LlamaCpp": "llamacpp",
- "HuggingFaceInferenceAPI": "hf_inference_api",
- "HuggingFaceTGI": "hf_tgi",
- "GooglePaLMAPI": "google_palm_api",
+ "LlamaCpp": "llamacpp"
}
diff --git a/server/continuedev/core/steps.py b/server/continuedev/core/steps.py
index 5c20dd15..110a4457 100644
--- a/server/continuedev/core/steps.py
+++ b/server/continuedev/core/steps.py
@@ -5,7 +5,6 @@ from textwrap import dedent
from typing import Coroutine, List, Optional, Union
from ..libs.llm.base import LLM
-from ..libs.llm.openai_free_trial import OpenAIFreeTrial
from ..libs.util.count_tokens import DEFAULT_MAX_TOKENS
from ..libs.util.devdata import dev_data_logger
from ..libs.util.strings import (
@@ -229,12 +228,6 @@ class DefaultModelEditCodeStep(Step):
+ max_tokens
)
- # If using 3.5 and overflows, upgrade to 3.5.16k
- if model_to_use.model == "gpt-3.5-turbo":
- if total_tokens > model_to_use.context_length:
- model_to_use = OpenAIFreeTrial(model="gpt-3.5-turbo-0613")
- await sdk.start_model(model_to_use)
-
# Remove tokens from the end first, and then the start to clear space
# This part finds the start and end lines
full_file_contents_lst = full_file_contents.split("\n")