-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare for public source code release
- Loading branch information
Showing
10 changed files
with
146 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/node_modules | ||
/.airtableblocksrc.json | ||
/build | ||
.tmp | ||
.tmp | ||
env.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// For local development, you should usually edit env.ts (and not env.template.ts) | ||
// env.template.ts is a template to set up semi-valid env variables for new projects | ||
|
||
// This is very jank | ||
// We're building secrets in to the source code accessible in the browser. This is because Airtable extensions don't have any sensible secret management mechanism. | ||
// We're currently accepting this risk given: | ||
// - only BlueDot Impact employees have access to the deployed extension | ||
// - we have limits on API usage set for both platforms | ||
// - the risk is people using our API credits / getting free access to APIs, which is not as critical (as e.g. applicant's personal data) | ||
export const env = { | ||
// Get from https://platform.openai.com/settings/profile?tab=api-keys | ||
'OPENAI_API_KEY': 'sk-...', | ||
// Get from https://console.anthropic.com/settings/keys | ||
'ANTHROPIC_API_KEY': 'sk-ant-api...' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
// This isn't very secure, but given only BlueDot Impact employees should have access to the extension and we have a limit on the usage this is fine for now. | ||
export const anthropicApiKey = "***REMOVED***"; | ||
// OpenAI model to use, in the format accepted by the OpenAI API: https://platform.openai.com/docs/models/model-endpoint-compatibility | ||
import { env } from "../../env"; | ||
|
||
export const anthropicApiKey = env.ANTHROPIC_API_KEY; | ||
// Model to use: https://docs.anthropic.com/en/docs/models-overview | ||
export const anthropicModel = 'claude-3-sonnet-20240229'; | ||
// Maximum number of open requests to OpenAI at any one time. Higher = faster, but more likely to hit OpenAI rate limits. | ||
// Maximum number of open requests at any one time. Higher = faster, but more likely to hit rate limits. | ||
export const anthropicRequestConcurrency = 30; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
// This isn't very secure, but given only BlueDot Impact employees should have access to the extension and we have a limit on the usage this is fine for now. | ||
export const openAiApiKey = "***REMOVED***"; | ||
// OpenAI model to use, in the format accepted by the OpenAI API: https://platform.openai.com/docs/models/model-endpoint-compatibility | ||
import { env } from "../../env"; | ||
|
||
export const openAiApiKey = env.OPENAI_API_KEY; | ||
export const openAiOrganisation = "org-2egSVUATOaBoS2Slr2CbYrcZ"; | ||
// Model to use: https://platform.openai.com/docs/models/model-endpoint-compatibility | ||
export const openAiModel = 'gpt-4-1106-preview'; | ||
// Maximum number of open requests to OpenAI at any one time. Higher = faster, but more likely to hit OpenAI rate limits. From trial and error, at tier 3 with GPT-4 turbo, 30 works well. | ||
// Maximum number of open requests at any one time. Higher = faster, but more likely to hit rate limits. From trial and error, at tier 3 with GPT-4 turbo, 30 works well. | ||
export const openAiRequestConcurrency = 30; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.