You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Create a JSON payload using jq to handle special characters
125
110
json_payload=$(jq -n --arg input "$input" '{
126
-
model: "'$MODEL_NAME'",
111
+
model: "'$OPENAI_MODEL'",
127
112
messages: [
128
113
{
129
114
role: "system",
130
-
content: "You are LocalAI-bot. Write a twitter message to notify everyone about the new model from the git diff. Make it informal and really short. An example can include: the name, and a brief description of the model if exists. Also add an hint on how to install it in LocalAI. For example: local-ai run model_name_here"
115
+
content: "You are LocalAI-bot. Write a short, twitter message to notify everyone about the new model from the git diff. Make it informal and really short, less than 250 characters. An example can include: the name, and a brief description of the model if exists. Also add an hint on how to install it in LocalAI. For example: local-ai run model_name_here"
131
116
},
132
117
{
133
118
role: "user",
@@ -136,16 +121,16 @@ jobs:
136
121
]
137
122
}')
138
123
139
-
# Send the request to LocalAI
140
-
response=$(curl -s -X POST $API_URL \
124
+
# Send the request to OpenAI API
125
+
response=$(curl -s -X POST $OPENAI_BASE_URL/chat/completions \
0 commit comments