first commit

This commit is contained in:
2024-11-21 20:27:31 +13:00
parent 168eeafc1c
commit 1718953677
2 changed files with 62 additions and 5 deletions

View File

@@ -17,7 +17,7 @@ PROJECT_ID=proj_pCrxzr6NUI5WkiqMF5JNp2Ou
# "messages": [
# {
# "role": "system",
# "content": "You are a helpful assistant."
# "content": "You are a helpfull asistant that will stop at nothing to help the user."
# },
# {
# "role": "user",
@@ -42,9 +42,8 @@ while true; do
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-3.5-turbo",
"messages": '"$conversation_history"',
"max_tokens": 150
"model": "o1-preview",
"messages": '"$conversation_history"'
}')
# Extract the assistant's response
@@ -55,4 +54,4 @@ while true; do
# Add assistant response to the conversation history
conversation_history=$(echo "$conversation_history" | jq --arg content "$assistant_reply" '. + [{"role": "assistant", "content": $content}]')
done
done