Spaces:
Runtime error
Runtime error
| #!/usr/bin/expect | |
| # Set the timeout to 300 seconds (5 minutes) | |
| set timeout 1200 | |
| # Start the llama-cli command with absolute paths | |
| spawn /home/user/code/models/llama.cpp/llama-cli -c 12000 -m /home/user/code/models/xLAM-2-3B-fc-r-Q8_0.gguf --prompt-cache /home/user/code/models/context-xlam-2.gguf -f /home/user/code/models/system_prompt_xlam_2 -r "<|im_end|>" -no-cnv -sp -i --temp 0 --simple-io | |
| # Wait for the expected output | |
| expect { | |
| "\}\]<|im_end|>" { | |
| # Send Ctrl+C to terminate the command | |
| send \x03 | |
| exp_continue | |
| } | |
| eof { | |
| # Exit when the command ends | |
| exit 0 | |
| } | |
| timeout { | |
| # Exit if the command takes too long | |
| send_user "Timeout occurred. Exiting...\n" | |
| exit 1 | |
| } | |
| } | |