Apply latest changes to the Content Creator Application(Approach 2) #483
Apply latest changes to the Content Creator Application(Approach 2) #483udithishanka merged 1 commit intojaseci-labs:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Content Creator workflow (Approach 2) to align with Jac’s newer traversal and entry syntax, and adjusts LLM model configuration for the agent routing/execution flow.
Changes:
- Migrated walker entry syntax to
Root entryand traversal type filters to the(?:Type)/(?:Type, condition)form. - Standardized agent navigation
visitstatements to the updated traversal filter syntax. - Updated the global LLM initialization to
gpt-4o-miniwith a config dict.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| content_creator/byLLM/approach_2/main.jac | Updates model initialization and standardizes traversal/entry syntax used by the agent executor workflow. |
| content_creator/byLLM/approach_2/agent_core.jac | Migrates walker entry and graph query syntax; updates traversal filter usage in agent/session walkers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import sys; | ||
|
|
||
| glob llm = Model(model_name="gpt-4o", verbose=False); | ||
| glob llm = Model(model_name="gpt-4o-mini", config={"verbose": False}); |
There was a problem hiding this comment.
Model supports a top-level verbose parameter; putting "verbose" inside the config dict likely has no effect (and may diverge from how other modules configure logging). Prefer passing verbose=False directly, and reserve config for advanced settings like api_base, http_client, etc. (See jac-gpt-fullstack/services/docs/reference/plugins/byllm.md Model parameters table.)
| glob llm = Model(model_name="gpt-4o-mini", config={"verbose": False}); | |
| glob llm = Model(model_name="gpt-4o-mini", verbose=False); |
| visit [-->](?:node_cls) else { | ||
| attached_routed_node = here ++> node_inst; | ||
| visit attached_routed_node; | ||
| } |
There was a problem hiding this comment.
node_cls here is a runtime variable (resolved via get_node_class). Using it inside a typed traversal filter ((?:node_cls)) is not a valid node type reference in the new filter syntax, and will either fail to compile or never match, causing duplicate nodes to be attached every time. Consider querying outgoing nodes first and filtering with a predicate (e.g., via .filter(...)) or redesigning this to use a static node type / enum-to-type mapping.
| visit [-->](?:node_cls) else { | |
| attached_routed_node = here ++> node_inst; | |
| visit attached_routed_node; | |
| } | |
| attached_routed_node = here ++> node_inst; | |
| visit attached_routed_node; |
This pull request focuses on improving the syntax and configuration of agent routing and execution in the content creator workflow. The main changes involve standardizing the visit and entry syntax for agent navigation, updating the model configuration, and ensuring consistent handling of memory and session objects.
Syntax and Routing Improvements:
[-->](?Agent)and<--with the new form-->and<--` for clearer and more consistent agent navigation. [1] [2] [3] [4] [5] [6] [7]root entry {toRoot entry {in walker definitions for improved readability and uniformity.Memory and Session Handling:
[root --> (?:Memory)]and[memory --> (?:Session)], replacing the previous forms for more robust querying and object handling.Model Configuration:
llminitialization to usegpt-4o-miniwith a new config dictionary for verbosity, instead of the previous verbose parameter.These changes collectively enhance the maintainability, clarity, and reliability of agent routing and session management in the workflow.