-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
integration test: create agent with connector tool
Signed-off-by: yuye-aws <[email protected]>
Showing
4 changed files
with
259 additions
and
66 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
76 changes: 76 additions & 0 deletions
76
src/test/resources/template/createconnector-createconnectortool-createflowagent.json
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,76 @@ | ||
{ | ||
"name": "createconnector-createconnectortool-createflowagent", | ||
"description": "test case", | ||
"use_case": "TEST_CASE", | ||
"version": { | ||
"template": "1.0.0", | ||
"compatibility": [ | ||
"2.15.0", | ||
"3.0.0" | ||
] | ||
}, | ||
"workflows": { | ||
"provision": { | ||
"nodes": [ | ||
{ | ||
"id": "create_connector", | ||
"type": "create_connector", | ||
"user_inputs": { | ||
"name": "OpenAI Chat Connector", | ||
"description": "The connector to public OpenAI model service for GPT 3.5", | ||
"version": "1", | ||
"protocol": "http", | ||
"parameters": { | ||
"endpoint": "api.openai.com", | ||
"model": "gpt-3.5-turbo" | ||
}, | ||
"credential": { | ||
"openAI_key": "12345" | ||
}, | ||
"actions": [ | ||
{ | ||
"action_type": "predict", | ||
"method": "POST", | ||
"url": "https://${parameters.endpoint}/v1/chat/completions" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "create_tool", | ||
"type": "create_tool", | ||
"previous_node_inputs": { | ||
"create_connector": "connector_id" | ||
}, | ||
"user_inputs": { | ||
"parameters": {}, | ||
"name": "ConnectorTool", | ||
"type": "ConnectorTool" | ||
} | ||
}, | ||
{ | ||
"id": "create_flow_agent", | ||
"type": "register_agent", | ||
"previous_node_inputs": { | ||
"create_tool": "tools" | ||
}, | ||
"user_inputs": { | ||
"parameters": {}, | ||
"type": "flow", | ||
"name": "OpenAI Chat Agent" | ||
} | ||
} | ||
], | ||
"edges": [ | ||
{ | ||
"source": "create_connector", | ||
"dest": "create_tool" | ||
}, | ||
{ | ||
"source": "create_tool", | ||
"dest": "create_flow_agent" | ||
} | ||
] | ||
} | ||
} | ||
} |
128 changes: 64 additions & 64 deletions
128
src/test/resources/template/createconnector-registerremotemodel-deploymodel.json
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,71 +1,71 @@ | ||
{ | ||
"name": "createconnector-registerremotemodel-deploymodel", | ||
"description": "test case", | ||
"use_case": "TEST_CASE", | ||
"version": { | ||
"template": "1.0.0", | ||
"compatibility": [ | ||
"2.12.0", | ||
"3.0.0" | ||
] | ||
}, | ||
"workflows": { | ||
"provision": { | ||
"nodes": [ | ||
{ | ||
"id": "workflow_step_1", | ||
"type": "create_connector", | ||
"user_inputs": { | ||
"name": "OpenAI Chat Connector", | ||
"description": "The connector to public OpenAI model service for GPT 3.5", | ||
"version": "1", | ||
"protocol": "http", | ||
"parameters": { | ||
"endpoint": "api.openai.com", | ||
"model": "gpt-3.5-turbo" | ||
}, | ||
"credential": { | ||
"openAI_key": "12345" | ||
}, | ||
"actions": [ | ||
{ | ||
"action_type": "predict", | ||
"method": "POST", | ||
"url": "https://${parameters.endpoint}/v1/chat/completions" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"id": "workflow_step_2", | ||
"type": "register_remote_model", | ||
"previous_node_inputs": { | ||
"workflow_step_1": "connector_id" | ||
"name": "createconnector-registerremotemodel-deploymodel", | ||
"description": "test case", | ||
"use_case": "TEST_CASE", | ||
"version": { | ||
"template": "1.0.0", | ||
"compatibility": [ | ||
"2.12.0", | ||
"3.0.0" | ||
] | ||
}, | ||
"workflows": { | ||
"provision": { | ||
"nodes": [ | ||
{ | ||
"id": "workflow_step_1", | ||
"type": "create_connector", | ||
"user_inputs": { | ||
"name": "OpenAI Chat Connector", | ||
"description": "The connector to public OpenAI model service for GPT 3.5", | ||
"version": "1", | ||
"protocol": "http", | ||
"parameters": { | ||
"endpoint": "api.openai.com", | ||
"model": "gpt-3.5-turbo" | ||
}, | ||
"user_inputs": { | ||
"name": "openAI-gpt-3.5-turbo", | ||
"function_name": "remote", | ||
"description": "test model" | ||
} | ||
}, | ||
{ | ||
"id": "workflow_step_3", | ||
"type": "deploy_model", | ||
"previous_node_inputs": { | ||
"workflow_step_2": "model_id" | ||
} | ||
"credential": { | ||
"openAI_key": "12345" | ||
}, | ||
"actions": [ | ||
{ | ||
"action_type": "predict", | ||
"method": "POST", | ||
"url": "https://${parameters.endpoint}/v1/chat/completions" | ||
} | ||
] | ||
} | ||
], | ||
"edges": [ | ||
{ | ||
"source": "workflow_step_1", | ||
"dest": "workflow_step_2" | ||
}, | ||
{ | ||
"id": "workflow_step_2", | ||
"type": "register_remote_model", | ||
"previous_node_inputs": { | ||
"workflow_step_1": "connector_id" | ||
}, | ||
{ | ||
"source": "workflow_step_2", | ||
"dest": "workflow_step_3" | ||
"user_inputs": { | ||
"name": "openAI-gpt-3.5-turbo", | ||
"function_name": "remote", | ||
"description": "test model" | ||
} | ||
}, | ||
{ | ||
"id": "workflow_step_3", | ||
"type": "deploy_model", | ||
"previous_node_inputs": { | ||
"workflow_step_2": "model_id" | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"edges": [ | ||
{ | ||
"source": "workflow_step_1", | ||
"dest": "workflow_step_2" | ||
}, | ||
{ | ||
"source": "workflow_step_2", | ||
"dest": "workflow_step_3" | ||
} | ||
] | ||
} | ||
} | ||
} |