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:

  • Ensure you have signed up for a Jibber AI license. You will receive an API key that you will need to use to authenticate your requests
  • Ensure you have a Docker container running a Jibber AI container
  • Once you have your API key and Docker container, you can make requests to the API endpoint

Here's an example using Invoke-RestMethod:

PowerShell
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.