diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-08-26 10:10:06 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-08-26 10:10:06 -0700 |
commit | 044b7caa6b26a5d78ae52faa0ae675abc8c4e161 (patch) | |
tree | 5727da03069cc6bf83b9dd385003f615124e6fe8 /continuedev/src/continuedev/core | |
parent | 631d141dbd26edb0de3e0e3ed194dbfd3641059f (diff) | |
download | sncontinue-044b7caa6b26a5d78ae52faa0ae675abc8c4e161.tar.gz sncontinue-044b7caa6b26a5d78ae52faa0ae675abc8c4e161.tar.bz2 sncontinue-044b7caa6b26a5d78ae52faa0ae675abc8c4e161.zip |
feat: :sparkles: select model from dropdown
Diffstat (limited to 'continuedev/src/continuedev/core')
-rw-r--r-- | continuedev/src/continuedev/core/models.py | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/continuedev/src/continuedev/core/models.py b/continuedev/src/continuedev/core/models.py index e4610d36..a8c97622 100644 --- a/continuedev/src/continuedev/core/models.py +++ b/continuedev/src/continuedev/core/models.py @@ -1,8 +1,15 @@ -from typing import Optional +from typing import List, Optional from pydantic import BaseModel from ..libs.llm import LLM +from ..libs.llm.anthropic import AnthropicLLM +from ..libs.llm.ggml import GGML +from ..libs.llm.maybe_proxy_openai import MaybeProxyOpenAI +from ..libs.llm.ollama import Ollama +from ..libs.llm.openai import OpenAI +from ..libs.llm.replicate import ReplicateLLM +from ..libs.llm.together import TogetherLLM class ContinueSDK(BaseModel): @@ -18,6 +25,29 @@ ALL_MODEL_ROLES = [ "chat", ] +MODEL_CLASSES = { + cls.__name__: cls + for cls in [ + OpenAI, + MaybeProxyOpenAI, + GGML, + TogetherLLM, + AnthropicLLM, + ReplicateLLM, + Ollama, + ] +} + +MODEL_MODULE_NAMES = { + "OpenAI": "openai", + "MaybeProxyOpenAI": "maybe_proxy_openai", + "GGML": "ggml", + "TogetherLLM": "together", + "AnthropicLLM": "anthropic", + "ReplicateLLM": "replicate", + "Ollama": "ollama", +} + class Models(BaseModel): """Main class that holds the current model configuration""" @@ -29,6 +59,8 @@ class Models(BaseModel): edit: Optional[LLM] = None chat: Optional[LLM] = None + unused: List[LLM] = [] + # TODO namespace these away to not confuse readers, # or split Models into ModelsConfig, which gets turned into Models sdk: ContinueSDK = None |