Skip to content

Commit efa991a

Browse files
authored
fix: circle import issue (eigent-ai#1139)
1 parent 7c287fe commit efa991a

6 files changed

Lines changed: 1177 additions & 1149 deletions

File tree

backend/app/model/chat.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,17 @@
1515
import json
1616
import logging
1717
import re
18-
from enum import Enum
1918
from pathlib import Path
2019
from typing import Literal
2120

2221
from camel.types import ModelType, RoleType
2322
from pydantic import BaseModel, Field, field_validator
2423

25-
from app.agent.prompt import DEFAULT_SUMMARY_PROMPT
24+
from app.model.enums import DEFAULT_SUMMARY_PROMPT, Status
2625

2726
logger = logging.getLogger("chat_model")
2827

2928

30-
class Status(str, Enum):
31-
confirming = "confirming"
32-
confirmed = "confirmed"
33-
processing = "processing"
34-
done = "done"
35-
36-
3729
class ChatHistory(BaseModel):
3830
role: RoleType
3931
content: str

backend/app/model/enums.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# ========= Copyright 2025-2026 @ Eigent.ai All Rights Reserved. =========
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# ========= Copyright 2025-2026 @ Eigent.ai All Rights Reserved. =========
14+
15+
from enum import Enum
16+
17+
18+
class Status(str, Enum):
19+
confirming = "confirming"
20+
confirmed = "confirmed"
21+
processing = "processing"
22+
done = "done"
23+
24+
25+
DEFAULT_SUMMARY_PROMPT = (
26+
"After completing the task, please generate"
27+
" a summary of the entire task completion. "
28+
"The summary must be enclosed in"
29+
" <summary></summary> tags and include:\n"
30+
"1. A confirmation of task completion,"
31+
" referencing the original goal.\n"
32+
"2. A high-level overview of the work"
33+
" performed and the final outcome.\n"
34+
"3. A bulleted list of key results"
35+
" or accomplishments.\n"
36+
"Adopt a confident and professional tone."
37+
)

backend/app/service/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
from app.model.chat import (
3030
AgentModelConfig,
3131
McpServers,
32-
Status,
3332
SupplementChat,
3433
UpdateData,
3534
)
35+
from app.model.enums import Status
3636

3737
logger = logging.getLogger("task_service")
3838

0 commit comments

Comments
 (0)