-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add Prompty as dependency #40287
Add Prompty as dependency #40287
Conversation
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.
Pull Request Overview
This pull request adds Prompty support to the AI Foundry Projects SDK by incorporating a new dependency and updating samples and utility functions accordingly.
- Added a new extras dependency "prompts" in setup.py.
- Introduced two samples demonstrating the use of Prompty with both file-based and string-based prompt templates.
- Implemented utility and patch functions to integrate Prompty along with updating the SDK version and changelog.
Reviewed Changes
Copilot reviewed 8 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
sdk/ai/azure-ai-projects/setup.py | Adds the "prompts" extras dependency to include Prompty and PyYAML. |
sdk/ai/azure-ai-projects/samples/inference/sample_chat_completions_with_azure_ai_inference_client_and_prompty.py | Introduces a sample using a prompty file for chat completions. |
sdk/ai/azure-ai-projects/samples/inference/sample_chat_completions_with_azure_ai_inference_client_and_prompt_string.py | Introduces a sample utilizing a prompt template string for chat completions. |
sdk/ai/azure-ai-projects/azure/ai/projects/prompts/_utils.py | Provides a utility function for processing multiline strings. |
sdk/ai/azure-ai-projects/azure/ai/projects/prompts/_patch.py | Implements the PromptTemplate patch and related prompt processing functionality. |
sdk/ai/azure-ai-projects/azure/ai/projects/prompts/init.py | Sets up the Prompty module integration and applies the patch. |
sdk/ai/azure-ai-projects/azure/ai/projects/_version.py | Updates the version from 1.0.0b8 to 1.0.0b9. |
sdk/ai/azure-ai-projects/CHANGELOG.md | Updates the changelog to reflect the addition of Prompty support. |
Files not reviewed (4)
- .vscode/cspell.json: Language not supported
- sdk/ai/azure-ai-projects/dev_requirements.txt: Language not supported
- sdk/ai/azure-ai-projects/samples/inference/sample1.prompty: Language not supported
- shared_requirements.txt: Language not supported
Comments suppressed due to low confidence (2)
sdk/ai/azure-ai-projects/samples/inference/sample_chat_completions_with_azure_ai_inference_client_and_prompty.py:43
- [nitpick] The variable name 'input' shadows the built-in function. Consider renaming it to 'user_input' for greater clarity.
input = "When I arrived, can I still have breakfast?"
sdk/ai/azure-ai-projects/samples/inference/sample_chat_completions_with_azure_ai_inference_client_and_prompt_string.py:59
- [nitpick] The variable name 'input' shadows the built-in function. Consider renaming it to 'user_input' to avoid confusion.
input = "When I arrived, can I still have breakfast?"
API change check APIView has identified API level changes in this PR and created following API reviews. |
75ae5da
into
Azure:feature/azure-ai-projects-beta9
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines