mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-08-28 05:25:04 +00:00
refactor(embedding): update environment variable names for API key and base URL
This commit is contained in:
parent
46ffe42a40
commit
ce53bc051a
1 changed files with 2 additions and 2 deletions
|
|
@ -81,12 +81,12 @@ class BaseEmbeddingModel(ABC):
|
|||
@property
|
||||
def api_key(self) -> str | None:
|
||||
"""Get API key from environment variable."""
|
||||
return os.getenv("REME_EMBEDDING_API_KEY") or self._api_key
|
||||
return os.getenv("EMBEDDING_API_KEY") or self._api_key
|
||||
|
||||
@property
|
||||
def base_url(self) -> str | None:
|
||||
"""Get base URL from environment variable."""
|
||||
return os.getenv("REME_EMBEDDING_BASE_URL") or self._base_url
|
||||
return os.getenv("EMBEDDING_BASE_URL") or self._base_url
|
||||
|
||||
def _truncate_text(self, text: str) -> str:
|
||||
"""Truncate text to max_input_length if it exceeds the limit."""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue