Skip to content

Commit bbf673a

Browse files
committed
2 parents 2c23514 + b957589 commit bbf673a

168 files changed

Lines changed: 3378 additions & 6948 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Travel_planner/BE/agent_brain.jac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import from byllm.llm { Model }
22

3-
glob llm = Model(model_name="gpt-4o-mini", verbose=False);
3+
glob llm = Model(model_name="gpt-4o-mini", config={"verbose": False});
44

55
"""
66
Defines the types of agents in the system:

Travel_planner/BE/agent_core.jac

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import from agent_brain { brain, AgentType, AgentRole, AgentResult }
55
import from agent_memory { memory }
66

77
# Global LLM instance used for agent reasoning and decision-making
8-
glob llm = Model(model_name="gpt-4o-mini", verbose=False);
8+
glob llm = Model(model_name="gpt-4o-mini", config={"verbose": False});
99

1010

1111
"""
@@ -199,7 +199,7 @@ node BaseAgent {
199199
}
200200

201201
if should_delegate {
202-
connected_agents = [-->(`?BaseAgent)] + [<--(`?BaseAgent)];
202+
connected_agents = [-->(?:BaseAgent)] + [<--(?:BaseAgent)];
203203

204204
# Decide which agent should handle the next step
205205
next_agent_data = self.brain.decide_next_agent(
@@ -221,8 +221,8 @@ node BaseAgent {
221221
print();
222222

223223
# Visit next agent based on role
224-
visit [-->(`?BaseAgent: agent_role == next_agent)] else {
225-
visit [<--(`?BaseAgent: agent_role == next_agent)];
224+
visit [-->(?:BaseAgent, agent_role == next_agent)] else {
225+
visit [<--(?:BaseAgent, agent_role == next_agent)];
226226
}
227227
} else {
228228
self.brain.store_agent_result(self.agent_role, self.final_result); # Store result globally

Travel_planner/BE/main.jac

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ walker chat {
99
static has auth: bool = False;
1010
}
1111

12-
can execute with `root entry {
13-
if [-->(`?Session)] {
12+
can execute with Root entry {
13+
if [-->(?:Session)] {
1414
visit [-->];
1515
} else {
1616
new_session = here ++> Session();
@@ -28,7 +28,7 @@ walker chat {
2828

2929
node Session {
3030
can generate_result with AgentVisitor entry {
31-
if [-->](`?BaseAgent) {
31+
if [-->](?:BaseAgent) {
3232
visit [-->];
3333
} else {
3434
UI_Agent = self ++> TripIntakeAgent();

Travel_planner/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ streamlit
22
byllm
33
requests
44
jaclang
5-
jac-cloud
5+
jac-scale
66
python-dotenv

content_creator/byLLM/approach_3(using_visit_by)/agent_core.jac

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ walker supervisor {
109109
return None;
110110
}
111111
def route_to_agent(utterance: str, history: str) -> AgentTypes abs;
112-
can supervise with `root entry {
113-
memory_list = [root --> (`?Memory)];
112+
can supervise with Root entry {
113+
memory_list = [root --> (?:Memory)];
114114
if not memory_list {
115115
memory_list = root ++> Memory();
116116
}
@@ -168,7 +168,7 @@ walker agent {
168168
return None;
169169
}
170170
def route_to_node(utterance: str, history: str) -> RoutingNodes abs;
171-
can execute with `root entry {
171+
can execute with Root entry {
172172
self.session = &(self.session_id);
173173
routed_node = self.route_to_node(self.utterance, self.session.get_history());
174174
node_cls = self.get_node_class(routed_node.value);
@@ -177,7 +177,7 @@ walker agent {
177177
return;
178178
}
179179
node_inst = node_cls();
180-
visit [-->(`?node_cls)] else {
180+
visit [-->(?:node_cls)] else {
181181
attached_routed_node = here ++> node_inst;
182182
visit attached_routed_node;
183183
}
@@ -188,14 +188,14 @@ walker get_all_sessions {
188188
obj __specs__ {
189189
static has auth: bool = False;
190190
}
191-
can get_all_sessions with `root entry {
192-
memory_list = [here --> (`?Memory)];
191+
can get_all_sessions with Root entry {
192+
memory_list = [here --> (?:Memory)];
193193
if not memory_list {
194194
report "No sessions found.";
195195
disengage;
196196
}
197197
memory = memory_list[0];
198-
session_list = [memory --> (`?Session)];
198+
session_list = [memory --> (?:Session)];
199199
report [{
200200
"id": jid(session),
201201
"created_at": session.created_at

content_creator/byLLM/approach_3(using_visit_by)/main.jac

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ node PlannerAgent {
5656
visitor.session.current_state["planning_complete"] = True;
5757

5858
print("Plan created, moving to writing stage");
59-
visit [<--](`?Supervisor);
59+
visit [<--](?:Supervisor);
6060
}
6161
}
6262

@@ -82,7 +82,7 @@ node WriterAgent {
8282
visitor.session.current_state["review_complete"] = False;
8383

8484
print("Content created, moving to review stage");
85-
visit [<--](`?Supervisor);
85+
visit [<--](?:Supervisor);
8686
}
8787
}
8888

@@ -113,7 +113,7 @@ node ReviewAgent{
113113

114114
if not content {
115115
print("No content to review, returning to supervisor");
116-
visit [<--](`?Supervisor);
116+
visit [<--](?:Supervisor);
117117
return;
118118
}
119119

@@ -148,7 +148,7 @@ node ReviewAgent{
148148
}
149149
}
150150

151-
visit [<--](`?Supervisor);
151+
visit [<--](?:Supervisor);
152152
}
153153
}
154154

@@ -188,8 +188,8 @@ walker agent_executor {
188188

189189

190190
}
191-
can init_graph with `root entry {
192-
memory_list = [root --> (`?Memory)];
191+
can init_graph with Root entry {
192+
memory_list = [root --> (?:Memory)];
193193
if not memory_list {
194194
memory_list = root ++> Memory();
195195
}
@@ -207,7 +207,7 @@ walker agent_executor {
207207

208208
print(f"Starting workflow for: {self.utterance}");
209209

210-
visit [-->](`?Supervisor) else {
210+
visit [-->](?:Supervisor) else {
211211
router_node = here ++> Supervisor();
212212
router_node ++> PlannerAgent();
213213
router_node ++> WriterAgent();

interview_platform/BE/interview.jac

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import from dotenv { load_dotenv }
22
import os;
33
import requests;
4-
import from mtllm.llm { Model }
4+
import from byllm.llm { Model }
55
import from PyPDF2 { PdfReader }
66
import from io { BytesIO }
77
import base64;
@@ -55,29 +55,22 @@ sem generate_next_question.history_str = "The conversation history so far, forma
5555
sem generate_next_question.cv_text = "The full text content of the candidate's CV or resume.";
5656

5757

58-
walker RegisterCandidatesWalker {
58+
walker:pub RegisterCandidatesWalker {
5959
has job_context: JobContext;
6060
has candidates: list[dict];
6161

62-
obj __specs__ { static has auth: bool = False; }
63-
64-
can execute with `root entry;
62+
can execute with Root entry;
6563
}
6664

67-
walker StartInterviewWalker {
65+
walker:pub StartInterviewWalker {
6866
has candidate_id: str;
6967

70-
obj _specs_ {
71-
static has auth: bool = False;
72-
}
73-
74-
can execute with `root entry;
68+
can execute with Root entry;
7569
}
7670

77-
walker SubmitAnswerWalker {
71+
walker:pub SubmitAnswerWalker {
7872
has candidate_id: str;
7973
has answer: str;
80-
obj __specs__ { static has auth: bool = False; }
8174

82-
can execute with `root entry;
75+
can execute with Root entry;
8376
}

interview_platform/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
jaclang
2-
jac-cloud
2+
jac-scale
3+
byllm
34
python-dotenv
45
openai
56
fastapi

jac-gpt-fullstack/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ cd Agentic-AI/jac-gpt-fullstack
1414
2. Install dependencies:
1515

1616
```bash
17-
jac add
17+
jac install
1818
```
1919

2020
3. Set environment variables:

jac-gpt-fullstack/components/DocumentationPanel.cl.jac

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,15 @@ def:pub DocumentationPanel(
1313
has selectedDoc: any = None;
1414
has loading: bool = False;
1515
has error: str = "";
16+
has defaultSuggestions: list = [];
1617

17-
# Default documentation suggestions
18-
defaultSuggestions = [
19-
{
20-
"url": "https://docs.jaseci.org/learn/tour/",
21-
"title": "Introduction to Jac"
22-
},
23-
{
24-
"url": "https://docs.jaseci.org/learn/data_spatial/nodes_and_edges/",
25-
"title": "Nodes and Edges"
26-
},
27-
{
28-
"url": "https://docs.jaseci.org/learn/data_spatial/walkers/",
29-
"title": "Walkers"
30-
},
31-
{
32-
"url": "https://docs.jaseci.org/ai-integration/",
33-
"title": "AI Integration"
34-
}
35-
];
18+
# Load default documentation suggestions from JSON
19+
useEffect(lambda -> None {
20+
fetch("../services/docs_links/default_suggestion_links.json")
21+
.then(lambda response: any -> any { return response.json(); })
22+
.then(lambda data: any -> None { defaultSuggestions = data; })
23+
.catch(lambda err: any -> None { console.log("Failed to load default suggestions:", err); });
24+
}, []);
3625

3726
# Ensure HTTPS for URLs
3827
def ensureHttpsUrl(url: str) -> str {
@@ -49,7 +38,7 @@ def:pub DocumentationPanel(
4938
} else {
5039
currentSuggestions = defaultSuggestions;
5140
}
52-
}, [suggestions, isVisible]);
41+
}, [suggestions, isVisible, defaultSuggestions]);
5342

5443
def handleSuggestionClick(suggestion: any) -> None {
5544
loading = True;

0 commit comments

Comments
 (0)