Skip to content

Commit

Permalink
Merge branch 'dev' into retail-bot
Browse files Browse the repository at this point in the history
  • Loading branch information
AoyuQC committed Jun 24, 2024
2 parents b03663a + 21640ab commit 00a15ff
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 11 deletions.
40 changes: 37 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ Here is an example
```



### Flexible Mode Options

The following graph is generated by online logic which is built
Expand Down Expand Up @@ -129,7 +127,43 @@ be executed. For cases where a constant reply needs to be given, the
**give_final_response** means the current results of tool calling
is enough to answer the query.

![Online Workflow](source/lambda/online/common_entry_workflow.png)
```mermaid
flowchart TD
subgraph ReAct["ReAct"]
direction TB
tools_choose_and_results_generation["tools_choose_and_results_generation"]
results_evaluation{{"results_evaluation"}}
tools_execution["tools_execution"]
end
_start_["_start_"] --> query_preprocess["query_preprocess"]
query_preprocess == chat mode ==> llm_direct_results_generation["llm_direct_results_generation"]
query_preprocess == rag mode ==> all_knowledge_retrieve["all_knowledge_retrieve"]
query_preprocess == agent mode ==> intention_detection["intention_detection"]
all_knowledge_retrieve --> llm_direct_results_generation & llm_rag_results_generation["llm_rag_results_generation"]
intention_detection -- similar query found --> matched_query_return["matched_query_return"]
intention_detection -- intention detected --> tools_choose_and_results_generation
tools_choose_and_results_generation --> results_evaluation
results_evaluation -. invalid tool calling .-> tools_choose_and_results_generation
results_evaluation -. valid tool calling .-> tools_execution
results_evaluation -. no need tool calling .-> final_results_preparation["final_results_preparation"]
tools_execution --> tools_choose_and_results_generation
llm_direct_results_generation --> _end_["_end_"]
llm_rag_results_generation --> _end_
matched_query_return --> final_results_preparation
final_results_preparation --> _end_
tools_choose_and_results_generation:::process
results_evaluation:::process
tools_execution:::process
query_preprocess:::process
llm_direct_results_generation:::process
all_knowledge_retrieve:::process
intention_detection:::process
llm_rag_results_generation:::process
matched_query_return:::process
final_results_preparation:::process
style query_preprocess fill:#FF6D00,color:#FFFFFF
style ReAct fill:#FFCDD2,color:#D50000
```

## Quick Start
Follow these steps to get started:
Expand Down
2 changes: 1 addition & 1 deletion source/infrastructure/bin/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,6 @@ const devEnv = {

const app = new App();
const stackName = app.node.tryGetContext("StackName") || "intelli-agent";
new RootStack(app, stackName, { env: devEnv })
new RootStack(app, stackName, { env: devEnv });

app.synth();
7 changes: 0 additions & 7 deletions source/infrastructure/lib/shared/cdk-parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ interface CdkParameters {
}

export class DeploymentParameters implements CdkParameters {
public stackName: CfnParameter;
public s3ModelAssets: CfnParameter;
public subEmail: CfnParameter;
public openSearchIndex: CfnParameter;
Expand All @@ -34,12 +33,6 @@ export class DeploymentParameters implements CdkParameters {

constructor(scope: Construct) {

this.stackName = new CfnParameter(scope, 'StackName', {
type: 'String',
description: 'The name of the stack',
default: 'intelli-agent',
});

this.s3ModelAssets = new CfnParameter(scope, "S3ModelAssets", {
type: "String",
description: "S3 Bucket for model & code assets",
Expand Down

0 comments on commit 00a15ff

Please sign in to comment.