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

New PromptBuilder returning list of messages #326

Merged
merged 4 commits into from Aug 16, 2023
Merged

Conversation

javipacheco
Copy link
Contributor

This PR changes the way to make prompts. This is the new way:

      val messages = buildPrompt {
        +system("Test System")
        +user("Test Query")
        +assistant("Test Assistant")
      }

buildPrompt returns a List<Message> that you can pass to prompt functions in the conversation scope.

This PR removes:

  • ExpertSystem
  • Old Message model that we are not using in xef.prompt package
  • The suspend functions in the Message companion object

raulraja
raulraja previously approved these changes Aug 14, 2023
Copy link
Contributor

@raulraja raulraja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @javipacheco

@javipacheco javipacheco merged commit d46e052 into main Aug 16, 2023
5 checks passed
@javipacheco javipacheco deleted the new-prompt-builder branch August 16, 2023 09:26
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.

None yet

4 participants