File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ def _get_client(self) -> openai.OpenAI:
5151 api_key = self .config .api_key ,
5252 timeout = self .config .timeout ,
5353 max_retries = self .config .max_retries ,
54+ base_url = self .config .base_url ,
5455 )
5556 return self ._client
5657
@@ -61,6 +62,7 @@ def _get_async_client(self) -> openai.AsyncOpenAI:
6162 api_key = self .config .api_key ,
6263 timeout = self .config .timeout ,
6364 max_retries = self .config .max_retries ,
65+ base_url = self .config .base_url ,
6466 )
6567 return self ._async_client
6668
Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ class OpenaiEmbeddingConfig(EmbedderConfig):
8888
8989 model_name : str = Field ("text-embedding-3-small" , description = "Name of the OpenAI embedding model." )
9090 api_key : str = Field (description = "OpenAI API key. If None, will look for OPENAI_API_KEY environment variable." )
91+ base_url : str | None = Field (default = None , description = "Base URL for OpenAI API calls" )
9192 batch_size : int = Field (100 , description = "Batch size for API requests." )
9293 max_retries : int = Field (3 , description = "Maximum number of retries for failed API requests." )
9394 timeout : float = Field (30.0 , description = "Timeout for API requests in seconds." )
You can’t perform that action at this time.
0 commit comments