Skip to content

Commit 1a53934

Browse files
committed
Fix the agent model by providing the right attribute to the ChatLiteLLM
1 parent dc798dc commit 1a53934

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jupyter_ai_jupyternaut/jupyternaut/jupyternaut.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ async def awrap_tool_call(
8585
) -> ToolMessage | Command:
8686
args = format_tool_args_compact(request.tool_call['args'])
8787
self.log.info(f"{request.tool_call['name']}({args})")
88-
88+
8989
try:
9090
result = await handler(request)
9191
self.log.info(f"{request.tool_call['name']} Done!")
@@ -126,7 +126,7 @@ def get_tools(self):
126126
return nb_toolkit
127127

128128
async def get_agent(self, model_id: str, model_args, system_prompt: str):
129-
model = ChatLiteLLM(**model_args, model_id=model_id, streaming=True)
129+
model = ChatLiteLLM(**model_args, model=model_id, streaming=True)
130130
memory_store = await self.get_memory_store()
131131

132132
if not hasattr(self, "search_tool"):
@@ -139,7 +139,7 @@ async def get_agent(self, model_id: str, model_args, system_prompt: str):
139139
self.tool_call_handler = ToolMonitoringMiddleware(
140140
persona=self
141141
)
142-
142+
143143
return create_agent(
144144
model,
145145
system_prompt=system_prompt,
@@ -177,7 +177,7 @@ async def create_aiter():
177177
node = metadata["langgraph_node"]
178178
content_blocks = token.content_blocks
179179
if (
180-
node == "model"
180+
node == "model"
181181
and content_blocks
182182
):
183183
if token.text:

0 commit comments

Comments
 (0)