Skip to content
Merged
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 jupyter_ai_jupyternaut/jupyternaut/jupyternaut.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async def awrap_tool_call(
) -> ToolMessage | Command:
args = format_tool_args_compact(request.tool_call['args'])
self.log.info(f"{request.tool_call['name']}({args})")

try:
result = await handler(request)
self.log.info(f"{request.tool_call['name']} Done!")
Expand Down Expand Up @@ -126,7 +126,7 @@ def get_tools(self):
return nb_toolkit

async def get_agent(self, model_id: str, model_args, system_prompt: str):
model = ChatLiteLLM(**model_args, model_id=model_id, streaming=True)
model = ChatLiteLLM(**model_args, model=model_id, streaming=True)
memory_store = await self.get_memory_store()

if not hasattr(self, "search_tool"):
Expand All @@ -139,7 +139,7 @@ async def get_agent(self, model_id: str, model_args, system_prompt: str):
self.tool_call_handler = ToolMonitoringMiddleware(
persona=self
)

return create_agent(
model,
system_prompt=system_prompt,
Expand Down Expand Up @@ -177,7 +177,7 @@ async def create_aiter():
node = metadata["langgraph_node"]
content_blocks = token.content_blocks
if (
node == "model"
node == "model"
and content_blocks
):
if token.text:
Expand Down