Add TextEmbedding for Semantic Kernel #139
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Going off of my last PR, this tried to add TextEmbedding for Semantic Kernel to LLamaSharp.
I am having a few issues with this so far: I ported two examples that use Embedding, but they don't work right. None of the memories can be recalled, although I think they are saving. I'm not sure if the issue is with the code I've added, issues with LLamaEmbedder, or llama.cpp itself, or the model I'm using, or a combination of them.Upon bumping to the newest master code and using a GGUF LLama2 model, the embedding code started to (mostly) work and I could get results from the memory example. It does return results I would expect (Although not one to one with their output, that's fine since these are not the same and the numbers seem to be correct for what they are).
https://gist.github.com/drasticactions/0c90cac41ef890d507fe584f94e3b1a2
I removed the memory skill example as that still doesn't work, but I think that's due to the executor what what's being done behind the scenes in SK for the OpenAI/Azure ones with setting the correct prompts to let it work right. That may require more wrappers to be written, but since this underlying implementation should work, it's fine to add it in now.
cc @Arlodotexe