diff --git a/.github/doxygen/Doxyfile b/.github/doxygen/Doxyfile index 3786c0a5..292a4a8e 100644 --- a/.github/doxygen/Doxyfile +++ b/.github/doxygen/Doxyfile @@ -48,7 +48,7 @@ PROJECT_NAME = "LLM for Unity" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = v3.0.0 +PROJECT_NUMBER = v3.0.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fefb893..e3f0e949 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## v3.0.1 +#### 🚀 Features + +- add Unity.Nuget.Newtonsoft-Json in the assembly definition (PR: #379) +- Update LlamaLib to v2.0.2 (llama.cpp b7777) (PR: #380) + +#### 🐛 Fixes + +- fix running in Editor with Android/iOS platform selected (PR: #378) + + ## v2.5.2 #### 🚀 Features diff --git a/CHANGELOG.release.md b/CHANGELOG.release.md index 86892386..528b3124 100644 --- a/CHANGELOG.release.md +++ b/CHANGELOG.release.md @@ -1,5 +1,9 @@ ### 🚀 Features -- Support Android x86-64 architecture (Magic Leap 2) (PR: #344) -- Combine ARM and Intel architectures of macOS (PR: #345) +- add Unity.Nuget.Newtonsoft-Json in the assembly definition (PR: #379) +- Update LlamaLib to v2.0.2 (llama.cpp b7777) (PR: #380) + +### 🐛 Fixes + +- fix running in Editor with Android/iOS platform selected (PR: #378) diff --git a/Editor/undream.llmunity.Editor.asmdef b/Editor/undream.llmunity.Editor.asmdef index 34c98f0a..1e64643e 100644 --- a/Editor/undream.llmunity.Editor.asmdef +++ b/Editor/undream.llmunity.Editor.asmdef @@ -4,6 +4,7 @@ "Editor" ], "references": [ - "undream.llmunity.Runtime" + "undream.llmunity.Runtime", + "Unity.Nuget.Newtonsoft-Json" ] -} \ No newline at end of file +} diff --git a/Runtime/LLMUnitySetup.cs b/Runtime/LLMUnitySetup.cs index 2d8ccb9f..953703f8 100644 --- a/Runtime/LLMUnitySetup.cs +++ b/Runtime/LLMUnitySetup.cs @@ -96,9 +96,9 @@ public class LLMUnitySetup { // DON'T CHANGE! the version is autocompleted with a GitHub action /// LLM for Unity version - public static string Version = "v3.0.0"; + public static string Version = "v3.0.1"; /// LlamaLib version - public static string LlamaLibVersion = "v2.0.0"; + public static string LlamaLibVersion = "v2.0.2"; /// LlamaLib release url public static string LlamaLibReleaseURL = $"https://github.com/undreamai/LlamaLib/releases/download/{LlamaLibVersion}"; /// LlamaLib name @@ -318,7 +318,7 @@ public static async Task AndroidExtractFile(string assetName, bool overwrite = f { if (!androidExtractTasks.TryGetValue(assetName, out extractionTask)) { -#if UNITY_ANDROID +#if !UNITY_EDITOR && UNITY_ANDROID extractionTask = AndroidExtractFileOnce(assetName, overwrite, log, chunkSize); #else extractionTask = Task.CompletedTask; diff --git a/Runtime/LlamaLib/LibraryLoader.cs b/Runtime/LlamaLib/LibraryLoader.cs index 6893cfde..aae01bed 100644 --- a/Runtime/LlamaLib/LibraryLoader.cs +++ b/Runtime/LlamaLib/LibraryLoader.cs @@ -40,7 +40,7 @@ public static IntPtr LoadLibrary(string libraryPath) if (string.IsNullOrEmpty(libraryPath)) throw new ArgumentNullException(nameof(libraryPath)); -#if (ANDROID || IOS || VISIONOS) || (UNITY_ANDROID || UNITY_IOS || UNITY_VISIONOS) +#if (ANDROID || IOS || VISIONOS) || (!UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS || UNITY_VISIONOS)) return Mobile.dlopen(libraryPath); #else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) @@ -64,7 +64,7 @@ public static IntPtr GetSymbol(IntPtr library, string symbolName) if (string.IsNullOrEmpty(symbolName)) throw new ArgumentNullException(nameof(symbolName)); -#if (ANDROID || IOS || VISIONOS) || (UNITY_ANDROID || UNITY_IOS || UNITY_VISIONOS) +#if (ANDROID || IOS || VISIONOS) || (!UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS || UNITY_VISIONOS)) return Mobile.dlsym(library, symbolName); #else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) @@ -86,7 +86,7 @@ public static void FreeLibrary(IntPtr library) if (library == IntPtr.Zero) return; -#if (ANDROID || IOS || VISIONOS) || (UNITY_ANDROID || UNITY_IOS || UNITY_VISIONOS) +#if (ANDROID || IOS || VISIONOS) || (!UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS || UNITY_VISIONOS)) Mobile.dlclose(library); #else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) @@ -192,7 +192,7 @@ private static class Mobile { public static IntPtr dlopen(string path) => dlopen(path, 1); -#if (ANDROID || IOS || VISIONOS) || (UNITY_ANDROID || UNITY_IOS || UNITY_VISIONOS) +#if (ANDROID || IOS || VISIONOS) || (!UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS || UNITY_VISIONOS)) [DllImport("__Internal")] public static extern IntPtr dlopen(string filename, int flags); diff --git a/Runtime/undream.llmunity.Runtime.asmdef b/Runtime/undream.llmunity.Runtime.asmdef index 800db04c..d6bef159 100644 --- a/Runtime/undream.llmunity.Runtime.asmdef +++ b/Runtime/undream.llmunity.Runtime.asmdef @@ -1,6 +1,7 @@ { "name": "undream.llmunity.Runtime", "references": [ - "Cloud.Unum.USearch" + "Cloud.Unum.USearch", + "Unity.Nuget.Newtonsoft-Json" ] -} \ No newline at end of file +} diff --git a/Tests/Editor/undream.llmunity.Editor.Tests.asmdef b/Tests/Editor/undream.llmunity.Editor.Tests.asmdef index d90631b6..17e26c89 100644 --- a/Tests/Editor/undream.llmunity.Editor.Tests.asmdef +++ b/Tests/Editor/undream.llmunity.Editor.Tests.asmdef @@ -1,7 +1,8 @@ { "name": "undream.llmunity.Editor.Tests", "references": [ - "undream.llmunity.Runtime" + "undream.llmunity.Runtime", + "Unity.Nuget.Newtonsoft-Json" ], "optionalUnityReferences": [ "TestAssemblies" diff --git a/VERSION b/VERSION index ad55eb85..b105cea1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v3.0.0 +v3.0.1 diff --git a/package.json b/package.json index 0dea1d41..a5890f82 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ai.undream.llm", - "version": "3.0.0", + "version": "3.0.1", "displayName": "LLM for Unity", "description": "LLM for Unity allows to run and distribute Large Language Models (LLMs) in the Unity engine.", "unity": "2022.3",