-
Notifications
You must be signed in to change notification settings - Fork 335
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
feat: Add a new Orchestrator "prompt_flow" #1026
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 tasks
Coverage Report •
|
adamdougal
requested changes
Jun 10, 2024
…en there are multiple user messages like in case of an error
adamdougal
reviewed
Jun 11, 2024
adamdougal
previously approved these changes
Jun 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Great work!
We need to make some changes to support citations but we can add that later.
adamdougal
approved these changes
Jun 14, 2024
🎉 This PR is included in version 1.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces a new orchestration strategy called
Prompt Flow
in the codebase. The changes include adding new environment variables, updating the orchestration strategy enumeration, creating a newPromptFlowOrchestrator
class, and updating the orchestrator selection logic to include the new strategy. Additionally, theLLMHelper
class has been updated to support the new strategy, and unit tests have been added to verify the changes. Lastly, the local deployment documentation has been updated to reflect these changes.New Environment Variables:
.env.sample
: Added new environment variables related to the Prompt Flow orchestration strategy.code/backend/batch/utilities/helpers/env_helper.py
: Updated the__load_config
method to load the new environment variables.infra/prompt-flow/create-prompt-flow.sh
: Updates the script to set environment variables locally and on web app. Assigns Azure ML Data Scientist role to web app for listing keys and accessing the scoring endpoint.Orchestration Strategy Changes:
code/backend/batch/utilities/orchestrator/orchestration_strategy.py
: AddedPROMPT_FLOW
to theOrchestrationStrategy
enumeration.code/backend/batch/utilities/orchestrator/strategies.py
: Updated theget_orchestrator
method to return an instance ofPromptFlowOrchestrator
when thePROMPT_FLOW
strategy is selected.New
PromptFlowOrchestrator
Class:code/backend/batch/utilities/orchestrator/prompt_flow.py
: Created a newPromptFlowOrchestrator
class that implements the orchestration logic for the Prompt Flow strategy.LLMHelper
Class Changes:code/backend/batch/utilities/helpers/llm_helper.py
: Updated theLLMHelper
class to support the Prompt Flow strategy. This includes adding new methods to interact with the Azure ML workspace and transform the chat history. [1] [2]Unit Tests:
code/tests/utilities/helpers/test_llm_helper.py
: Added new unit tests to verify the changes in theLLMHelper
class. [1] [2] [3]code/tests/utilities/orchestrator/test_prompt_flow.py
: Added new unit tests to verify thePromptFlowOrchestrator
class.Documentation Updates:
docs/LOCAL_DEPLOYMENT.md
,docs/TEAMS_LOCAL_DEPLOYMENT.md
: Updated the local deployment documentation to reflect the new orchestration strategy and environment variables. [1] [2]Fixes local configuration of frontend
code/frontend/vite.config.ts
: Updates the vite configuration so port is exposed locally when running from a dev container. This fixes an issue some users where experiencing.Limitations:
Closing #979