Elffuss BraidHub

kikocis/llama-stack public

main · 2.3 KiBRawPermalink
1# Copyright (c) Meta Platforms, Inc. and affiliates.
2# All rights reserved.
3#
4# This source code is licensed under the terms described in the LICENSE file in
5# the root directory of this source tree.
6from typing import * # noqa: F403
7
8from llama_models.schema_utils import json_schema_type
9from pydantic import BaseModel, Field
10
11
12@json_schema_type
13class BedrockConfig(BaseModel):
14 aws_access_key_id: Optional[str] = Field(
15 default=None,
16 description="The AWS access key to use. Default use environment variable: AWS_ACCESS_KEY_ID",
17 )
18 aws_secret_access_key: Optional[str] = Field(
19 default=None,
20 description="The AWS secret access key to use. Default use environment variable: AWS_SECRET_ACCESS_KEY",
21 )
22 aws_session_token: Optional[str] = Field(
23 default=None,
24 description="The AWS session token to use. Default use environment variable: AWS_SESSION_TOKEN",
25 )
26 region_name: Optional[str] = Field(
27 default=None,
28 description="The default AWS Region to use, for example, us-west-1 or us-west-2."
29 "Default use environment variable: AWS_DEFAULT_REGION",
30 )
31 profile_name: Optional[str] = Field(
32 default=None,
33 description="The profile name that contains credentials to use."
34 "Default use environment variable: AWS_PROFILE",
35 )
36 total_max_attempts: Optional[int] = Field(
37 default=None,
38 description="An integer representing the maximum number of attempts that will be made for a single request, "
39 "including the initial attempt. Default use environment variable: AWS_MAX_ATTEMPTS",
40 )
41 retry_mode: Optional[str] = Field(
42 default=None,
43 description="A string representing the type of retries Boto3 will perform."
44 "Default use environment variable: AWS_RETRY_MODE",
45 )
46 connect_timeout: Optional[float] = Field(
47 default=60,
48 description="The time in seconds till a timeout exception is thrown when attempting to make a connection. "
49 "The default is 60 seconds.",
50 )
51 read_timeout: Optional[float] = Field(
52 default=60,
53 description="The time in seconds till a timeout exception is thrown when attempting to read from a connection."
54 "The default is 60 seconds.",
55 )