Skip to main content

No project description provided

Project description

oci-openai

PyPI - Version PyPI - Python Version

OCI-OpenAI is a client library maintained by the Oracle Cloud Infrastructure (OCI) Generative AI Service team. This package simplifies integration between OpenAI’s Python SDK and Oracle Cloud Infrastructure (OCI) GenAI service by providing robust authentication and authorization utilities. Developers can seamlessly connect to Oracle Generative AI services using OCI credentials, ensuring secure and compliant access while leveraging industry best practices.


Table of Contents

Installation

pip install oci-openai

Examples

from oci_openai import OciOpenAI, OciSessionAuth

client = OciOpenAI(
    service_endpoint="https://inference.generativeai.us-chicago-1.oci.oraclecloud.com",
    auth=OciSessionAuth(profile_name="<profile name>"),
    compartment_id="<compartment ocid>",
)

completion = client.chat.completions.create(
    model="<model name>",
    messages=[
        {
            "role": "user",
            "content": "How do I output all files in a directory using Python?",
        },
    ],
)
print(completion.model_dump_json())

Contributing

This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide

Security

Please consult the security guide for our responsible security vulnerability disclosure process

License

Copyright (c) 2025 Oracle and/or its affiliates.

Released under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oci_openai-0.2.1.tar.gz (143.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oci_openai-0.2.1-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file oci_openai-0.2.1.tar.gz.

File metadata

  • Download URL: oci_openai-0.2.1.tar.gz
  • Upload date:
  • Size: 143.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for oci_openai-0.2.1.tar.gz
Algorithm Hash digest
SHA256 19ad4cfdedc3bf16f842b13b7a58c16baa2e041e55161a09b604b921eaf7c8f4
MD5 f3c8cac32df94c5b0e80453336461dc9
BLAKE2b-256 a8a9ca99226f82ddc6a22fcb3820b9b9a6bee0e62605739882e3af544a2e9ac9

See more details on using hashes here.

File details

Details for the file oci_openai-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: oci_openai-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for oci_openai-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4311dae5531fbe6d3d3d79421a76e9e8ca1089f35d5fe6a59539e53c591fa6c7
MD5 05c48b2d92cdb0a4b7108d8b9f5ce118
BLAKE2b-256 cb37be8140577261c0b79d496963452f2e61805d16916abbde086e041b6e8d16

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page