Skip to content

Commit

Permalink
Merge pull request #31 from allegro/pz/azure-keyless-authentication
Browse files Browse the repository at this point in the history
Add keyless authentication to Azure
  • Loading branch information
megatron6000 authored Aug 8, 2024
2 parents 7461c6c + cd44d24 commit 64d7f5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion allms/domain/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class AzureOpenAIConfiguration:
deployment: str
model_name: str
api_version: str
api_key: str
api_key: Optional[str] = None
azure_ad_token: Optional[str] = None


@dataclass
Expand Down
1 change: 1 addition & 0 deletions allms/models/azure_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def _create_llm(self) -> AzureChatOpenAI:
model_name=self._config.model_name,
base_url=self._config.base_url,
api_key=self._config.api_key,
azure_ad_token=self._config.azure_ad_token,
temperature=self._temperature,
max_tokens=self._max_output_tokens,
request_timeout=self._request_timeout_s
Expand Down

0 comments on commit 64d7f5d

Please sign in to comment.