This commit is contained in:
justumen
2024-11-22 12:30:00 +01:00
parent 840e62d00c
commit 0673c134d5
46 changed files with 1629 additions and 410 deletions

21
ollama_config_selector.py Normal file
View File

@@ -0,0 +1,21 @@
class OllamaConfig:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"ollama_url": ("STRING", {"default": "http://0.0.0.0:11434"}),
"model_name": ("STRING", {"default": "undefined"}) # Empty list with no default
}
}
RETURN_TYPES = ("OLLAMA_CONFIG",)
RETURN_NAMES = ("OLLAMA_CONFIG",)
FUNCTION = "select_model"
CATEGORY = "ollama"
def select_model(self, ollama_url, model_name):
return ({"model": model_name, "url": ollama_url},)
@classmethod
def IS_CHANGED(cls, ollama_url, model_name) -> float:
return 0.0