Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify override for every TS dotenv call. #211

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion typescript/examples/calendar/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { CalendarActions } from './calendarActionsSchema';

const dotEnvPath = findConfig(".env");
assert(dotEnvPath, ".env file not found!");
dotenv.config({ path: dotEnvPath });
dotenv.config({ path: dotEnvPath, override: true });

const model = createLanguageModel(process.env);
const schema = fs.readFileSync(path.join(__dirname, "calendarActionsSchema.ts"), "utf8");
Expand Down
2 changes: 1 addition & 1 deletion typescript/examples/coffeeShop-zod/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { CoffeeShopSchema } from "./coffeeShopSchema";

const dotEnvPath = findConfig(".env");
assert(dotEnvPath, ".env file not found!");
dotenv.config({ path: dotEnvPath });
dotenv.config({ path: dotEnvPath, override: true });

const model = createLanguageModel(process.env);
const validator = createZodJsonValidator(CoffeeShopSchema, "Cart");
Expand Down
2 changes: 1 addition & 1 deletion typescript/examples/coffeeShop/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Cart } from "./coffeeShopSchema";

const dotEnvPath = findConfig(".env");
assert(dotEnvPath, ".env file not found!");
dotenv.config({ path: dotEnvPath });
dotenv.config({ path: dotEnvPath, override: true });

const model = createLanguageModel(process.env);
const schema = fs.readFileSync(path.join(__dirname, "coffeeShopSchema.ts"), "utf8");
Expand Down
2 changes: 1 addition & 1 deletion typescript/examples/healthData/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { createHealthDataTranslator } from "./translator";

const dotEnvPath = findConfig(".env");
assert(dotEnvPath, ".env file not found!");
dotenv.config({ path: dotEnvPath });
dotenv.config({ path: dotEnvPath, override: true });

const healthInstructions = `
Help me enter my health data step by step.
Expand Down
2 changes: 1 addition & 1 deletion typescript/examples/math/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { createModuleTextFromProgram, createProgramTranslator, evaluateJsonProgr

const dotEnvPath = findConfig(".env");
assert(dotEnvPath, ".env file not found!");
dotenv.config({ path: dotEnvPath });
dotenv.config({ path: dotEnvPath, override: true });

const model = createLanguageModel(process.env);
const schema = fs.readFileSync(path.join(__dirname, "mathSchema.ts"), "utf8");
Expand Down
2 changes: 1 addition & 1 deletion typescript/examples/multiSchema/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { createAgentRouter } from "./router";

const dotEnvPath = findConfig(".env");
assert(dotEnvPath, ".env file not found!");
dotenv.config({ path: dotEnvPath });
dotenv.config({ path: dotEnvPath, override: true });

const model = createLanguageModel(process.env);
const taskClassificationSchema = fs.readFileSync(path.join(__dirname, "classificationSchema.ts"), "utf8");
Expand Down
2 changes: 1 addition & 1 deletion typescript/examples/restaurant/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Order } from "./foodOrderViewSchema";

const dotEnvPath = findConfig(".env");
assert(dotEnvPath, ".env file not found!");
dotenv.config({ path: dotEnvPath });
dotenv.config({ path: dotEnvPath, override: true });

const model = createLanguageModel(process.env);
const viewSchema = fs.readFileSync(
Expand Down
2 changes: 1 addition & 1 deletion typescript/examples/sentiment-zod/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { SentimentSchema } from "./sentimentSchema";

const dotEnvPath = findConfig(".env");
assert(dotEnvPath, ".env file not found!");
dotenv.config({ path: dotEnvPath });
dotenv.config({ path: dotEnvPath, override: true });

const model = createLanguageModel(process.env);
const validator = createZodJsonValidator(SentimentSchema, "SentimentResponse");
Expand Down
2 changes: 1 addition & 1 deletion typescript/examples/sentiment/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { SentimentResponse } from "./sentimentSchema";

const dotEnvPath = findConfig(".env");
assert(dotEnvPath, ".env file not found!");
dotenv.config({ path: dotEnvPath });
dotenv.config({ path: dotEnvPath, override: true });

const model = createLanguageModel(process.env);
const schema = fs.readFileSync(path.join(__dirname, "sentimentSchema.ts"), "utf8");
Expand Down
Loading