Skip to content
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

feat:add code assistant type for the future #70

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions backend/app/core/graph/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def should_continue(state: TeamState) -> str:
if messages and isinstance(messages[-1], AIMessage) and messages[-1].tool_calls:
# TODO: what if multiple tool_calls?
for tool_call in messages[-1].tool_calls:
if tool_call["name"] == "AskHuman":
if tool_call["name"] == "ask_human":
return "call_human"
else:
return "call_tools"
Expand Down Expand Up @@ -816,10 +816,10 @@ async def generator(
ToolMessage(
tool_call_id=tool_call["id"],
content=interrupt.tool_message,
name="AskHuman",
name="ask_human",
)
for tool_call in tool_calls
if tool_call["name"] == "AskHuman"
if tool_call["name"] == "ask_human"
]
}
async for event in root.astream_events(state, version="v2", config=config):
Expand All @@ -836,7 +836,7 @@ async def generator(
return
# Determine if should return default or askhuman interrupt based on whether AskHuman tool was called.
for tool_call in message.tool_calls:
if tool_call["name"] == "AskHuman":
if tool_call["name"] == "ask_human":
response = ChatResponse(
type="interrupt",
name="human",
Expand Down
2 changes: 1 addition & 1 deletion backend/app/core/graph/checkpoint/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def convert_checkpoint_tuple_to_messages(
if last_message.type == "ai" and last_message.tool_calls:
# Check if any tool in last message is asking for human input
for tool_call in last_message.tool_calls:
if tool_call["name"] == "AskHuman":
if tool_call["name"] == "ask_human":
formatted_messages.append(
ChatResponse(
type="interrupt",
Expand Down
2 changes: 1 addition & 1 deletion backend/app/core/workflow/init_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def should_continue(state: TeamState) -> str:
messages: list[AnyMessage] = state["messages"]
if messages and isinstance(messages[-1], AIMessage) and messages[-1].tool_calls:
for tool_call in messages[-1].tool_calls:
if tool_call["name"] == "AskHuman":
if tool_call["name"] == "ask_human":
return "call_human"
# 使用工具名称到节点ID的映射
tool_name = tool_call["name"].lower()
Expand Down
7 changes: 1 addition & 6 deletions web/src/app/(applayout)/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ function Dashboard() {
Hi, {currentUser?.full_name || currentUser?.email} 👋🏼
</Text>
<Text>Welcome back, nice to see you again!</Text>
<Image
src={'https://sf-maas-uat-prod.oss-cn-shanghai.aliyuncs.com/outputs/f967b5c9-c3c8-4f4b-9f1f-708e2dfda39c_0.png'}
alt="aaa"
width={"auto"}
height={"auto"}
/>

</Box>
</Container>
</>
Expand Down
32 changes: 0 additions & 32 deletions web/src/app/flow/gen/page.tsx

This file was deleted.

22 changes: 0 additions & 22 deletions web/src/app/flow/show/ShowFlow.tsx

This file was deleted.

256 changes: 0 additions & 256 deletions web/src/app/flow/show/graphConfig.ts

This file was deleted.

8 changes: 0 additions & 8 deletions web/src/app/flow/show/page.tsx

This file was deleted.

Loading
Loading