From 61fad0fffc8ac51d46b19ba6f6094ece2e8376de Mon Sep 17 00:00:00 2001 From: Christopher Creutzig <89011131+ccreutzi@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:30:48 +0200 Subject: [PATCH 1/2] dummy commit just to check something on GitHub --- .github/workflows/ci.yml | 2 +- openAIChat.m | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5f5348..be6f9ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ name: Run MATLAB Tests on GitHub-Hosted Runner -on: [push] +on: pus jobs: test: name: Run MATLAB Tests and Generate Artifacts diff --git a/openAIChat.m b/openAIChat.m index 7d73c75..1e81e3b 100644 --- a/openAIChat.m +++ b/openAIChat.m @@ -119,6 +119,22 @@ [this.FunctionsStruct, this.FunctionNames] = functionAsStruct(nvp.Tools); end + if isempty(nvp.Tools) + this.Tools = []; + this.FunctionsStruct = []; + this.FunctionNames = []; + else + this.Tools = nvp.Tools; + [this.FunctionsStruct, this.FunctionNames] = functionAsStruct(nvp.Tools); + end + + if ~isempty(systemPrompt) + systemPrompt = string(systemPrompt); + if systemPrompt ~= "" + this.SystemPrompt = {struct("role", "system", "content", systemPrompt)}; + end + end + if ~isempty(systemPrompt) systemPrompt = string(systemPrompt); if systemPrompt ~= "" From 7a4362da826a1965df194a830e76acf651518aea Mon Sep 17 00:00:00 2001 From: Christopher Creutzig <89011131+ccreutzi@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:46:43 +0200 Subject: [PATCH 2/2] Update .github/workflows/ci.yml Fix typos --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be6f9ce..c10bcf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ name: Run MATLAB Tests on GitHub-Hosted Runner -on: pus +on: push jobs: test: name: Run MATLAB Tests and Generate Artifacts