Using LLamaSharp to implement custom TextCompletion and EmbeddingGeneration of Semantic Kernel
- Clone this repository.
- Download a llama model. If you don't know which model is available, please refer to LLamaSharp Verified Models.
- Modify the path of model and prompt file in
samples/SK_LLamaSharpWebApi/appsettings.json
. - Change the backend type if you want to, by modifying
SK_LLamaSharpWebApi.csproj
andDirectory.Packages.props
. - Run the sample. It's recommended to run with release mode or x64 configuration.
- Send the request to the web api to test.