diff --git a/README.md b/README.md index 0d2c8c11..cfc37410 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,12 @@ Supported models: - anthropic.claude-v2 * Stable Diffusion - stability.stable-diffusion-xl +* Meta + - meta.llama2-13b-chat-v1 + - meta.llama2-70b-chat-v1 +* Cohere + - cohere.command-text-v14 + - cohere.command-light-text-v14 ## Developer environment @@ -64,7 +70,7 @@ Copy `.env.example` to `.env` and customize it for your environment: |DEFAULT_REGION||AWS region e.g. "us-east-1"| |LOG_LEVEL|INFO|Log level. Use DEBUG for dev purposes and INFO in prod| |AIDIAL_LOG_LEVEL|WARNING|AI DIAL SDK log level| -|DIAL_USE_FILE_STORAGE|False|Save model artifacts to DIAL File storage (particularly, Stability images are uploaded to the files storage and their base64 encodings are replaced with links to the storage)| +|DIAL_USE_FILE_STORAGE|False|Save model artifacts to DIAL File storage (particularly, Stability images are uploaded to the files storage and their base64 encodings are replaced with links to the storage). The creds for the file storage must be passed in `Authorization` header of the incoming request. The file storage won't be used if the header isn't set.| |DIAL_URL||URL of the core DIAL server (required when DIAL_USE_FILE_STORAGE=True)| |WEB_CONCURRENCY|1|Number of workers for the server| |TEST_SERVER_URL|http://0.0.0.0:5001|Server URL used in the integration tests| diff --git a/aidial_adapter_bedrock/chat_completion.py b/aidial_adapter_bedrock/chat_completion.py index cb65505d..d125afb7 100644 --- a/aidial_adapter_bedrock/chat_completion.py +++ b/aidial_adapter_bedrock/chat_completion.py @@ -24,9 +24,7 @@ async def chat_completion(self, request: Request, response: Response): model = await get_bedrock_adapter( region=self.region, model=request.deployment_id, - file_api_auth=Auth.create_from_headers( - "authorization", request.headers - ), + file_api_auth=Auth.from_headers("authorization", request.headers), ) async def generate_response( diff --git a/aidial_adapter_bedrock/dial_api/auth.py b/aidial_adapter_bedrock/dial_api/auth.py index 4e6ee65c..0eaaa73b 100644 --- a/aidial_adapter_bedrock/dial_api/auth.py +++ b/aidial_adapter_bedrock/dial_api/auth.py @@ -12,7 +12,7 @@ def headers(self) -> dict[str, str]: return {self.name: self.value} @classmethod - def create_from_headers( + def from_headers( cls, name: str, headers: Mapping[str, str] ) -> Optional["Auth"]: value = headers.get(name)