Experimental python updates: memory, embeddings, native functions, chat w/ memory #37
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.
Motivation and Context
In an effort to port more of the original code over to Python, this PR adds the following:
core_skill
in Python ---TextMemorySkill
(inferring the delegate type is tricky here without C#'s nice reflection capabilities... probably need some way to "error" if a Skill's functions aren't fully type-annotated as that's how I figured out the right delegate type)memory
subsystem (the C# code was hard to trace, especially given that I needed to reconcile custom embeddings-code and our numpy-based impl, probably bugs to work out there)Description
At this point, I'd say we have maybe ~60/70% of the core (as it exists right now on the main branch) functionality in Python. We can define semantic functions, template prompts (that have Var/Code blocks), define native functions, work with memory/embeddings, etc. We're missing a lot of tests and things like chunking text. We're also missing everything related to the planner.
There's now some low-hanging fruit here to address for the port:
openai
package and everything, just needs to override certain params)Contribution Checklist
N/A for now, just trying to get all of the code ported.