Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ from oci_openai import OciUserPrincipalAuth
# Example for OCI Generative AI endpoint
client = OpenAI(
api_key="OCI",
base_url="https://inference.generativeai.us-chicago-1.oci.oraclecloud.com/openai/v1",
base_url="https://inference.generativeai.us-chicago-1.oci.oraclecloud.com/20231130/actions/v1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"https://inference.generativeai.us-chicago-1.oci.oraclecloud.com/openai/v1" is the prod url, and it's correct without version "20231130".
All env path now run without the version as the formal format.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review @topysl! I've discovered that #17 has been merged in the meantime, addressing this issue.

FWIW, the .../openai/v1 URL keeps giving me the following error:

openai.NotFoundError: Path doesn't map to a registered service!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

b/z us-chicago-1 prod is not deployed yet. It will come within next two weeks

http_client=httpx.Client(
auth=OciUserPrincipalAuth(profile_name="DEFAULT"),
headers={"opc-compartment-id": COMPARTMENT_ID}
Expand Down Expand Up @@ -133,7 +133,7 @@ COMPARTMENT_ID=os.getenv("OCI_COMPARTMENT_ID", "<compartment_id>")
llm = ChatOpenAI(
model="<model-name>", # for example "xai.grok-4-fast-reasoning"
api_key="OCI",
base_url="https://inference.generativeai.us-chicago-1.oci.oraclecloud.com/openai/v1",
base_url="https://inference.generativeai.us-chicago-1.oci.oraclecloud.com/20231130/actions/v1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same above

http_client=httpx.Client(
auth=OciUserPrincipalAuth(profile_name="DEFAULT"),
headers={"CompartmentId": COMPARTMENT_ID}
Expand Down