improves AWS .env.example and config.ts docs
This commit is contained in:
parent
5033d00444
commit
4e05b01e90
|
@ -87,6 +87,7 @@
|
||||||
# For AWS credentials, separate the access key ID, secret key, and region with a colon.
|
# For AWS credentials, separate the access key ID, secret key, and region with a colon.
|
||||||
OPENAI_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
OPENAI_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||||
ANTHROPIC_KEY=sk-ant-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
ANTHROPIC_KEY=sk-ant-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||||
|
# See `config.ts` for details on setting up Amazon Bedrock credentials.
|
||||||
AWS_CREDENTIALS=myaccesskeyid:mysecretkey:us-east-1,anotheraccesskeyid:anothersecretkey:us-west-2
|
AWS_CREDENTIALS=myaccesskeyid:mysecretkey:us-east-1,anotheraccesskeyid:anothersecretkey:us-west-2
|
||||||
|
|
||||||
# With proxy_key gatekeeper, the password users must provide to access the API.
|
# With proxy_key gatekeeper, the password users must provide to access the API.
|
||||||
|
|
|
@ -4,13 +4,9 @@ import pino from "pino";
|
||||||
import type { ModelFamily } from "./shared/models";
|
import type { ModelFamily } from "./shared/models";
|
||||||
dotenv.config();
|
dotenv.config();
|
||||||
|
|
||||||
// Can't import the usual logger here because it itself needs the config.
|
|
||||||
const startupLogger = pino({ level: "debug" }).child({ module: "startup" });
|
const startupLogger = pino({ level: "debug" }).child({ module: "startup" });
|
||||||
|
|
||||||
const isDev = process.env.NODE_ENV !== "production";
|
const isDev = process.env.NODE_ENV !== "production";
|
||||||
|
|
||||||
type PromptLoggingBackend = "google_sheets";
|
|
||||||
|
|
||||||
type Config = {
|
type Config = {
|
||||||
/** The port the proxy server will listen on. */
|
/** The port the proxy server will listen on. */
|
||||||
port: number;
|
port: number;
|
||||||
|
@ -23,7 +19,13 @@ type Config = {
|
||||||
/**
|
/**
|
||||||
* Comma-delimited list of AWS credentials. Each credential item should be a
|
* Comma-delimited list of AWS credentials. Each credential item should be a
|
||||||
* colon-delimited list of access key, secret key, and AWS region.
|
* colon-delimited list of access key, secret key, and AWS region.
|
||||||
* Example: `AWS_CREDENTIALS=access_key_1:secret_key_1:us-east-1,access_key_2:secret_key_2:us-west-2`
|
*
|
||||||
|
* The credentials must have access to the actions `bedrock:InvokeModel` and
|
||||||
|
* `bedrock:InvokeModelWithResponseStream`. You must also have already
|
||||||
|
* provisioned the necessary models in your AWS account, on the specific
|
||||||
|
* regions specified for each credential. Models are region-specific.
|
||||||
|
*
|
||||||
|
* @example `AWS_CREDENTIALS=access_key_1:secret_key_1:us-east-1,access_key_2:secret_key_2:us-west-2`
|
||||||
*/
|
*/
|
||||||
awsCredentials?: string;
|
awsCredentials?: string;
|
||||||
/**
|
/**
|
||||||
|
@ -97,7 +99,7 @@ type Config = {
|
||||||
/** Whether prompts and responses should be logged to persistent storage. */
|
/** Whether prompts and responses should be logged to persistent storage. */
|
||||||
promptLogging?: boolean;
|
promptLogging?: boolean;
|
||||||
/** Which prompt logging backend to use. */
|
/** Which prompt logging backend to use. */
|
||||||
promptLoggingBackend?: PromptLoggingBackend;
|
promptLoggingBackend?: "google_sheets";
|
||||||
/** Base64-encoded Google Sheets API key. */
|
/** Base64-encoded Google Sheets API key. */
|
||||||
googleSheetsKey?: string;
|
googleSheetsKey?: string;
|
||||||
/** Google Sheets spreadsheet ID. */
|
/** Google Sheets spreadsheet ID. */
|
||||||
|
|
Loading…
Reference in New Issue