Ollama Setup

This commit is contained in:
Aidan Do 2024-12-17 09:49:34 +11:00
parent 20383bfea5
commit 3b844afd00
3 changed files with 14 additions and 5 deletions

4
.gitignore vendored
View file

@ -18,3 +18,7 @@ Package.resolved
.vscode
_build
docs/src
env/
envs/
.envrc

View file

@ -48,10 +48,10 @@ model_aliases = [
"llama3.1:8b-instruct-fp16",
CoreModelId.llama3_1_8b_instruct.value,
),
build_model_alias_with_just_provider_model_id(
"llama3.1:8b",
CoreModelId.llama3_1_8b_instruct.value,
),
# build_model_alias_with_just_provider_model_id(
# "llama3.1:8b",
# CoreModelId.llama3_1_8b_instruct.value,
# ),
build_model_alias(
"llama3.1:70b-instruct-fp16",
CoreModelId.llama3_1_70b_instruct.value,
@ -347,7 +347,7 @@ class OllamaInferenceAdapter(Inference, ModelsProtocolPrivate):
)
return model
model = await self.register_helper.register_model(model)
models = await self.client.ps()
models = await self.client.list()
available_models = [m["model"] for m in models["models"]]
if model.provider_resource_id not in available_models:
raise ValueError(

View file

@ -79,6 +79,11 @@ models:
provider_id: ollama
provider_model_id: null
model_type: llm
- metadata: {}
model_id: Llama-3.2-3B-Instruct
provider_id: ollama
provider_model_id: null
model_type: llm
- metadata:
embedding_dimension: 384
model_id: all-MiniLM-L6-v2