fix: Update jac-mcp-chatbot backend with the latest jaseci stack#492
fix: Update jac-mcp-chatbot backend with the latest jaseci stack#492udithishanka merged 1 commit intojaseci-labs:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request updates the jac-mcp-chatbot backend to align with the latest jaseci stack conventions, including modernizing Jac syntax, updating library imports, and fixing documentation. The PR addresses syntax deprecations and ensures consistency with the current Jac language specification.
Changes:
- Updated Jac walker syntax from legacy backtick notation to modern
Root entryand(?:Type)node filter syntax - Migrated langchain Document import from deprecated
langchain.schema.documenttolangchain_core.documents - Wrapped text parameters with explicit
Text()type constructors for type consistency in Image/VideoChat methods - Updated README command from deprecated
jac servetojac start
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools.jac | Updates Document import to use langchain_core.documents instead of deprecated langchain.schema.document |
| server.jac | Modernizes walker syntax to use Root entry and (?:Type) filters; modifies LLM configuration (has issue with verbose parameter placement) |
| server.impl.jac | Wraps visitor.message with Text() constructor for type-safe parameter passing to respond_with_image/video methods |
| README.md | Updates command from deprecated jac serve to current jac start |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| glob rag_engine:RagEngine = RagEngine(); | ||
| glob llm = Model(model_name='gpt-4o-mini', verbose=True); | ||
| glob llm = Model(model_name='gpt-4o-mini',config={"verbose": False}); |
There was a problem hiding this comment.
The verbose parameter should be a top-level parameter of the Model constructor, not inside the config dictionary. According to the byllm documentation and conventions used throughout the codebase (e.g., task_manager/byllm/BE/v1/main.jac:8), the config dictionary is reserved for advanced settings like api_base, http_client, and ca_bundle. The correct syntax should be: Model(model_name='gpt-4o-mini', verbose=False)
| glob llm = Model(model_name='gpt-4o-mini',config={"verbose": False}); | |
| glob llm = Model(model_name='gpt-4o-mini', verbose=False); |
textparameter in bothImageChat.chatandVideoChat.chatto explicitly use theTexttype, ensuring message content is consistently typed throughout the codebase.Root entryand the?:syntax for more robust and explicit node selection.llmglobal to pass theverboseflag via theconfigdictionary.Documentclass to uselangchain_core.documentsinstead oflangchain.schema.document, aligning with the latest library structure.README.mdto usejac startinstead of the outdatedjac serve.