-
Notifications
You must be signed in to change notification settings - Fork 120
Feature/schedule #807
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
base: main
Are you sure you want to change the base?
Feature/schedule #807
Changes from all commits
8c5a76d
3017ad6
b543de4
73077d6
1afbfab
faf6f51
c85b207
429892b
691f29b
39cc8b8
a4197ae
55f6cc0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,18 @@ | ||
| # coding: utf-8 | ||
| # Copyright (c) 2025 inclusionAI. | ||
| import abc | ||
| import asyncio | ||
| import time | ||
| from typing import AsyncGenerator, TYPE_CHECKING, Tuple | ||
|
|
||
| from env_channel import EnvChannelMessage | ||
|
|
||
| from aworld.core.common import TaskItem, Observation | ||
| from aworld.core.context.amni import get_context_manager, ContextManager, ApplicationContext, AmniContext | ||
| from aworld.core.context.base import Context | ||
| from aworld.core.event.base import Message, Constants, TopicType, BackgroundTaskMessage, AgentMessage | ||
| from aworld.core.task import TaskResponse, TaskStatusValue, Task, Runner | ||
| from aworld.core.task import TaskResponse, TaskStatus, Task, Runner | ||
| from aworld.events.util import send_message | ||
| from aworld.logs.util import logger | ||
| from aworld.memory.main import MemoryFactory | ||
| from aworld.memory.models import MemoryHumanMessage, MessageMetadata | ||
| from aworld.runner import Runners | ||
| from aworld.runners import HandlerFactory | ||
| from aworld.runners.handler.base import DefaultHandler | ||
| from aworld.runners.hook.hooks import HookPoint | ||
|
|
||
| if TYPE_CHECKING: | ||
| from aworld.runners.event_runner import TaskEventRunner | ||
|
|
@@ -166,11 +159,11 @@ async def _merge_by_topic(self, message: Message): | |
| content = data.content | ||
| elif isinstance(data, Observation): | ||
| content = data.content | ||
| elif isinstance(data, EnvChannelMessage): | ||
| data = data.message | ||
| if not agent_id: | ||
| agent_id = data.get('env_content', {}).get('agent_id') | ||
| content = data | ||
| # elif isinstance(data, EnvChannelMessage): | ||
| # data = data.message | ||
| # if not agent_id: | ||
| # agent_id = data.get('env_content', {}).get('agent_id') | ||
| # content = data | ||
| elif isinstance(data, dict): | ||
| if not agent_id: | ||
| agent_id = data.get('env_content', {}).get('agent_id') | ||
|
Comment on lines
168
to
169
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with the
TaskStatusclass,TaskTypeValueshould also inherit fromstr. This makes it clearer that it's a group of string constants and allows for potential use in type hints if needed in the future.