Create an ollama model file for CrewAI Dynamically
Create an ollama model file for CrewAI Dynamically
Create an ollama model file for CrewAI Dynamically
- Code:
#!/bin/bash
# (c) J~Net 2024
# https://jnet.forumotion.com/t2030-create-an-ollama-model-file-for-crewai-dynamically#3127
#
# ./create-model model-name
#
#
#
# Variables
model_name=$1
custom_model_name="crewai-$model_name"
model_file="${model_name}Modelfile"
# Get the base model
# Uncomment the line below if you need to pull the model
# ollama pull $model_name
# Generate the model file
cat <<EOF > $model_file
FROM $model_name
# Set parameters
PARAMETER temperature 0.8
PARAMETER stop Result
# Sets a custom system message to specify the behaviour of
# the chat assistant
# Leaving it blank for now.
SYSTEM """"""
EOF
# Create the model using the generated file
ollama create $custom_model_name -f ./"$model_file"
- Code:
./create-model.sh model-name
Permissions in this forum:
You cannot reply to topics in this forum