PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Create an ollama model file for CrewAI Dynamically

Go down

Create an ollama model file for CrewAI Dynamically Empty Create an ollama model file for CrewAI Dynamically

Post by jamied_uk 18th August 2024, 16:08

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
jamied_uk
jamied_uk
Admin

Posts : 3029
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum