diff --git a/Directory.Packages.props b/Directory.Packages.props index 47a35c9bf..ffc08d0c3 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -15,7 +15,9 @@ + + diff --git a/examples/105-dotnet-serverless-llamasharp/105-dotnet-serverless-llamasharp.csproj b/examples/105-dotnet-serverless-llamasharp/105-dotnet-serverless-llamasharp.csproj index 04dcf6060..4e7666368 100644 --- a/examples/105-dotnet-serverless-llamasharp/105-dotnet-serverless-llamasharp.csproj +++ b/examples/105-dotnet-serverless-llamasharp/105-dotnet-serverless-llamasharp.csproj @@ -5,6 +5,14 @@ enable + + + + + + + + diff --git a/examples/105-dotnet-serverless-llamasharp/Program.cs b/examples/105-dotnet-serverless-llamasharp/Program.cs index 586dc465b..59e89382a 100644 --- a/examples/105-dotnet-serverless-llamasharp/Program.cs +++ b/examples/105-dotnet-serverless-llamasharp/Program.cs @@ -3,6 +3,19 @@ using Microsoft.KernelMemory; using Microsoft.KernelMemory.AI.OpenAI; +/* PLEASE NOTE: + * + * The example is pre-configured to use a CPU backend. + * + * If your device provides CUDA or other backends, you can configure the example by editing the project file (*.csproj) + * and editing the LLamaSharp PackageReference, removing the CPU backend and choosing a different one. + * + * Kernel Memory web service is configured to not have ANY pre-configured LLamaSharp backend, e.g. KM Docker + * image does not work with LLamaSharp without manually mounting a LLamaSharp backend assembly into the + * Docker image at runtime. Same for custom .NET apps, which need to choose a LLamaSharp backend manually + * installing one of the available LLamaSharp.Backend packages. + */ + var llamaConfig = new LlamaSharpConfig(); var azureOpenAIEmbeddingConfig = new AzureOpenAIConfig(); diff --git a/extensions/LlamaSharp/LlamaSharp/LlamaSharp.csproj b/extensions/LlamaSharp/LlamaSharp/LlamaSharp.csproj index 3163f982b..57ff58411 100644 --- a/extensions/LlamaSharp/LlamaSharp/LlamaSharp.csproj +++ b/extensions/LlamaSharp/LlamaSharp/LlamaSharp.csproj @@ -14,8 +14,16 @@ - - + + + + + + + diff --git a/service/Service/Service.csproj b/service/Service/Service.csproj index c961e7bd4..be429224b 100644 --- a/service/Service/Service.csproj +++ b/service/Service/Service.csproj @@ -20,6 +20,15 @@ + + + + + + + +