Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Contributions #143

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

DanteAusonio
Copy link

What

5 key additions to the project:

  1. Conversation Model allowing full conversation history to be stored in a single object. Includes methods for appending system, assistant, and user messages. Includes methods for chat history containing only user and ai messages, and chat history containing a history buffer (last n messages that fall with in token limit)
  2. String Extension to allow for token counting on any string.
  3. Memory Models. Use Chat GPT to generate different types of memory. Can be used dynamically in Agents thanks to Strategy Design Pattern.
  4. Chat System & Phase Models. A chat system is an LLM system that allows the conversational assistant to change its behavior as the conversation progresses. This is accomplished using an Injector Agent (see Keep CompletionQuery struct up to date #5). Each system has a set of phases which represent the set of roles the conversational ai can take on.
  5. Injector Agent: This observational ai performs check ins on a user's conversation with the conversational ai. It determines which of the phases from the chat system the conversational ai should enter, and injects system prompts to dynamically change the direction of the conversation and behavior of the conversational agent as the conversation progresses. The injector Agent is a conversational system of my own creation that is very versatile and can result in far more complex conversations, but also serves as an example use of the memory models, as well as Chat System and Phase models.

Why

I made these contributions to the project because I think it would be powerful to start implementing langchain type functionality. We have the basics down, now we can start adding higher levels of abstraction. The Conversation Model and String token count Extension seemed like necessary additions. The conversation model is a straight forward and robust way to store full conversations, and allows for easy addition of new messages, as well as is well suited for UI implementation.

Affected Areas

Nothing preexisting was changed. I only added new files and objects on top of what was already there

I'm trying to integrate my changes. Just copied all of my files over but now it's bitching at me because it needs to use API key, but how am I supposed to pass API key into a swift package?
Copy link

sonarcloud bot commented Jan 4, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

8 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant