- 
                Notifications
    You must be signed in to change notification settings 
- Fork 317
Closed
Description
Last 1 Keys:
Ctrl+v
Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: top
Actual value was -22.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.Paste(Nullable1 key, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
PS C:\Users\Solomon\TSP> $headers = @{
"Content-Type" = "application/json" "Authorization" = "Bearer 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"}
$body = @{
"messages" = @(
@{
"role" = "system"
"content" = "You are a test assistant."
},
"role" = "user"
"content" = "Testing. Just say hi and nothing else."
}
)
"model" = "gpt-4o-mini"
} | ConvertTo-JsonInvoke-WebRequest -Uri "https://api.openai.com/v1/chat/completions" -Method Post -Headers $headers -Body $body
Invoke-WebRequest : { "error": { "message": "You exceeded your current quota, please check
your plan and billing details. For more information on this error, read the docs:
https://platform.openai.com/docs/guides/error-codes/api-errors.", "type":
"insufficient_quota", "param": null, "code": "insufficient_quota" } }
At line:20 char:1
- Invoke-WebRequest -Uri "https://api.openai.com/v1/chat/completions" - ...
- 
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [ Invoke-WebRequest], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.In vokeWebRequestCommand
Metadata
Metadata
Assignees
Labels
No labels