Skip to content

Commit

Permalink
Move Bedrock and OpenAi to aikit
Browse files Browse the repository at this point in the history
  • Loading branch information
humandad committed Jun 19, 2024
1 parent 2b27cf8 commit 035f6fa
Show file tree
Hide file tree
Showing 18 changed files with 31 additions and 8 deletions.
2 changes: 1 addition & 1 deletion apps/platform/pkg/bot/systemdialect/systemdialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func (b *SystemDialect) RunIntegrationActionBot(bot *meta.Bot, ic *wire.Integrat

// Intercept system integration types
switch ic.GetIntegrationType().GetKey() {
case "uesio/core.bedrock":
case "uesio/aikit.bedrock":
botFunction = bedrock.RunAction
case "uesio/core.openai":
botFunction = openai.RunAction
Expand Down
1 change: 1 addition & 0 deletions apps/platform/pkg/configstore/environment/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ var configValues = map[string]string{
"uesio/core.platform_filesource_credentials": GetEnvWithDefault("UESIO_PLATFORM_FILESOURCE_CREDENTIALS", "uesio/core.aws"),
"uesio/core.platform_bundlestore_credentials": GetEnvWithDefault("UESIO_PLATFORM_BUNDLESTORE_CREDENTIALS", "uesio/core.aws"),
"uesio/core.aws_region": os.Getenv("AWS_REGION"),
"uesio/aikit.aws_region": os.Getenv("AWS_REGION"),
"uesio/core.userfiles_bucket_name": GetEnvWithDefault("UESIO_USERFILES_BUCKET_NAME", "uesio-userfiles"),
"uesio/core.db_host": GetRequiredEnv("UESIO_DB_HOST"),
"uesio/core.db_port": GetEnvWithDefault("UESIO_DB_PORT", "5432"),
Expand Down
15 changes: 9 additions & 6 deletions apps/platform/pkg/secretstore/environment/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ type SecretStore struct {
}

var secretValues = map[string]string{
"uesio/core.aws_access_key_id": os.Getenv("AWS_ACCESS_KEY_ID"),
"uesio/core.aws_secret_access_key": os.Getenv("AWS_SECRET_ACCESS_KEY"),
"uesio/core.aws_session_token": os.Getenv("AWS_SESSION_TOKEN"),
"uesio/core.db_user": os.Getenv("UESIO_DB_USER"),
"uesio/core.db_password": os.Getenv("UESIO_DB_PASSWORD"),
"uesio/core.db_database": os.Getenv("UESIO_DB_DATABASE"),
"uesio/core.aws_access_key_id": os.Getenv("AWS_ACCESS_KEY_ID"),
"uesio/core.aws_secret_access_key": os.Getenv("AWS_SECRET_ACCESS_KEY"),
"uesio/core.aws_session_token": os.Getenv("AWS_SESSION_TOKEN"),
"uesio/aikit.aws_access_key_id": os.Getenv("AWS_ACCESS_KEY_ID"),
"uesio/aikit.aws_secret_access_key": os.Getenv("AWS_SECRET_ACCESS_KEY"),
"uesio/aikit.aws_session_token": os.Getenv("AWS_SESSION_TOKEN"),
"uesio/core.db_user": os.Getenv("UESIO_DB_USER"),
"uesio/core.db_password": os.Getenv("UESIO_DB_PASSWORD"),
"uesio/core.db_database": os.Getenv("UESIO_DB_DATABASE"),
}

func (ss *SecretStore) Get(key string, session *sess.Session) (string, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const ClaudeInvokeButton: definition.UtilityComponent<Props> = (props) => {
[
{
signal: "integration/RUN_ACTION",
integration: "uesio/core.bedrock",
integration: "uesio/aikit.bedrock",
action: "streammodel",
stepId,
params: {
Expand Down
3 changes: 3 additions & 0 deletions libs/apps/uesio/aikit/bundle/configvalues/aws_region.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: aws_region
managedBy: app
store: environment
7 changes: 7 additions & 0 deletions libs/apps/uesio/aikit/bundle/credentials/aws.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: aws
type: AWS_KEY
awsKey:
region: uesio/aikit.aws_region
accessKeyId: uesio/aikit.aws_access_key_id
secretAccessKey: uesio/aikit.aws_secret_access_key
sessionToken: uesio/aikit.aws_session_token
3 changes: 3 additions & 0 deletions libs/apps/uesio/aikit/bundle/secrets/aws_access_key_id.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: aws_access_key_id
managedBy: app
store: environment
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: aws_secret_access_key
managedBy: app
store: environment
3 changes: 3 additions & 0 deletions libs/apps/uesio/aikit/bundle/secrets/aws_session_token.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: aws_session_token
managedBy: app
store: environment

0 comments on commit 035f6fa

Please sign in to comment.