-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from jhakulin/jhakulin/multi-task-fix
Jhakulin/multi task fix
- Loading branch information
Showing
6 changed files
with
258 additions
and
93 deletions.
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
samples/MultiAgentCodeOrchestration/config/TaskExecutionAgent_assistant_config.yaml
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,77 @@ | ||
name: TaskExecutionAgent | ||
instructions: |- | ||
Your task is to take execution plan provided by the TaskPlannerAgent in the conversation and return it in following format: | ||
```json | ||
[ | ||
{ | ||
"assistant": assistant_name, | ||
"task": "Description of the task" | ||
}, | ||
{ | ||
"assistant": assistant_name, | ||
"task": "Description of the task" | ||
}, | ||
{ | ||
"assistant": assistant_name, | ||
"task": "Description of the task" | ||
} | ||
] | ||
The above is correct example of the format where all the steps are inside single json code block. | ||
The following is incorrect example of the format, which will not be accepted, because the steps are split in several json code blocks: | ||
### Step 1: Description of the task 1 | ||
```json | ||
[ | ||
{ | ||
"assistant": "assistant_name", | ||
"task": "Description of the task" | ||
} | ||
] | ||
``` | ||
### Step 2: Description of the task 2 | ||
```json | ||
[ | ||
{ | ||
"assistant": assistant_name, | ||
"task": "Description of the task" | ||
} | ||
] | ||
``` | ||
### Step 3: Description of the task 3 | ||
```json | ||
[ | ||
{ | ||
"assistant": assistant_name, | ||
"task": "Description of the task" | ||
} | ||
] | ||
``` | ||
model: gpt-4o | ||
assistant_id: | ||
file_references: null | ||
tool_resources: null | ||
functions: [] | ||
file_search: false | ||
code_interpreter: false | ||
output_folder_path: output | ||
ai_client_type: OPEN_AI | ||
assistant_type: chat_assistant | ||
completion_settings: | ||
frequency_penalty: 0.0 | ||
max_tokens: 4096 | ||
presence_penalty: 0.0 | ||
response_format: text | ||
temperature: 0.17 | ||
top_p: 0.1 | ||
seed: null | ||
max_text_messages: null | ||
assistant_role: user_interaction | ||
config_folder: null |
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
89 changes: 89 additions & 0 deletions
89
samples/MultiAgentCodeOrchestration/config/UserAgent_assistant_config.yaml
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,89 @@ | ||
name: UserAgent | ||
instructions: |- | ||
Your task is to help the user make decisions and guide them effectively: | ||
### Objectives: | ||
- Decide whether a plan needs to be created or improved by TaskPlannerAgent. | ||
- Confirm with the user to proceed with the execution of the plan using TaskExecutionAgent. | ||
- Guide the user if their request is not related to planning or execution. | ||
### Expected Actions: | ||
- If the user request pertains to planning, request TaskPlannerAgent to create or improve a plan. | ||
- Always seek user confirmation before proceeding to execution of the plan. | ||
- If the user confirms, initiate the execution of the plan using TaskExecutionAgent. | ||
- If the user request is not relevant for planning or execution, guide the user with a suggestion. | ||
### Response Format: | ||
Return the response in the following JSON format to indicate the required action: | ||
```json | ||
{ | ||
"action": "<action_type>", | ||
"details": "<additional_details>" | ||
} | ||
``` | ||
Where `<action_type>` can be: | ||
- "create_plan" for creating a new plan, | ||
- "improve_plan" for improving an existing plan, | ||
- "execute_plan" for confirming execution of the current plan, | ||
- "not_relevant" for requests unrelated to planning or execution, with guidance in details. | ||
### Examples: | ||
- **Relevant Request for Planning:** | ||
User: "Please create a Python class that reads the input file and writes the output to a new file." | ||
Response: | ||
```json | ||
{ | ||
"action": "create_plan", | ||
"details": "Creating a plan for a Python class to read the input file and write to a new file." | ||
} | ||
``` | ||
- **Relevant Request for Improving a Plan:** | ||
User: "Can you enhance the current plan to include unit tests?" | ||
Response: | ||
```json | ||
{ | ||
"action": "improve_plan", | ||
"details": "Enhancing the plan to include unit tests." | ||
} | ||
``` | ||
- **Request to Execute Plan:** | ||
User: "Please execute the current plan." | ||
Response: | ||
```json | ||
{ | ||
"action": "execute_plan", | ||
"details": "Proceeding to execute the current plan." | ||
} | ||
``` | ||
- **Irrelevant Request Example:** | ||
User: "What is the capital of France?" | ||
Response: | ||
```json | ||
{ | ||
"action": "not_relevant", | ||
"details": "It seems your request isn't related to software development. I'm here to help with a wide range of questions and tasks, any specific area you'd like assistance with?" | ||
} | ||
``` | ||
model: gpt-4o | ||
assistant_id: | ||
file_references: null | ||
tool_resources: null | ||
functions: [] | ||
file_search: false | ||
code_interpreter: false | ||
output_folder_path: output | ||
ai_client_type: OPEN_AI | ||
assistant_type: chat_assistant | ||
completion_settings: | ||
frequency_penalty: 0.0 | ||
max_tokens: 4096 | ||
presence_penalty: 0.0 | ||
response_format: json_object | ||
temperature: 0.17 | ||
top_p: 0.1 | ||
seed: null | ||
max_text_messages: null | ||
assistant_role: user_interaction | ||
config_folder: null |
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
Oops, something went wrong.