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

Feature/composable prompts #1174

Merged
merged 13 commits into from
Nov 7, 2024
Merged

Feature/composable prompts #1174

merged 13 commits into from
Nov 7, 2024

Conversation

jamesrichards4
Copy link
Contributor

Context

Managing prompts is becoming a mess, we want to be able to store common information across prompts and to be able to reliably pass format information in without conflicting

Changes proposed in this pull request

Refactor all prompts to be just the task information, no system or format info should be provided. These are brought in from standard prompts system_info, persona_info, caller_info and format_instructions from the task if passed

NOTE: We want to do an additional piece of work here which is to redo the way we build AISettings each request to only use a set of sparse overrides from the db if created. That way we would always be using the default prompts from the settings unless we override them specifically in a deployment

Things to check

  • I have added any new ENV vars in all deployed environments
  • I have tested any code added or changed
  • I have run integration tests

)
# Set the system prompt to be our composed structure
# We preserve the format instructions
system_prompt_message = f"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@jamesrichards4 jamesrichards4 merged commit 677777c into main Nov 7, 2024
6 checks passed
@jamesrichards4 jamesrichards4 deleted the feature/composable-prompts branch November 7, 2024 14:32
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.

2 participants