Switch to official ollama library, update models (#122471)
* Switch to mainstream ollama library, update models * Fix mypy error
This commit is contained in:
parent
d7b0d1a50e
commit
3ba2a0518e
5 changed files with 35 additions and 14 deletions
|
@ -86,41 +86,60 @@ MAX_HISTORY_SECONDS = 60 * 60 # 1 hour
|
||||||
MODEL_NAMES = [ # https://ollama.com/library
|
MODEL_NAMES = [ # https://ollama.com/library
|
||||||
"alfred",
|
"alfred",
|
||||||
"all-minilm",
|
"all-minilm",
|
||||||
|
"aya",
|
||||||
"bakllava",
|
"bakllava",
|
||||||
"codebooga",
|
"codebooga",
|
||||||
|
"codegeex4",
|
||||||
"codegemma",
|
"codegemma",
|
||||||
"codellama",
|
"codellama",
|
||||||
"codeqwen",
|
"codeqwen",
|
||||||
|
"codestral",
|
||||||
"codeup",
|
"codeup",
|
||||||
"command-r",
|
"command-r",
|
||||||
"command-r-plus",
|
"command-r-plus",
|
||||||
"dbrx",
|
"dbrx",
|
||||||
"deepseek-coder",
|
"deepseek-coder",
|
||||||
|
"deepseek-coder-v2",
|
||||||
"deepseek-llm",
|
"deepseek-llm",
|
||||||
|
"deepseek-v2",
|
||||||
|
"dolphincoder",
|
||||||
"dolphin-llama3",
|
"dolphin-llama3",
|
||||||
"dolphin-mistral",
|
"dolphin-mistral",
|
||||||
"dolphin-mixtral",
|
"dolphin-mixtral",
|
||||||
"dolphin-phi",
|
"dolphin-phi",
|
||||||
"dolphincoder",
|
|
||||||
"duckdb-nsql",
|
"duckdb-nsql",
|
||||||
"everythinglm",
|
"everythinglm",
|
||||||
"falcon",
|
"falcon",
|
||||||
|
"falcon2",
|
||||||
|
"firefunction-v2",
|
||||||
"gemma",
|
"gemma",
|
||||||
|
"gemma2",
|
||||||
|
"glm4",
|
||||||
"goliath",
|
"goliath",
|
||||||
"llama-pro",
|
"granite-code",
|
||||||
|
"internlm2",
|
||||||
"llama2",
|
"llama2",
|
||||||
"llama2-chinese",
|
"llama2-chinese",
|
||||||
"llama2-uncensored",
|
"llama2-uncensored",
|
||||||
"llama3",
|
"llama3",
|
||||||
|
"llama3-chatqa",
|
||||||
|
"llama3-gradient",
|
||||||
|
"llama3-groq-tool-use",
|
||||||
|
"llama-pro",
|
||||||
"llava",
|
"llava",
|
||||||
|
"llava-llama3",
|
||||||
|
"llava-phi3",
|
||||||
"magicoder",
|
"magicoder",
|
||||||
|
"mathstral",
|
||||||
"meditron",
|
"meditron",
|
||||||
"medllama2",
|
"medllama2",
|
||||||
"megadolphin",
|
"megadolphin",
|
||||||
"mistral",
|
"mistral",
|
||||||
"mistral-openorca",
|
|
||||||
"mistrallite",
|
"mistrallite",
|
||||||
|
"mistral-nemo",
|
||||||
|
"mistral-openorca",
|
||||||
"mixtral",
|
"mixtral",
|
||||||
|
"moondream",
|
||||||
"mxbai-embed-large",
|
"mxbai-embed-large",
|
||||||
"neural-chat",
|
"neural-chat",
|
||||||
"nexusraven",
|
"nexusraven",
|
||||||
|
@ -130,36 +149,38 @@ MODEL_NAMES = [ # https://ollama.com/library
|
||||||
"nous-hermes",
|
"nous-hermes",
|
||||||
"nous-hermes2",
|
"nous-hermes2",
|
||||||
"nous-hermes2-mixtral",
|
"nous-hermes2-mixtral",
|
||||||
"open-orca-platypus2",
|
"nuextract",
|
||||||
"openchat",
|
"openchat",
|
||||||
"openhermes",
|
"openhermes",
|
||||||
"orca-mini",
|
"open-orca-platypus2",
|
||||||
"orca2",
|
"orca2",
|
||||||
|
"orca-mini",
|
||||||
"phi",
|
"phi",
|
||||||
"phi3",
|
"phi3",
|
||||||
"phind-codellama",
|
"phind-codellama",
|
||||||
"qwen",
|
"qwen",
|
||||||
|
"qwen2",
|
||||||
"samantha-mistral",
|
"samantha-mistral",
|
||||||
"snowflake-arctic-embed",
|
"snowflake-arctic-embed",
|
||||||
"solar",
|
"solar",
|
||||||
"sqlcoder",
|
"sqlcoder",
|
||||||
"stable-beluga",
|
"stable-beluga",
|
||||||
"stable-code",
|
"stable-code",
|
||||||
"stablelm-zephyr",
|
|
||||||
"stablelm2",
|
"stablelm2",
|
||||||
|
"stablelm-zephyr",
|
||||||
"starcoder",
|
"starcoder",
|
||||||
"starcoder2",
|
"starcoder2",
|
||||||
"starling-lm",
|
"starling-lm",
|
||||||
"tinydolphin",
|
"tinydolphin",
|
||||||
"tinyllama",
|
"tinyllama",
|
||||||
"vicuna",
|
"vicuna",
|
||||||
|
"wizardcoder",
|
||||||
|
"wizardlm",
|
||||||
|
"wizardlm2",
|
||||||
|
"wizardlm-uncensored",
|
||||||
"wizard-math",
|
"wizard-math",
|
||||||
"wizard-vicuna",
|
"wizard-vicuna",
|
||||||
"wizard-vicuna-uncensored",
|
"wizard-vicuna-uncensored",
|
||||||
"wizardcoder",
|
|
||||||
"wizardlm",
|
|
||||||
"wizardlm-uncensored",
|
|
||||||
"wizardlm2",
|
|
||||||
"xwinlm",
|
"xwinlm",
|
||||||
"yarn-llama2",
|
"yarn-llama2",
|
||||||
"yarn-mistral",
|
"yarn-mistral",
|
||||||
|
|
|
@ -8,5 +8,5 @@
|
||||||
"documentation": "https://www.home-assistant.io/integrations/ollama",
|
"documentation": "https://www.home-assistant.io/integrations/ollama",
|
||||||
"integration_type": "service",
|
"integration_type": "service",
|
||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
"requirements": ["ollama-hass==0.1.7"]
|
"requirements": ["ollama==0.3.0"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ class MessageHistory:
|
||||||
@property
|
@property
|
||||||
def num_user_messages(self) -> int:
|
def num_user_messages(self) -> int:
|
||||||
"""Return a count of user messages."""
|
"""Return a count of user messages."""
|
||||||
return sum(m["role"] == MessageRole.USER for m in self.messages)
|
return sum(m["role"] == MessageRole.USER.value for m in self.messages)
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
|
|
|
@ -1463,7 +1463,7 @@ odp-amsterdam==6.0.2
|
||||||
oemthermostat==1.1.1
|
oemthermostat==1.1.1
|
||||||
|
|
||||||
# homeassistant.components.ollama
|
# homeassistant.components.ollama
|
||||||
ollama-hass==0.1.7
|
ollama==0.3.0
|
||||||
|
|
||||||
# homeassistant.components.omnilogic
|
# homeassistant.components.omnilogic
|
||||||
omnilogic==0.4.5
|
omnilogic==0.4.5
|
||||||
|
|
|
@ -1199,7 +1199,7 @@ objgraph==3.5.0
|
||||||
odp-amsterdam==6.0.2
|
odp-amsterdam==6.0.2
|
||||||
|
|
||||||
# homeassistant.components.ollama
|
# homeassistant.components.ollama
|
||||||
ollama-hass==0.1.7
|
ollama==0.3.0
|
||||||
|
|
||||||
# homeassistant.components.omnilogic
|
# homeassistant.components.omnilogic
|
||||||
omnilogic==0.4.5
|
omnilogic==0.4.5
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue