Skip to content

Commit 240433b

Browse files
committed
feat: add v2 Settings class
1 parent e3e2599 commit 240433b

19 files changed

+448
-2091
lines changed

api/terraform/python/openai_api/common/README.md

Lines changed: 1 addition & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -42,115 +42,4 @@ The Settings class contains an instance variable for `pinecone_api_key` which wi
4242

4343
The Settings class is also a provider to CloudWatch when both `DEBUG_MODE` and `DUMP_DEFAULTS` environment variables are set to `True`. The Settings property `dump` generates a context sensitive JSON dict of the state data for all settings as well as class instance meta data that can be helpful during development trouble shooting.
4444

45-
An example CloudWatch dump:
46-
47-
```json
48-
{
49-
"aws": {
50-
"aws_profile": "lawrence",
51-
"aws_region": "us-east-1"
52-
},
53-
"aws_api_gateway": {
54-
"aws_apigateway_custom_domain_name": "api.openai.example.com",
55-
"aws_apigateway_custom_domain_name_create": false,
56-
"aws_apigateway_root_domain": "example.com"
57-
},
58-
"environment": {
59-
"boto3": "1.34.2",
60-
"debug_mode": true,
61-
"dotenv": [
62-
"AWS_REGION",
63-
"DEBUG_MODE",
64-
"AWS_DYNAMODB_TABLE_ID",
65-
"AWS_REKOGNITION_FACE_DETECT_MAX_FACES_COUNT",
66-
"AWS_REKOGNITION_FACE_DETECT_THRESHOLD",
67-
"AWS_REKOGNITION_FACE_DETECT_ATTRIBUTES",
68-
"AWS_REKOGNITION_FACE_DETECT_QUALITY_FILTER",
69-
"AWS_REKOGNITION_COLLECTION_ID",
70-
"LANGCHAIN_MEMORY_KEY",
71-
"OPENAI_ENDPOINT_IMAGE_N",
72-
"OPENAI_ENDPOINT_IMAGE_SIZE"
73-
],
74-
"dump_defaults": true,
75-
"is_using_dotenv_file": true,
76-
"is_using_tfvars_file": true,
77-
"os": "posix",
78-
"release": "23.2.0",
79-
"shared_resource_identifier": "openai",
80-
"system": "Darwin",
81-
"tfvars": [
82-
"aws_account_id",
83-
"tags",
84-
"aws_region",
85-
"openai_endpoint_image_n",
86-
"openai_endpoint_image_size",
87-
"lambda_python_runtime",
88-
"debug_mode",
89-
"lambda_memory_size",
90-
"lambda_timeout",
91-
"logging_level",
92-
"log_retention_days",
93-
"create_custom_domain",
94-
"root_domain",
95-
"shared_resource_identifier",
96-
"stage",
97-
"quota_settings_limit",
98-
"quota_settings_offset",
99-
"quota_settings_period",
100-
"throttle_settings_burst_limit",
101-
"throttle_settings_rate_limit"
102-
],
103-
"version": "0.7.0"
104-
},
105-
"openai_api": {
106-
"langchain_memory_key": "chat_history",
107-
"openai_endpoint_image_n": 4,
108-
"openai_endpoint_image_size": "1024x768"
109-
},
110-
"secrets": {
111-
"openai_api_source": "environment variable",
112-
"pinecone_api_source": "environment variable"
113-
},
114-
"settings_defaults": {
115-
"AWS_APIGATEWAY_CUSTOM_DOMAIN_NAME_CREATE": false,
116-
"AWS_APIGATEWAY_ROOT_DOMAIN_NAME": "example.com",
117-
"AWS_DYNAMODB_TABLE_ID": "rekognition",
118-
"AWS_PROFILE": null,
119-
"AWS_REGION": "us-east-1",
120-
"AWS_REKOGNITION_COLLECTION_ID": "rekognition-collection",
121-
"AWS_REKOGNITION_FACE_DETECT_ATTRIBUTES": "DEFAULT",
122-
"AWS_REKOGNITION_FACE_DETECT_MAX_FACES_COUNT": 10,
123-
"AWS_REKOGNITION_FACE_DETECT_QUALITY_FILTER": "AUTO",
124-
"AWS_REKOGNITION_FACE_DETECT_THRESHOLD": 10,
125-
"DEBUG_MODE": true,
126-
"DUMP_DEFAULTS": false,
127-
"LANGCHAIN_MEMORY_KEY": "chat_history",
128-
"OPENAI_API_KEY": null,
129-
"OPENAI_API_ORGANIZATION": null,
130-
"OPENAI_ENDPOINT_IMAGE_N": 4,
131-
"OPENAI_ENDPOINT_IMAGE_SIZE": "1024x768",
132-
"PINECONE_API_KEY": null,
133-
"SHARED_RESOURCE_IDENTIFIER": "openai",
134-
"VALID_AWS_REGIONS": [
135-
"ap-south-1",
136-
"eu-north-1",
137-
"eu-west-3",
138-
"eu-west-2",
139-
"eu-west-1",
140-
"ap-northeast-3",
141-
"ap-northeast-2",
142-
"ap-northeast-1",
143-
"ca-central-1",
144-
"sa-east-1",
145-
"ap-southeast-1",
146-
"ap-southeast-2",
147-
"eu-central-1",
148-
"us-east-1",
149-
"us-east-2",
150-
"us-west-1",
151-
"us-west-2"
152-
],
153-
"VALID_DOMAIN_PATTERN": "^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$"
154-
}
155-
}
156-
```
45+
An example [CloudWatch Dump](../../../../../doc/json/settings_cloudwatch_dump_example.json)

0 commit comments

Comments
 (0)