Open e-caste opened 5 months ago
btw, if you want to try integrating Llama into Talk with a command, add this script:
#!/bin/bash
# Check if arguments are provided
if [ "$#" -lt 2 ]; then
echo "Usage: $0 <user_name> <input_string>"
exit 1
fi
# Save the first argument as the user name
user_name="$1"
# Remove the first argument from the array
shift
# Concatenate all remaining arguments into one string
input_string="$*"
# Make the curl request
response=$(curl -s -X POST http://<YOUR_LOCAL_AI_ENDPOINT>/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "llama-3-8b-Instruct.Q5_K_M", "messages": [{"role": "user", "content": "'"$input_string"'"}], "temperature": 0.1}')
# Extract the assistant's content from the response using Python
assistant_content=$(echo $response | python -c "import sys, json; print(json.load(sys.stdin)['choices'][0]['message']['content'].strip())")
echo "$user_name:"
echo "> $input_string"
echo
# Print the assistant's content
echo $assistant_content
and add the command:
docker exec -it -u www-data nextcloud-aio-nextcloud php occ talk:command:add ai llama "/var/www/html/talk-bot/call_local_ai_api.sh {USER} {ARGUMENTS}" 2 2
Is your feature request related to a problem? Please describe. Is there any plan to integrate Nextcloud Assistant within Talk iOS? I see 3 main use cases:
Describe the solution you'd like LLamaTalk. Or TalkGPT. Anyway, easy access to LLMs within Talk iOS.
Describe alternatives you've considered Writing a custom Talk bot, using other services.
Additional context 🤖😎