Skip to main content

Pangea + Azure AI Inference SDK

A wrapper around the Azure AI Inference SDK that wraps the chat completion API with Pangea AI Guard. Supports Python v3.10 and greater.

Installation

pip install -U pangea-azure-ai

Usage

import os

from azure.ai.inference.models import SystemMessage, UserMessage
from azure.core.credentials import AzureKeyCredential

from pangea_azure_ai.inference import PangeaChatCompletionsClient

endpoint = "https://[...].cognitiveservices.azure.com/openai/deployments/gpt-4o-mini"
model_name = "gpt-4o-mini"

client = PangeaChatCompletionsClient(
    endpoint=endpoint,
    credential=AzureKeyCredential(os.getenv("AZURE_API_KEY", "")),
    pangea_api_key=os.getenv("PANGEA_API_KEY", ""),
)

response = client.complete(
    messages=[
        SystemMessage(content="You are a helpful assistant."),
        UserMessage(content="I am going to Paris, what should I see?"),
    ],
    max_tokens=4096,
    temperature=1.0,
    top_p=1.0,
    model=model_name,
    stream=False,
)

print(response.choices[0].message.content)

Metadata

Release files for pangea-azure-ai 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pangea-azure-ai 0.2.0
File Size Uploaded Provenance
pangea_azure_ai-0.2.0.tar.gz 5.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pangea-azure-ai 0.2.0
File Interpreter ABI Platform
pangea_azure_ai-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.0 kB

Release files / pangea_azure_ai-0.2.0.tar.gz

Download URL pangea_azure_ai-0.2.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d55060b5bc15debb17ee458334a77095f1dddb12f91107230903fe6e99d7d69c
BLAKE2b-256 checksum
How to use checksums
0ba9cf66703903f14243393a2c949553b2ba507ebe3bcf7c5a337976ee050e34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / pangea_azure_ai-0.2.0-py3-none-any.whl

Download URL pangea_azure_ai-0.2.0-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b286c12be0db1914cb2ad88ca984026530df8fadd07721b57f24be2adbcd2863
BLAKE2b-256 checksum
How to use checksums
da17473e3130491de76f0e552f41a9658a4d1d2e1f328d4615d0092cdb45b6ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for pangea-azure-ai 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page