Accessing Jibber AI (Docker) using PowerShell
To access Jibber AI in Docker from PowerShell, you can use the Invoke-RestMethod command.
Here are the basic steps to get you started:
Here's an example using Invoke-RestMethod:
Function Analyze-Text-Docker([string]$Text)
{
$headers=@{}
$body = @"
{
"features": {
"sentiment": true,
"keyword": true,
"summary": true,
"entities": true,
"pii": true
},
"token": "my-license-token-from-jibber-ai",
"text": "$Text"
}
"@
$response = Invoke-RestMethod -Uri 'http://my-docker-server-name:5000/analyze' -Method POST -Headers $headers -Body $body -ContentType "application/json"
return $response
}
$result = Analyze-Text-Docker "My name is Julia Peach and I live in Paris."
Write-Output($result.entity)
In the above example, replace http://my-docker-server-name:5000 with your docker host and port. You also need to replace `my-license-token-from-jibber-ai` with your license key.