diff --git a/examples/AnalyzeScientificPapersUsingFunctionCalls.mlx b/examples/AnalyzeScientificPapersUsingFunctionCalls.mlx index bcb4b2f..ef9f4ad 100644 Binary files a/examples/AnalyzeScientificPapersUsingFunctionCalls.mlx and b/examples/AnalyzeScientificPapersUsingFunctionCalls.mlx differ diff --git a/tests/texampleTests.m b/tests/texampleTests.m index 8f79c66..334a382 100644 --- a/tests/texampleTests.m +++ b/tests/texampleTests.m @@ -5,17 +5,16 @@ methods (TestClassSetup) function saveEnvVar(testCase) - % Ensures key is not in environment variable for tests openAIEnvVar = "OPENAI_KEY"; key = getenv(openAIEnvVar); - unsetenv(openAIEnvVar); - testCase.addTeardown(@(x) setenv(openAIEnvVar, x), key); + writelines("OPENAI_API_KEY="+key,".env"); + + testCase.addTeardown(@() delete(".env")); + testCase.addTeardown(@() unsetenv("OPENAI_API_KEY")); end end methods(Test) - % Test methods - function testAnalyzeScientificPapersUsingFunctionCalls(~) AnalyzeScientificPapersUsingFunctionCalls; end