Skip to content

Commit ec37d25

Browse files
committed
abstract env vars for pydantic AI
1 parent a51cc29 commit ec37d25

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

typescript-sdk/apps/dojo/src/agents.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,22 @@ export const agentsIntegrations: AgentIntegrationConfig[] = [
3131
agents: async () => {
3232
return {
3333
agentic_chat: new PydanticAIAgent({
34-
url: "http://localhost:9000/agentic_chat/",
34+
url: `${envVars.pydanticAIUrl}/agentic_chat/`,
3535
}),
3636
agentic_generative_ui: new PydanticAIAgent({
37-
url: "http://localhost:9000/agentic_generative_ui/",
37+
url: `${envVars.pydanticAIUrl}/agentic_generative_ui/`,
3838
}),
3939
human_in_the_loop: new PydanticAIAgent({
40-
url: "http://localhost:9000/human_in_the_loop/",
40+
url: `${envVars.pydanticAIUrl}/human_in_the_loop/`,
4141
}),
4242
predictive_state_updates: new PydanticAIAgent({
43-
url: "http://localhost:9000/predictive_state_updates/",
43+
url: `${envVars.pydanticAIUrl}/predictive_state_updates/`,
4444
}),
4545
shared_state: new PydanticAIAgent({
46-
url: "http://localhost:9000/shared_state/",
46+
url: `${envVars.pydanticAIUrl}/shared_state/`,
4747
}),
4848
tool_based_generative_ui: new PydanticAIAgent({
49-
url: "http://localhost:9000/tool_based_generative_ui/",
49+
url: `${envVars.pydanticAIUrl}/tool_based_generative_ui/`,
5050
}),
5151
};
5252
},

typescript-sdk/apps/dojo/src/env.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ type envVars = {
22
serverStarterUrl: string;
33
serverStarterAllFeaturesUrl: string;
44
mastraUrl: string;
5-
langgraphUrl: string;
5+
langgraphUrl: string;
66
langgraphFastApiUrl: string;
77
agnoUrl: string;
88
llamaIndexUrl: string;
99
crewAiUrl: string;
10+
pydanticAIUrl: string;
1011
}
1112

1213
export default function getEnvVars(): envVars {
@@ -19,5 +20,6 @@ export default function getEnvVars(): envVars {
1920
agnoUrl: process.env.AGNO_URL || 'http://localhost:9001',
2021
llamaIndexUrl: process.env.LLAMA_INDEX_URL || 'http://localhost:9000',
2122
crewAiUrl: process.env.CREW_AI_URL || 'http://localhost:9002',
23+
pydanticAIUrl: process.env.PYDANTIC_AI_URL || 'http://localhost:9000',
2224
}
2325
}

0 commit comments

Comments
 (0)