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

Add Prompty as dependency #40287

Conversation

YusakuNo1
Copy link
Member

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:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@Copilot Copilot bot review requested due to automatic review settings March 31, 2025 08:02
Copy link
Contributor

@Copilot Copilot AI left a 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?"

@github-actions github-actions bot added the AI label Mar 31, 2025
@YusakuNo1 YusakuNo1 changed the base branch from main to feature/azure-ai-projects-beta9 March 31, 2025 08:03
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-ai-projects

@YusakuNo1 YusakuNo1 merged commit 75ae5da into Azure:feature/azure-ai-projects-beta9 Apr 1, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants