Skip to content

Commit

Permalink
Fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
viveksilimkhan1 committed Oct 30, 2023
1 parent f99c82b commit d9b47da
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions spacy_llm/models/rest/bedrock/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import warnings
from enum import Enum
from typing import Any, Dict, Iterable, List, Tuple
from typing import Any, Dict, Iterable, List, Optional, Tuple


from ..base import REST
Expand Down Expand Up @@ -60,7 +60,7 @@ def __init__(
max_request_time=30,
)

def get_session_kwargs(self) -> Dict[str, str]:
def get_session_kwargs(self) -> Dict[str, Optional[str]]:

# Fetch and check the credentials
profile = os.getenv("AWS_PROFILE") if not None else "default"
Expand Down Expand Up @@ -170,10 +170,12 @@ def _verify_auth(self) -> None:
bedrock.list_foundation_models()
except NoCredentialsError:
raise NoCredentialsError


@property
def credentials(self) -> Dict[str, str]:
return self.get_session_kwargs()

@classmethod
def get_model_names(self) -> Tuple[str, ...]:
return (
"amazon.titan-text-express-v1",
Expand Down

0 comments on commit d9b47da

Please sign in to comment.