Skip to content

Commit bbb2f7c

Browse files
committed
fix: unable to set OPENAI_API_BASE for litellm
Signed-off-by: Nick Mitchell <[email protected]>
1 parent bea3850 commit bbb2f7c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pdl/pdl_ast.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""PDL programs are represented by the Pydantic data structure defined in this file."""
22

33
from enum import StrEnum
4+
from os import environ
45
from typing import (
56
Annotated,
67
Any,
@@ -449,7 +450,7 @@ class LitellmParameters(BaseModel):
449450
"""The name of the function to call within the conversation (default is an empty string)
450451
"""
451452
# set api_base, api_version, api_key
452-
base_url: Optional[str] | str = None
453+
base_url: Optional[str] | str = environ.get("OPENAI_BASE_URL")
453454
"""Base URL for the API (default is None).
454455
"""
455456
api_version: Optional[str] | str = None

0 commit comments

Comments
 (0)