Skip to content

Commit af6e499

Browse files
committed
Default model in init_graph
1 parent c55a727 commit af6e499

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

backend/src/agents/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ def init_graph(
6868
backend: CompositeBackend = None,
6969
) -> CompiledStateGraph:
7070
from langchain.chat_models import init_chat_model
71+
72+
if not model:
73+
model = DEFAULT_CHAT_MODEL
7174

7275
llm = init_chat_model(model=model)
7376

frontend/src/components/inputs/ChatInput.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,16 @@ export default function ChatInput({
138138
<div className="flex gap-1">
139139
{/* <ImageUpload /> */}
140140
<BaseToolMenu />
141+
{showAgentMenu && (
142+
<div className="max-w-62">
143+
<AgentMenu />
144+
</div>
145+
)}
141146
{/* File toggle button */}
142147
<Button
143-
variant={viewMode === "editor" ? "secondary" : "ghost"}
148+
variant={viewMode === "editor" ? "secondary" : "default"}
144149
size="sm"
145-
className="h-8 px-2 gap-1 relative"
150+
className="rounded-xl h-9 px-2 gap-1 relative w-9 p-0 justify-center"
146151
onClick={toggleViewMode}
147152
title={viewMode === "editor" ? "Back to Chat" : "Manage Files"}
148153
>
@@ -154,11 +159,7 @@ export default function ChatInput({
154159
)}
155160
</Button>
156161
</div>
157-
{showAgentMenu && (
158-
<div className="max-w-62">
159-
<AgentMenu />
160-
</div>
161-
)}
162+
162163
{metadata?.project_id && selectedProject && (
163164
<Button
164165
variant="ghost"

0 commit comments

Comments
 (0)