Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add stop conversation and regeneration #545

Merged
merged 25 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b9ef88b
feat: add api for listing sagemaker endpoint
IcyKallen Feb 18, 2025
4f44b96
feat: update aws js sdk to v3
IcyKallen Feb 18, 2025
b232e0e
feat: fix config and build for china region
IcyKallen Feb 18, 2025
01f1298
feat: support china region deploy
IcyKallen Feb 19, 2025
805b8f4
fix: fix mock authorizer
IcyKallen Feb 19, 2025
5795872
UI refactor
530051970 Feb 20, 2025
485d3e0
Merge branch 'dev' of https://github.com/aws-samples/Intelli-Agent in…
530051970 Feb 20, 2025
b91e181
add unused check in infrastructure
530051970 Feb 20, 2025
8a3687a
Merge pull request #537 from aws-samples/hubin-daily
NingLu Feb 20, 2025
9f6a604
feat: support sagemaker endpoint for online question answering
IcyKallen Feb 20, 2025
a3b3fdb
Merge remote-tracking branch 'origin' into aics-china-region
IcyKallen Feb 20, 2025
fcea95a
chore: revert mock authorizer
IcyKallen Feb 20, 2025
ef9849f
feat: support selection of cognito user pool
IcyKallen Feb 21, 2025
315d16a
Merge remote-tracking branch 'origin/dev' into aics-china-region
IcyKallen Feb 21, 2025
14f7961
fix: fix portal build error
IcyKallen Feb 21, 2025
2e6a409
fix: fix ui portal import
IcyKallen Feb 21, 2025
152dab5
Merge pull request #538 from aws-samples/aics-china-region
NingLu Feb 21, 2025
9adb494
feat: refactor
Feb 24, 2025
10a27d3
feat: add stop function
Feb 25, 2025
6024d47
feat: add regenerate button
NingLu Feb 25, 2025
f38665e
chore: add i18n
NingLu Feb 25, 2025
b296a26
chore: update online main
NingLu Feb 26, 2025
29f2d82
Merge pull request #540 from aws-samples/ard5
NingLu Feb 28, 2025
460ab4a
chore: update user stack
NingLu Feb 28, 2025
8334d47
Merge pull request #544 from aws-samples/ard5
NingLu Feb 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion source/infrastructure/bin/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export class RootStack extends Stack {

let knowledgeBaseStack: KnowledgeBaseStack = {} as KnowledgeBaseStack;
let knowledgeBaseStackOutputs: KnowledgeBaseStackOutputs = {} as KnowledgeBaseStackOutputs;
let chatStack: ChatStack = {} as ChatStack;
let chatStackOutputs: ChatStackOutputs = {} as ChatStackOutputs;

const modelConstruct = new ModelConstruct(this, "model-construct", {
Expand Down
23 changes: 15 additions & 8 deletions source/infrastructure/cli/magic-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import { Command } from "commander";
import { prompt } from "enquirer";
import * as fs from "fs";
import * as AWS from "aws-sdk";
import { STSClient, GetCallerIdentityCommand } from "@aws-sdk/client-sts";
import { fromIni } from "@aws-sdk/credential-providers";
import { loadSharedConfigFiles } from "@aws-sdk/shared-ini-file-loader";
import {
SystemConfig,
SupportedBedrockRegion,
Expand Down Expand Up @@ -52,20 +54,25 @@ const llms = [

// Function to get AWS account ID and region
async function getAwsAccountAndRegion() {
const sts = new AWS.STS();
let AWS_ACCOUNT;
let AWS_REGION;

// Create STS client
const stsClient = new STSClient({
credentials: fromIni({ profile: "default" })
});

try {
const data = await sts.getCallerIdentity().promise();
AWS_ACCOUNT = data.Account;
const response = await stsClient.send(new GetCallerIdentityCommand({}));
AWS_ACCOUNT = response.Account;
} catch (error) {
console.error('Error getting AWS account:', error);
throw error;
}
try {
AWS.config.credentials = new AWS.SharedIniFileCredentials({ profile: "default" });
AWS_REGION = new AWS.IniLoader().loadFrom({ isConfig: true }).default.region;

try {
const config = await loadSharedConfigFiles();
AWS_REGION = config.configFile?.default?.region;
} catch (error) {
console.error("No default region found in the AWS credentials file. Please enter the region you want to deploy the intelli-agent solution");
AWS_REGION = undefined;
Expand Down Expand Up @@ -258,7 +265,7 @@ async function processCreateOptions(options: any): Promise<void> {
initial: options.customDomainEndpoint ?? "",
validate(customDomainEndpoint: string) {
return (this as any).skipped ||
RegExp(/^https:\/\/[a-z0-9-]+.[a-z0-9-]{2,}\.es\.amazonaws\.com$/).test(customDomainEndpoint)
RegExp(/^https:\/\/[a-z0-9-]+.[a-z0-9-]{2,}\.es\.amazonaws\.com/).test(customDomainEndpoint)
? true
: "Enter a valid OpenSearch domain endpoint (e.g., https://search-domain-region-id.region.es.amazonaws.com)";
},
Expand Down
Loading
Loading