mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-10-15 01:47:49 +00:00
add api_version to args
This commit is contained in:
parent
f3fe5d3b64
commit
38c8a6e97c
@ -567,11 +567,14 @@ async def azure_openai_embedding(
|
||||
model: str = "text-embedding-3-small",
|
||||
base_url: str = None,
|
||||
api_key: str = None,
|
||||
api_version: str = None,
|
||||
) -> np.ndarray:
|
||||
if api_key:
|
||||
os.environ["AZURE_OPENAI_API_KEY"] = api_key
|
||||
if base_url:
|
||||
os.environ["AZURE_OPENAI_ENDPOINT"] = base_url
|
||||
if api_version:
|
||||
os.environ["AZURE_OPENAI_API_VERSION"] = api_version
|
||||
|
||||
openai_async_client = AsyncAzureOpenAI(
|
||||
azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user