Created
May 27, 2025 09:23
-
-
Save pleabargain/435bece281eb0efb83c6344afd3d4730 to your computer and use it in GitHub Desktop.
run llama 3.2 locally get prompt and save output to file locally
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prompt user for the prompt to Llama3.2 | |
$llamaPrompt = Read-Host "Enter your prompt for Llama3.2" | |
# Take the first 10 characters of the prompt and remove all spaces | |
$filename = ($llamaPrompt.Substring(0, [Math]::Min(10, $llamaPrompt.Length))).Replace(" ", "") | |
# Set the desktop path | |
$desktopPath = [System.IO.Path]::Combine($env:USERPROFILE, "Desktop") | |
$filePath = "$desktopPath\$filename.txt" | |
# Run Ollama with Llama3.2 and save output to the specified file | |
ollama run llama3.2 "$llamaPrompt" >> "$filePath" | |
Write-Output "Saved to $filePath" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment