-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconstants.py
67 lines (65 loc) · 3.57 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
from enum import Enum
class Constants(Enum):
AWS_AUTH_AUTHENTICATED_MESSAGE = "Authenticated successfully!"
AWS_AUTH_NO_CREDENTIALS_MESSAGE = "Please provide your AWS credentials to continue."
AWS_AUTH_INVALID_MESSAGE = "Invalid AWS credentials. Please try again."
AWS_AUTH_UNKOWN_ERROR_MESSAGE = "An unknown error occurred while trying to authenticate with AWS. Please try again."
AWS_ACCESS_KEY_FORM_HELP_TEXT = (
"Sign in with your AWS Access Key to access Amazon Bedrock resources. "
"For more details on how to create an AWS Access Key, see the relevant "
"[AWS documentation]"
"(https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html)."
)
AWS_REGION_SELECTBOX_HELP_TEXT = (
"Select the AWS region where your Amazon Bedrock resources are located. "
"For more details about AWS regions, see the relevant "
"[AWS documentation]"
"(https://aws.amazon.com/about-aws/global-infrastructure/regions_az/)."
)
AWS_FOUNDATION_MODEL_SELECTBOX_HELP_TEXT = (
"Amazon Bedrock foundation models are pre-trained models that can "
"be used to perform various tasks in the field of generative AI. "
"For more details, see the relevant "
"[Amazon Bedrock documentation]"
"(https://aws.amazon.com/what-is/foundation-models/)."
)
AWS_FOUNDATION_MODEL_CONFIGURATION_MAX_TOKENS_HELP_TEXT = (
"The maximum number of tokens that the model can generate in a single response."
)
AWS_FOUNDATION_MODEL_CONFIGURATION_TEMPERATURE_HELP_TEXT = (
"The temperature affects the shape of the probability distribution "
"for the predicted output and influences the likelihood of the model "
"selecting lower-probability outputs. In other words, a higher temperature "
"will result in more creative responses, while a lower temperature will "
"result in more predictable responses."
)
AWS_FOUNDATION_MODEL_CONFIGURATION_TOP_P_HELP_TEXT = (
"The percentage of most-likely candidates that the model considers "
"for the next token. Choose a lower value to decrease the size of "
"the pool and limit the options to more likely outputs. Choose a "
"higher value to increase the size of the pool and allow the model "
"to consider less likely outputs."
)
AWS_FOUNDATION_MODEL_CONFIGURATION_SYSTEM_PROMPT_HELP_TEXT = (
"A system prompt is a unique message that gives extra context or "
"instructions to the AI model. It helps steer the model's behavior "
"and establishes expectations for its responses."
)
KNOWLEDGE_BASE_SELECTBOX_HELP_TEXT = (
"Amazon Bedrock knowledge bases are collections of data sources that "
"can be used to provide context to your foundation model. "
"For more details, see the relevant "
"[Amazon Bedrock documentation]"
"(https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base)."
)
KNOWLEDGE_BASE_SEARCH_MODE_ENABLED_HELP_TEXT = (
"Responses will be based solely on the selected Knowledge Base resources. "
"Streaming responses and system prompts are not supported in this mode. "
"Remove Knowledge Base selection to disable."
)
DATA_SOURCE_SELECTBOX_HELP_TEXT = (
"A data source contains files with information that can be retrieved "
"when your knowledge base is queried. For more details, see the relevant "
"[Amazon Bedrock documentation]"
"(https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-ds)."
)