Created
September 13, 2024 09:38
-
-
Save gitlawr/17232be7c3735d5566ddff6313477dda to your computer and use it in GitHub Desktop.
chat.ps1
This file contains 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
$body = @{ | |
model = "Qwen" | |
messages = @( | |
@{ | |
role = "user" | |
content = "tell me a joke" | |
} | |
) | |
stream = $false | |
} | |
Invoke-RestMethod -Uri "http://localhost:41011/v1/chat/completions" ` | |
-Method Post ` | |
-Headers @{ "Content-Type" = "application/json" } ` | |
-Body ($body | ConvertTo-Json) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment