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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Ollama Pull Model</title> | |
| <style> | |
| body { font-family: sans-serif; margin: 2em; } | |
| #result { margin-top: 1em; white-space: pre-wrap; } | |
| button { margin-top: 1em; } | |
| </style> |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Ollama Model List</title> | |
| <style> | |
| body { font-family: sans-serif; margin: 2em; } | |
| #models { margin-top: 1em; } | |
| .error { color: red; } | |
| </style> |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Ollama Chat</title> | |
| <style> | |
| body { font-family: sans-serif; background: #f0f0f0; } | |
| #chat { max-width: 500px; margin: 40px auto; background: #fff; padding: 10px; border-radius: 6px; } | |
| #log { min-height: 100px; margin-bottom: 10px; } | |
| input { width: 70%; padding: 6px; } |
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
| $response = Invoke-WebRequest -Method Post -Uri [all the other stuff here] | |
| # If response.Content is byte array: | |
| $decoded = [System.Text.Encoding]::UTF8.GetString($response.RawContentStream.ToArray()) | |
| Write-Output $decoded |
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
| jq 'map( | |
| if type == "array" then | |
| "[" + (.[0:5] | map(tostring) | join(", ")) + (if length > 5 then ", ..." else "" end) + "] (array, len=" + (length|tostring) + ")" | |
| elif type == "object" then | |
| "{ " + (to_entries[0:5] | map("\(.key): \(.value|tostring)") | join(", ")) + (if (to_entries | length) > 5 then ", ..." else "" end) + " } (object, keys=" + (keys|length|tostring) + ")" | |
| else | |
| (. | tostring) + " (" + (type) + ")" | |
| end | |
| )' file.json |
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
| Test |