Accessing Jibber AI (Docker) using using Python

To access Jibber AI in Docker from Python, you can use the requests library.

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 the requests library:

python
import requests

url = "http://my-docker-server-name:5000/analyze"

body = {
    "features": {
        "sentiment": True,
        "keyword": True,
        "pii": True,
        "entities": True,
        "summary": True
    },
    "token": "my-license-token-from-jibber-ai",
    "text": "My name is Julia Peach and I live in Paris."
}
response = requests.post(url, json=body)
response.raise_for_status()
print(response.json())

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.