mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 02:19:06 +00:00
1f1fc97cf0f4d6832c00e9c7b44969bec0fa828d
476
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
89686e3729 |
Python: Update 04-kernel-arguments-chat.ipynb (#5910)
InputVariable name should be changed from "input" to "user_input". But in my test, Both works well. chat_history.add_user_message(input_text) command should be after kernel.invoke() function. Otherwise chat_history will include the current new input_text in the prompt. It is not necessary. ### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄 Co-authored-by: Eduard van Valkenburg <[email protected]> Co-authored-by: Evan Mattson <[email protected]> |
||
|
|
7b194980b5 |
Python: Update import paths for OpenAI settings functions (#6059)
This commit corrects the import paths for openai_settings_from_dot_env and azure_openai_settings_from_dot_env functions (and some more). Previously, these functions were incorrectly accessed directly from the semantic_kernel module. The updated paths point correctly to semantic_kernel.utils.settings, aligning with the package structure. This change ensures better code maintainability and error-free imports. ### Motivation and Context Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: **Why is this change required?** The change is required to correct incorrect import paths for configuration loading functions which were previously leading to AttributeError. This improvement ensures that the module imports function correctly and aligns with the expected package structure. **What problem does it solve?** This change solves the problem of AttributeError being thrown when attempting to access openai_settings_from_dot_env and azure_openai_settings_from_dot_env. These functions were incorrectly imported, causing module resolution errors in the user's environment. **What scenario does it contribute to?** This contributes to scenarios where developers need to integrate the semantic-kernel package seamlessly with their projects without encountering import errors. It facilitates easier setup and usage of the semantic-kernel functionalities, particularly in settings involving environmental configurations for AI services. ### Description This update corrects the import paths for **openai_settings_from_dot_env** and **azure_openai_settings_from_dot_env** by specifying their correct locations within the **semantic_kernel.utils.settings** module. Previously, attempts to import these functions directly from the **semantic_kernel** root module led to errors. The corrected paths ensure these essential configuration functions are accessible, supporting error-free configuration loading for OpenAI and Azure AI services integration. ### Contribution Checklist - [x] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄 Co-authored-by: Konstantin Kohl <[email protected]> Co-authored-by: Evan Mattson <[email protected]> |
||
|
|
deb813bdca |
Python: Remove references to text-davinci-003 text models as it causes tests to hang. (#6089)
### Motivation and Context Python PR merges were failing due to integration tests. Local integration tests were hanging on running Azure text completions. It appears text-davinci-003 was deprecated, and needed to be replaced by gpt-35-turbo-instruct. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description Remove references to text-davinci-003 text models as it causes tests to hang.to hang. Updated to gpt-35-turbo-instruct, which passes. Add EastUS AOAI deployment name var. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄 |
||
|
|
ac6e03ba98 |
Java: Python: Docs: Fix broken link (#6092)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> `https://openai.com/product` is failing `Check .md links` workflow. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Revise links. https://github.com/microsoft/semantic-kernel/actions/workflows/markdown-link-check.yml Whitespace edits peformed by VS Code ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄 |
||
|
|
ea25f6232d |
Python: Fix typo in line to instantiate Kernel. (#6020)
Kernel is already imported and there's no sk reference anymore since it was removed last week in: Python: fixing python readme (https://github.com/microsoft/semantic-kernel/pull/5903) ### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? The change https://github.com/microsoft/semantic-kernel/pull/5903 imported Kernel directly so the code no longer works as written 2. What problem does it solve? Code sample does not run 3. What scenario does it contribute to? sample code in README.md working 4. If it fixes an open issue, please link to the issue here. None --> ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄 |
||
|
|
8fd1f6a22e |
Python: Replace 'import_plugin_from_object' with 'add_plugin' (#6025)
'import_plugin_from_object' is removed from Kernel. Replace it's usage with add_plugin in function docstring ### Motivation and Context Fix docstrings of core_plugins to replace 'import_plugin_from_object' with 'add_plugin'. ### Description 'import_plugin_from_object' is removed from Kernel. Replace it's usage with 'add_plugin' in docstring ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 Co-authored-by: Eduard van Valkenburg <[email protected]> |
||
|
|
65e94b3454 |
Python: updated Chat Message Content with Function Call and Result Content (#5946)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Introducing FunctionCallContent and FunctionResultContent Changed ChatRole to AuthorRole Adapting ChatMessageContent to have 1 or more other contents within (currently TextContent or one of the above) Closes #5890 ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Changed OpenAI classes, to remove OpenAIChatMessageContent and AzureChatMessageContent Changed OpenAI classes to create and parse FunctionCallContent and other new things. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄 |
||
|
|
373083b7d8 |
.Net: Azure CosmosDB Mongo vCore Memory Store Integration (#5228)
## Motivation and Context (Why the change? What's the scenario?) I have added Azure Cosmos DB Mongo vCore as Memory to be used by customers using Kernel Memory and Cosmos DB for their LLM applications. [https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/vcore/vector-search](url) --------- Co-authored-by: Mark Wallace <[email protected]> Co-authored-by: Dmytro Struk <[email protected]> Co-authored-by: Eduard van Valkenburg <[email protected]> |
||
|
|
7d2ac133bc |
Python: move Hugging Face tests to integration (#5983)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Even though the completion itself does not callout, loading the model is a HTTP call, hence moving the Hugging Face tests to Integration tests. Plus small fix to make them run. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 |
||
|
|
3cb279774a |
Python: Bump ruff from 0.3.7 to 0.4.1 in /python (#5966)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.3.7 to 0.4.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/releases">ruff's releases</a>.</em></p> <blockquote> <h2>v0.4.1</h2> <h2>Changes</h2> <h3>Preview features</h3> <ul> <li>[<code>pylint</code>] Implement <code>invalid-hash-returned</code> (<code>PLE0309</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10961">#10961</a>)</li> <li>[<code>pylint</code>] Implement <code>invalid-index-returned</code> (<code>PLE0305</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10962">#10962</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>[<code>pylint</code>] Allow <code>NoReturn</code>-like functions for <code>__str__</code>, <code>__len__</code>, etc. (<code>PLE0307</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/11017">#11017</a>)</li> <li>Parser: Use empty range when there's "gap" in token source (<a href="https://redirect.github.com/astral-sh/ruff/pull/11032">#11032</a>)</li> <li>[<code>ruff</code>] Ignore stub functions in <code>unused-async</code> (<code>RUF029</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/11026">#11026</a>)</li> <li>Parser: Expect indented case block instead of match stmt (<a href="https://redirect.github.com/astral-sh/ruff/pull/11033">#11033</a>)</li> </ul> <h2>Contributors</h2> <ul> <li><a href="https://github.com/AlexWaygood"><code>@AlexWaygood</code></a></li> <li><a href="https://github.com/HenryAsa"><code>@HenryAsa</code></a></li> <li><a href="https://github.com/MithicSpirit"><code>@MithicSpirit</code></a></li> <li><a href="https://github.com/charliermarsh"><code>@charliermarsh</code></a></li> <li><a href="https://github.com/dhruvmanila"><code>@dhruvmanila</code></a></li> <li><a href="https://github.com/tibor-reiss"><code>@tibor-reiss</code></a></li> </ul> <h2>v0.4.0</h2> <h2>Changes</h2> <h3>A new, hand-written parser</h3> <p>Ruff's new parser is <strong>>2x faster</strong>, which translates to a <strong>20-40% speedup</strong> for all linting and formatting invocations. There's a lot to say about this exciting change, so check out the <a href="https://astral.sh/blog/ruff-v0.4.0">blog post</a> for more details!</p> <p>See <a href="https://redirect.github.com/astral-sh/ruff/pull/10036">#10036</a> for implementation details.</p> <h3>A new language server in Rust</h3> <p>With this release, we also want to highlight our new language server. <code>ruff server</code> is a Rust-powered language server that comes built-in with Ruff. It can be used with any editor that supports the <a href="https://microsoft.github.io/language-server-protocol/">Language Server Protocol</a> (LSP). It uses a multi-threaded, lock-free architecture inspired by <code>rust-analyzer</code> and it will open the door for a lot of exciting features. It’s also faster than our previous <a href="https://github.com/astral-sh/ruff-lsp">Python-based language server</a> -- but you probably guessed that already.</p> <p><code>ruff server</code> is only in alpha, but it has a lot of features that you can try out today:</p> <ul> <li>Lints Python files automatically and shows quick-fixes when available</li> <li>Formats Python files, with support for range formatting</li> <li>Comes with commands for quickly performing actions: <code>ruff.applyAutofix</code>, <code>ruff.applyFormat</code>, and <code>ruff.applyOrganizeImports</code></li> <li>Supports <code>source.fixAll</code> and <code>source.organizeImports</code> source actions</li> <li>Automatically reloads your project configuration when you change it</li> </ul> <p>To setup <code>ruff server</code> with your editor, refer to the <a href="https://github.com/astral-sh/ruff/blob/main/crates/ruff_server/README.md">README.md</a>.</p> <h3>Preview features</h3> <ul> <li>[<code>pycodestyle</code>] Do not trigger <code>E3</code> rules on <code>def</code>s following a function/method with a dummy body (<a href="https://redirect.github.com/astral-sh/ruff/pull/10704">#10704</a>)</li> <li>[<code>pylint</code>] Implement <code>invalid-bytes-returned</code> (<code>E0308</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10959">#10959</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's changelog</a>.</em></p> <blockquote> <h2>0.4.1</h2> <h3>Preview features</h3> <ul> <li>[<code>pylint</code>] Implement <code>invalid-hash-returned</code> (<code>PLE0309</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10961">#10961</a>)</li> <li>[<code>pylint</code>] Implement <code>invalid-index-returned</code> (<code>PLE0305</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10962">#10962</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>[<code>pylint</code>] Allow <code>NoReturn</code>-like functions for <code>__str__</code>, <code>__len__</code>, etc. (<code>PLE0307</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/11017">#11017</a>)</li> <li>Parser: Use empty range when there's "gap" in token source (<a href="https://redirect.github.com/astral-sh/ruff/pull/11032">#11032</a>)</li> <li>[<code>ruff</code>] Ignore stub functions in <code>unused-async</code> (<code>RUF029</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/11026">#11026</a>)</li> <li>Parser: Expect indented case block instead of match stmt (<a href="https://redirect.github.com/astral-sh/ruff/pull/11033">#11033</a>)</li> </ul> <h2>0.4.0</h2> <h3>A new, hand-written parser</h3> <p>Ruff's new parser is <strong>>2x faster</strong>, which translates to a <strong>20-40% speedup</strong> for all linting and formatting invocations. There's a lot to say about this exciting change, so check out the <a href="https://astral.sh/blog/ruff-v0.4.0">blog post</a> for more details!</p> <p>See <a href="https://redirect.github.com/astral-sh/ruff/pull/10036">#10036</a> for implementation details.</p> <h3>A new language server in Rust</h3> <p>With this release, we also want to highlight our new language server. <code>ruff server</code> is a Rust-powered language server that comes built-in with Ruff. It can be used with any editor that supports the <a href="https://microsoft.github.io/language-server-protocol/">Language Server Protocol</a> (LSP). It uses a multi-threaded, lock-free architecture inspired by <code>rust-analyzer</code> and it will open the door for a lot of exciting features. It’s also faster than our previous <a href="https://github.com/astral-sh/ruff-lsp">Python-based language server</a> -- but you probably guessed that already.</p> <p><code>ruff server</code> is only in alpha, but it has a lot of features that you can try out today:</p> <ul> <li>Lints Python files automatically and shows quick-fixes when available</li> <li>Formats Python files, with support for range formatting</li> <li>Comes with commands for quickly performing actions: <code>ruff.applyAutofix</code>, <code>ruff.applyFormat</code>, and <code>ruff.applyOrganizeImports</code></li> <li>Supports <code>source.fixAll</code> and <code>source.organizeImports</code> source actions</li> <li>Automatically reloads your project configuration when you change it</li> </ul> <p>To setup <code>ruff server</code> with your editor, refer to the <a href="https://github.com/astral-sh/ruff/blob/main/crates/ruff_server/README.md">README.md</a>.</p> <h3>Preview features</h3> <ul> <li>[<code>pycodestyle</code>] Do not trigger <code>E3</code> rules on <code>def</code>s following a function/method with a dummy body (<a href="https://redirect.github.com/astral-sh/ruff/pull/10704">#10704</a>)</li> <li>[<code>pylint</code>] Implement <code>invalid-bytes-returned</code> (<code>E0308</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10959">#10959</a>)</li> <li>[<code>pylint</code>] Implement <code>invalid-length-returned</code> (<code>E0303</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10963">#10963</a>)</li> <li>[<code>pylint</code>] Implement <code>self-cls-assignment</code> (<code>W0642</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/9267">#9267</a>)</li> <li>[<code>pylint</code>] Omit stubs from <code>invalid-bool</code> and <code>invalid-str-return-type</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/11008">#11008</a>)</li> <li>[<code>ruff</code>] New rule <code>unused-async</code> (<code>RUF029</code>) to detect unneeded <code>async</code> keywords on functions (<a href="https://redirect.github.com/astral-sh/ruff/pull/9966">#9966</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/astral-sh/ruff/commit/0ff25a540c550d8d2f562844354f84eb292b9c4b"><code>0ff25a5</code></a> Bump version to 0.4.1 (<a href="https://redirect.github.com/astral-sh/ruff/issues/11035">#11035</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/34873ec009952f74b6248e10222690364f65c9ac"><code>34873ec</code></a> Add a script to fuzz the parser (courtesy of <code>pysource-codegen</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/11015">#11015</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/d3cd61f804bae7428c8bd3ac8d4a2b8bb3640e4c"><code>d3cd61f</code></a> Use empty range when there's "gap" in token source (<a href="https://redirect.github.com/astral-sh/ruff/issues/11032">#11032</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/9b80cc09ee4f91c378308844d80106d201539e46"><code>9b80cc0</code></a> Select fewer ruff rules when linting Python files in <code>scripts/</code> (<a href="https://redirect.github.com/astral-sh/ruff/issues/11034">#11034</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/9bb23b0a38bd0532dc70c018b99a1ad30774f31c"><code>9bb23b0</code></a> Expect indented case block instead of match stmt (<a href="https://redirect.github.com/astral-sh/ruff/issues/11033">#11033</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/06c248a126b403caa088f3fa6546f85b0ba2b1d5"><code>06c248a</code></a> [<code>ruff]</code> Ignore stub functions in <code>unused-async</code> (<code>RUF029</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/11026">#11026</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/27902b7130afed05c2d4c653592ff90db88e27dc"><code>27902b7</code></a> [<code>pylint</code>] Implement <code>invalid-index-returned</code> (<code>PLE0305</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/10962">#10962</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/97acf1d59bd9f1ec4d842549921452aafc0229cc"><code>97acf1d</code></a> ENH: Bump <code>ruff</code> dependency versions to support the latest release of `v0.4.0...</li> <li><a href="https://github.com/astral-sh/ruff/commit/adf63d90139b9412edc65986b5b4b7a7e667301c"><code>adf63d9</code></a> [<code>pylint</code>] Implement <code>invalid-hash-returned</code> (<code>PLE0309</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/10961">#10961</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/5d3c9f2637c4ec0c32cad22eae6c2fa39be74c6c"><code>5d3c9f2</code></a> <code>ruff server</code>: fix Neovim setup guide command (<a href="https://redirect.github.com/astral-sh/ruff/issues/11021">#11021</a>)</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/ruff/compare/v0.3.7...v0.4.1">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
57b55af578 |
Python: (Astra DB) Include caller identity as user-agent when issuing HTTP request to Astra DB's Data API (#5921)
### Motivation and Context This PR enriches the HTTP requests to the Astra DB Data API (occurring in the AstraClient) with a User-Agent header specifying the identity of the caller (specifically, "semantic_kernel"). While not mandatory, this is good practice with Astra DB and helps collecting aggregate usage data on the API side. ### Description Using the `importlib.metadata` library the package version is extracted (in a fail-safe way) and used, if present, to enrich the caller information (variable `ASTRA_CALLER_IDENTITY`, later set as the user-agent header for all HTTP requests to the Data API). ### Contribution Checklist - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄 --------- Co-authored-by: Eduard van Valkenburg <[email protected]> |
||
|
|
299094a493 |
Python: drop support for python before 3.10 (#5947)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> This PR drops support for python 3.8 and 3.9. Python 3.8 will go out of support in October 2024 and people should not be building on top of that now. Python 3.10 introduces the new style of typing and for KernelFunctionFromMethod that is a crucial feature and maintaining that with backward compatibility is a lot of work and limits us, hence we will also drop support for 3.9. Closes #5628 ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Changed pyproject to reflect this Changed CICD to only run on 3.10, 3.11 and 3.12. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄 |
||
|
|
40b2bba4ce |
Python: fixing python readme (#5903)
### Motivation and Context Resolving issue #5902 ### Description Updating the python readme so match the current state of the sdk. ### Contribution Checklist - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 --------- Co-authored-by: Lazaro Hurtado <[email protected]> Co-authored-by: Eduard van Valkenburg <[email protected]> |
||
|
|
26e6c065fe |
Python: reduce the amount of complex classes in the serialization to xml (#5907)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Small fix for errors regarding serialization of complex objects to xml and back when going from input ChatHistory to prompt string to ChatHistory. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 |
||
|
|
15691eb931 |
Python: mypy coverage for contents folder (#5904)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Adds mypy typing coverage for the contents folder, includes some small changes to the types in it. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 |
||
|
|
6eebbfc25d |
[Python Getting Started] Update base_url to endpoint (#5765)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> 1. This change helps users by being able to copy the Azure OpenAI endpoint directly 2. This solves the problem of getting a 404 Resource Not Found when using `base_url` 3. Getting Started in Python scenario ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> change `base_url` to `endpoint` ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 Co-authored-by: Eduard van Valkenburg <[email protected]> |
||
|
|
8b3203af52 |
Python: Refactor environment variable naming for clarity and consistency (#5686)
### Summary of Changes - Updated environment variable names to use single underscores for better readability and to avoid potential confusion. - Modified `service_configurator.py` to align with the updated environment variable naming convention. - Updated `.env.example` to reflect the new environment variable names, ensuring consistency across the project. - Added error handling and improved error messages in `service_configurator.py` for better debugging and maintainability. ### Motivation and Context The motivation for these changes is to address a bug where the `service_configurator.py` script is unable to read the `GLOBAL_LLM_SERVICE` environment variable due to inconsistent naming conventions. Additionally, the Azure service configuration variables were not being utilized, which could potentially lead to misconfigurations in certain deployment scenarios. - **Why is this change required?** To fix existing bugs related to environment variable handling and improve code maintainability and readability. - **What problem does it solve?** Ensures reliable loading of environment variables and correct configuration of AI services, thereby preventing runtime errors. - **What scenario does it contribute to?** Enhances the stability and reliability of the AI service configuration process within the semantic-kernel project. ### Description This PR addresses the issue where the environment variable `GLOBAL_LLM_SERVICE` was not consistently read due to a mismatch in the expected naming convention. The problem was identified in the `service_configurator.py` script where the variable was referenced with two underscores instead of one. Additionally, Azure service deployment names were not being used, leading to potential misconfigurations. - Modified the naming convention from double to single underscores for all environment variables in `service_configurator.py` and `.env.example`. - Ensured that Azure service deployment names are correctly utilized in the service configuration logic. - Improved error handling in the script to provide clearer and more actionable feedback. For more context, here's a link to the buggy code: [Link to the code](https://github.com/microsoft/semantic-kernel/blob/main/python/samples/documentation_examples/service_configurator.py#L27), [Link to the code](https://github.com/microsoft/semantic-kernel/blob/main/python/samples/documentation_examples/.env.example#L1)   ### Contribution Checklist - [x] The code builds clean without any errors or warnings. - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations. - [x] All unit tests pass, and I have added new tests where possible. - [x] I didn't break anyone 😄 --------- Co-authored-by: Evan Mattson <[email protected]> Co-authored-by: Chris <[email protected]> |
||
|
|
dc54c6f203 |
Python: mypy coverage for functions (#5883)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> extend mypy typing coverage to all classes in 'functions' folder. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 |
||
|
|
00b75ed7dd |
Python: added kwargs to embedding and text memory (#5885)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Added kwargs handling throughout embeddings connectors and as a additional field for the TextMemoryPlugin. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 |
||
|
|
66a3b5bfea |
Python: init cleanup (#5872)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> When the root init has to load a lot of stuff, loading the whole thing becomes slower, only one concept there Kernel, all other things must now be loaded from a sub package. The following is not the guidance: - imports within SK use the full path - init files are created as much as possible on the root+1 level (like semantic_kernel.functions) with the pieces that common developers need, except in connectors and utils, there a developer needs to go deeper - within the connectors folder this is further detailed first to ai, memory, search_engine, within ai it is further spread into the different connectors, for instance everything for openai and azure openai can be imported using `from semantic_kernel.connectors.ai.open_ai import ...`, the same within memory - imports in samples use the abbreviated path as much as possible. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄 |
||
|
|
bafc65ebe5 |
Python: Bump openapi-core from 0.19.0 to 0.19.1 in /python (#5879)
Bumps [openapi-core](https://github.com/python-openapi/openapi-core) from 0.19.0 to 0.19.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/python-openapi/openapi-core/releases">openapi-core's releases</a>.</em></p> <blockquote> <h2>0.19.1</h2> <h2>Features</h2> <ul> <li>Path finder cls configuration <a href="https://redirect.github.com/python-openapi/openapi-core/issues/797">#797</a></li> </ul> <h2>Bug fixes</h2> <ul> <li>Invalid usage of super() when having multi-baseclass inheritance: … <a href="https://redirect.github.com/python-openapi/openapi-core/issues/802">#802</a></li> <li>Fix content-type when no space after semicolon <a href="https://redirect.github.com/python-openapi/openapi-core/issues/814">#814</a></li> <li>Protocols body and data attributes docstrings fix <a href="https://redirect.github.com/python-openapi/openapi-core/issues/829">#829</a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/python-openapi/openapi-core/commit/059dd73652f6ac4dd45e683f202d0764c7971b72"><code>059dd73</code></a> Version 0.19.1</li> <li><a href="https://github.com/python-openapi/openapi-core/commit/e2399b20f7bb9a81a24cd80c0731dfa96ee060f5"><code>e2399b2</code></a> Merge pull request <a href="https://redirect.github.com/python-openapi/openapi-core/issues/829">#829</a> from python-openapi/fix/protocols-body-and-data-attri...</li> <li><a href="https://github.com/python-openapi/openapi-core/commit/4df60c8cb04e677946c67721f72bd7ee368906be"><code>4df60c8</code></a> Protocols body and data attributes docstrings fix</li> <li><a href="https://github.com/python-openapi/openapi-core/commit/d87ed3e5bebabd6b2b8308610327aaee27d568d6"><code>d87ed3e</code></a> Merge pull request <a href="https://redirect.github.com/python-openapi/openapi-core/issues/826">#826</a> from python-openapi/dependabot/pip/deptry-0.16.1</li> <li><a href="https://github.com/python-openapi/openapi-core/commit/0ddadc480547483bf67bc0ef9a8ca901a276cdfe"><code>0ddadc4</code></a> Merge pull request <a href="https://redirect.github.com/python-openapi/openapi-core/issues/825">#825</a> from python-openapi/dependabot/pip/flask-3.0.3</li> <li><a href="https://github.com/python-openapi/openapi-core/commit/e4a2d9d21a809ac7a63560bea5918d8ef2c12f92"><code>e4a2d9d</code></a> Bump deptry from 0.15.0 to 0.16.1</li> <li><a href="https://github.com/python-openapi/openapi-core/commit/d248b0a26ab2039a4153016f85f85bbdb5efe3f4"><code>d248b0a</code></a> Bump flask from 3.0.2 to 3.0.3</li> <li><a href="https://github.com/python-openapi/openapi-core/commit/44b8b3cb11158449be7646171cf0d8782415d02c"><code>44b8b3c</code></a> Merge pull request <a href="https://redirect.github.com/python-openapi/openapi-core/issues/823">#823</a> from python-openapi/dependabot/pip/werkzeug-3.0.2</li> <li><a href="https://github.com/python-openapi/openapi-core/commit/0a8901b275a29da5acf1310cbc7a55b5a292f68a"><code>0a8901b</code></a> Create SECURITY.md</li> <li><a href="https://github.com/python-openapi/openapi-core/commit/4944821ff5d1c2659e3b43f60e6a624209f5c9bb"><code>4944821</code></a> Bump werkzeug from 3.0.1 to 3.0.2</li> <li>Additional commits viewable in <a href="https://github.com/python-openapi/openapi-core/compare/0.19.0...0.19.1">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Eduard van Valkenburg <[email protected]> |
||
|
|
e48afa0530 |
Python: Bump openai from 1.14.3 to 1.18.0 in /python (#5878)
Bumps [openai](https://github.com/openai/openai-python) from 1.14.3 to 1.18.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/openai/openai-python/releases">openai's releases</a>.</em></p> <blockquote> <h2>v1.18.0</h2> <h2>1.18.0 (2024-04-15)</h2> <p>Full Changelog: <a href="https://github.com/openai/openai-python/compare/v1.17.1...v1.18.0">v1.17.1...v1.18.0</a></p> <h3>Features</h3> <ul> <li><strong>api:</strong> add batch API (<a href="https://redirect.github.com/openai/openai-python/issues/1316">#1316</a>) (<a href="https://github.com/openai/openai-python/commit/3e6f19e6e7489bf1c94944a5f8f9b1d4535cdc43">3e6f19e</a>)</li> <li><strong>api:</strong> updates (<a href="https://redirect.github.com/openai/openai-python/issues/1314">#1314</a>) (<a href="https://github.com/openai/openai-python/commit/8281dc956178f5de345645660081f7d0c15a57a6">8281dc9</a>)</li> </ul> <h2>v1.17.1</h2> <h2>1.17.1 (2024-04-12)</h2> <p>Full Changelog: <a href="https://github.com/openai/openai-python/compare/v1.17.0...v1.17.1">v1.17.0...v1.17.1</a></p> <h3>Chores</h3> <ul> <li>fix typo (<a href="https://redirect.github.com/openai/openai-python/issues/1304">#1304</a>) (<a href="https://github.com/openai/openai-python/commit/1129082955f98d76c0927781ef9e7d0beeda2ec4">1129082</a>)</li> <li><strong>internal:</strong> formatting (<a href="https://redirect.github.com/openai/openai-python/issues/1311">#1311</a>) (<a href="https://github.com/openai/openai-python/commit/8fd411b48b6b1eafaab2dac26201525c1ee0b942">8fd411b</a>)</li> </ul> <h2>v1.17.0</h2> <h2>1.17.0 (2024-04-10)</h2> <p>Full Changelog: <a href="https://github.com/openai/openai-python/compare/v1.16.2...v1.17.0">v1.16.2...v1.17.0</a></p> <h3>Features</h3> <ul> <li><strong>api:</strong> add additional messages when creating thread run (<a href="https://redirect.github.com/openai/openai-python/issues/1298">#1298</a>) (<a href="https://github.com/openai/openai-python/commit/70eb081804b14cc8c151ebd85458545a50a074fd">70eb081</a>)</li> <li><strong>client:</strong> add DefaultHttpxClient and DefaultAsyncHttpxClient (<a href="https://redirect.github.com/openai/openai-python/issues/1302">#1302</a>) (<a href="https://github.com/openai/openai-python/commit/69cdfc319fff7ebf28cdd13cc6c1761b7d97811d">69cdfc3</a>)</li> <li><strong>models:</strong> add to_dict & to_json helper methods (<a href="https://redirect.github.com/openai/openai-python/issues/1305">#1305</a>) (<a href="https://github.com/openai/openai-python/commit/40a881d10442af8b445ce030f8ab338710e1c4c8">40a881d</a>)</li> </ul> <h2>v1.16.2</h2> <h2>1.16.2 (2024-04-04)</h2> <p>Full Changelog: <a href="https://github.com/openai/openai-python/compare/v1.16.1...v1.16.2">v1.16.1...v1.16.2</a></p> <h3>Bug Fixes</h3> <ul> <li><strong>client:</strong> correct logic for line decoding in streaming (<a href="https://redirect.github.com/openai/openai-python/issues/1293">#1293</a>) (<a href="https://github.com/openai/openai-python/commit/687caefa4acf615bf404f16817bfd9a6f285ee5c">687caef</a>)</li> </ul> <h2>v1.16.1</h2> <h2>1.16.1 (2024-04-02)</h2> <p>Full Changelog: <a href="https://github.com/openai/openai-python/compare/v1.16.0...v1.16.1">v1.16.0...v1.16.1</a></p> <h3>Chores</h3> <ul> <li><strong>internal:</strong> defer model build for import latency (<a href="https://redirect.github.com/openai/openai-python/issues/1291">#1291</a>) (<a href="https://github.com/openai/openai-python/commit/bc6866eb2335d01532190d0906cad7bf9af28621">bc6866e</a>)</li> </ul> <h2>v1.16.0</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/openai/openai-python/blob/main/CHANGELOG.md">openai's changelog</a>.</em></p> <blockquote> <h2>1.18.0 (2024-04-15)</h2> <p>Full Changelog: <a href="https://github.com/openai/openai-python/compare/v1.17.1...v1.18.0">v1.17.1...v1.18.0</a></p> <h3>Features</h3> <ul> <li><strong>api:</strong> add batch API (<a href="https://redirect.github.com/openai/openai-python/issues/1316">#1316</a>) (<a href="https://github.com/openai/openai-python/commit/3e6f19e6e7489bf1c94944a5f8f9b1d4535cdc43">3e6f19e</a>)</li> <li><strong>api:</strong> updates (<a href="https://redirect.github.com/openai/openai-python/issues/1314">#1314</a>) (<a href="https://github.com/openai/openai-python/commit/8281dc956178f5de345645660081f7d0c15a57a6">8281dc9</a>)</li> </ul> <h2>1.17.1 (2024-04-12)</h2> <p>Full Changelog: <a href="https://github.com/openai/openai-python/compare/v1.17.0...v1.17.1">v1.17.0...v1.17.1</a></p> <h3>Chores</h3> <ul> <li>fix typo (<a href="https://redirect.github.com/openai/openai-python/issues/1304">#1304</a>) (<a href="https://github.com/openai/openai-python/commit/1129082955f98d76c0927781ef9e7d0beeda2ec4">1129082</a>)</li> <li><strong>internal:</strong> formatting (<a href="https://redirect.github.com/openai/openai-python/issues/1311">#1311</a>) (<a href="https://github.com/openai/openai-python/commit/8fd411b48b6b1eafaab2dac26201525c1ee0b942">8fd411b</a>)</li> </ul> <h2>1.17.0 (2024-04-10)</h2> <p>Full Changelog: <a href="https://github.com/openai/openai-python/compare/v1.16.2...v1.17.0">v1.16.2...v1.17.0</a></p> <h3>Features</h3> <ul> <li><strong>api:</strong> add additional messages when creating thread run (<a href="https://redirect.github.com/openai/openai-python/issues/1298">#1298</a>) (<a href="https://github.com/openai/openai-python/commit/70eb081804b14cc8c151ebd85458545a50a074fd">70eb081</a>)</li> <li><strong>client:</strong> add DefaultHttpxClient and DefaultAsyncHttpxClient (<a href="https://redirect.github.com/openai/openai-python/issues/1302">#1302</a>) (<a href="https://github.com/openai/openai-python/commit/69cdfc319fff7ebf28cdd13cc6c1761b7d97811d">69cdfc3</a>)</li> <li><strong>models:</strong> add to_dict & to_json helper methods (<a href="https://redirect.github.com/openai/openai-python/issues/1305">#1305</a>) (<a href="https://github.com/openai/openai-python/commit/40a881d10442af8b445ce030f8ab338710e1c4c8">40a881d</a>)</li> </ul> <h2>1.16.2 (2024-04-04)</h2> <p>Full Changelog: <a href="https://github.com/openai/openai-python/compare/v1.16.1...v1.16.2">v1.16.1...v1.16.2</a></p> <h3>Bug Fixes</h3> <ul> <li><strong>client:</strong> correct logic for line decoding in streaming (<a href="https://redirect.github.com/openai/openai-python/issues/1293">#1293</a>) (<a href="https://github.com/openai/openai-python/commit/687caefa4acf615bf404f16817bfd9a6f285ee5c">687caef</a>)</li> </ul> <h2>1.16.1 (2024-04-02)</h2> <p>Full Changelog: <a href="https://github.com/openai/openai-python/compare/v1.16.0...v1.16.1">v1.16.0...v1.16.1</a></p> <h3>Chores</h3> <ul> <li><strong>internal:</strong> defer model build for import latency (<a href="https://redirect.github.com/openai/openai-python/issues/1291">#1291</a>) (<a href="https://github.com/openai/openai-python/commit/bc6866eb2335d01532190d0906cad7bf9af28621">bc6866e</a>)</li> </ul> <h2>1.16.0 (2024-04-01)</h2> <p>Full Changelog: <a href="https://github.com/openai/openai-python/compare/v1.15.0...v1.16.0">v1.15.0...v1.16.0</a></p> <h3>Features</h3> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/openai/openai-python/commit/2f759aabf346548fbb09d54ae0c279ce8ce9e148"><code>2f759aa</code></a> release: 1.18.0</li> <li><a href="https://github.com/openai/openai-python/commit/db069cdacaf7ff8d7c1308db9f2465d38252ea1e"><code>db069cd</code></a> feat(api): add batch API (<a href="https://redirect.github.com/openai/openai-python/issues/1316">#1316</a>)</li> <li><a href="https://github.com/openai/openai-python/commit/f5247e30eed8a1ad843c473c7a50f7bb81ffd7b5"><code>f5247e3</code></a> feat(api): updates (<a href="https://redirect.github.com/openai/openai-python/issues/1314">#1314</a>)</li> <li><a href="https://github.com/openai/openai-python/commit/595e6b834fe26e08e9ac5415ab15bc19b8661f2c"><code>595e6b8</code></a> release: 1.17.1</li> <li><a href="https://github.com/openai/openai-python/commit/b36b8d869a4e79ee8549476d979cd3322c3695c5"><code>b36b8d8</code></a> chore(internal): formatting (<a href="https://redirect.github.com/openai/openai-python/issues/1311">#1311</a>)</li> <li><a href="https://github.com/openai/openai-python/commit/35afd5039e230152cc4486729f4e856ed5a76616"><code>35afd50</code></a> chore: fix typo (<a href="https://redirect.github.com/openai/openai-python/issues/1304">#1304</a>)</li> <li><a href="https://github.com/openai/openai-python/commit/0cbce3f6777fd8f137ed7445e9bc2f2aa5c9f5b4"><code>0cbce3f</code></a> release: 1.17.0</li> <li><a href="https://github.com/openai/openai-python/commit/47656567e016a1ddf09497f180a19265b28ec93c"><code>4765656</code></a> feat(models): add to_dict & to_json helper methods (<a href="https://redirect.github.com/openai/openai-python/issues/1305">#1305</a>)</li> <li><a href="https://github.com/openai/openai-python/commit/347363ed67a6a1611346427bb9ebe4becce53f7e"><code>347363e</code></a> feat(client): add DefaultHttpxClient and DefaultAsyncHttpxClient (<a href="https://redirect.github.com/openai/openai-python/issues/1302">#1302</a>)</li> <li><a href="https://github.com/openai/openai-python/commit/e2d65bf77aa6e2bca043f70f5e0a38d8bd08b5e8"><code>e2d65bf</code></a> feat(api): add additional messages when creating thread run (<a href="https://redirect.github.com/openai/openai-python/issues/1298">#1298</a>)</li> <li>Additional commits viewable in <a href="https://github.com/openai/openai-python/compare/v1.14.3...v1.18.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
65275737d6 |
Python: Bump project version for release. Fix missing imports in notebooks. (#5871)
### Motivation and Context Bumping the pyproject.toml version and related notebook version references for a release. Some of the Jupyter notebooks were missing the imports to be able to run properly. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description The PR - bumps the pyproject.toml version and related notebook version references for a release. - Fixes the missing notebook imports. - Fixes a service_id/request settings bug in one kernel syntax example. Closes #5148 <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄 |
||
|
|
6751f9d819 |
Python: Updated plugins (#5827)
### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
1. Why is this change required?
2. What problem does it solve?
3. What scenario does it contribute to?
4. If it fixes an open issue, please link to the issue here.
-->
The loading of plugins and functions into Kernel was not fully
consistent and clear, this is now simplified.
Adding a plugin can now be done in two ways:
- multiple: `kernel.add_plugins[plugin1, plugin2]`
- single plugin: `kernel.add_plugin(plugin)`
- if the plugin here is a class, with methods that have the
kernel_function decorator then that is parsed into a plugin
Adding a function can now be done in three ways:
- multiple: `kernel.add_functions([func1, func2]` or
`kernel.add_function({'func1': func1})`
- single: `kernel.add_function('plugin_name', func1)`
- from a prompt: `kernel.add_function(function_name='func1',
prompt='test prompt', ...)`
In other words, all the different methods that were available have been
simplified, these methods also return the created plugin (or updated
plugin for the `add_functions` method. The `add_function` (singular)
method has a parameter `return_plugin` to control whether you get the
created or updated plugin, instead of the created function.
**An important callout:**
One big internal change that this introduces is that a function that
gets added to a plugin (new or existing) is automatically copied, the
metadata is deep-copied and the plugin_name in the metadata is updated,
so this sequence is valid now:
```python
@kernel_function(name='test')
def f(...):
etc
func = KernelFunctionFromMethod(method=f)
func2 = kernel.add_function('plugin', func)
assert func != func2
```
Also closes: #5855
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Removed KernelPluginCollection
Updated KernelPlugin
added from_... method to load from different sources
Updated KernelFunctionFromPrompt
added from_yaml and from_directory methods.
Added and updated tests to 99% coverage of KernelPlugin and
KernelFunctionFromPrompt
### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
|
||
|
|
ed1770c40b |
Python: Allow args to pass to func calling stepwise planner (#5830)
### Motivation and Context A recent feature was added to dotnet to allow for a chat_history object to be passed into invoke. This only allows the user to affect the `chatHistoryForSteps`, but doesn't account for generating a plan with provided context (via the chat history). <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description This PR allows the user to pass in optional kernel arguments or kwargs (that get turned into kernel arguments). If the user then overrides the prompt template/step prompt.txt, they can utilize any new arguments that are supplied. - Closes #5824 <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄 |
||
|
|
79e0b4a35f |
Python: Bump ruff from 0.3.4 to 0.3.5 in /python (#5816)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.3.4 to 0.3.5. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/releases">ruff's releases</a>.</em></p> <blockquote> <h2>v0.3.5</h2> <h2>Changes</h2> <h3>Preview features</h3> <ul> <li>[<code>pylint</code>] Implement <code>modified-iterating-set</code> (<code>E4703</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10473">#10473</a>)</li> <li>[<code>refurb</code>] Implement <code>for-loop-set-mutations</code> (<code>FURB142</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10583">#10583</a>)</li> <li>[<code>refurb</code>] Implement <code>unnecessary-from-float</code> (<code>FURB164</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10647">#10647</a>)</li> <li>[<code>refurb</code>] Implement <code>verbose-decimal-constructor</code> (<code>FURB157</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10533">#10533</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li>[<code>flake8-comprehensions</code>] Handled special case for <code>C401</code> which also matches <code>C416</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/10596">#10596</a>)</li> <li>[<code>flake8-pyi</code>] Mark <code>unaliased-collections-abc-set-import</code> fix as "safe" for more cases in stub files (<code>PYI025</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10547">#10547</a>)</li> <li>[<code>numpy</code>] Add <code>row_stack</code> to NumPy 2.0 migration rule (<a href="https://redirect.github.com/astral-sh/ruff/pull/10646">#10646</a>)</li> <li>[<code>pycodestyle</code>] Allow cell magics before an import (<code>E402</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10545">#10545</a>)</li> <li>[<code>pycodestyle</code>] Avoid blank line rules for the first logical line in cell (<a href="https://redirect.github.com/astral-sh/ruff/pull/10291">#10291</a>)</li> </ul> <h3>Configuration</h3> <ul> <li>Respected nested namespace packages (<a href="https://redirect.github.com/astral-sh/ruff/pull/10541">#10541</a>)</li> <li>[<code>flake8-boolean-trap</code>] Add setting for user defined allowed boolean trap (<a href="https://redirect.github.com/astral-sh/ruff/pull/10531">#10531</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>Correctly handle references in <code>__all__</code> definitions when renaming symbols in autofixes (<a href="https://redirect.github.com/astral-sh/ruff/pull/10527">#10527</a>)</li> <li>Track ranges of names inside <code>__all__</code> definitions (<a href="https://redirect.github.com/astral-sh/ruff/pull/10525">#10525</a>)</li> <li>[<code>flake8-bugbear</code>] Avoid false positive for usage after <code>continue</code> (<code>B031</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10539">#10539</a>)</li> <li>[<code>flake8-copyright</code>] Accept commas in default copyright pattern (<a href="https://redirect.github.com/astral-sh/ruff/pull/9498">#9498</a>)</li> <li>[<code>flake8-datetimez</code>] Allow f-strings with <code>%z</code> for <code>DTZ007</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/10651">#10651</a>)</li> <li>[<code>flake8-pytest-style</code>] Fix <code>PT014</code> autofix for last item in list (<a href="https://redirect.github.com/astral-sh/ruff/pull/10532">#10532</a>)</li> <li>[<code>flake8-quotes</code>] Ignore <code>Q000</code>, <code>Q001</code> when string is inside forward ref (<a href="https://redirect.github.com/astral-sh/ruff/pull/10585">#10585</a>)</li> <li>[<code>isort</code>] Always place non-relative imports after relative imports (<a href="https://redirect.github.com/astral-sh/ruff/pull/10669">#10669</a>)</li> <li>[<code>isort</code>] Respect Unicode characters in import sorting (<a href="https://redirect.github.com/astral-sh/ruff/pull/10529">#10529</a>)</li> <li>[<code>pyflakes</code>] Fix F821 false negatives when <code>from __future__ import annotations</code> is active (attempt 2) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10524">#10524</a>)</li> <li>[<code>pyflakes</code>] Make <code>unnecessary-lambda</code> an always-unsafe fix (<a href="https://redirect.github.com/astral-sh/ruff/pull/10668">#10668</a>)</li> <li>[<code>pylint</code>] Fixed false-positive on the rule <code>PLW1641</code> (<code>eq-without-hash</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10566">#10566</a>)</li> <li>[<code>ruff</code>] Fix panic in unused <code># noqa</code> removal with multi-byte space (<code>RUF100</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10682">#10682</a>)</li> </ul> <h3>Documentation</h3> <ul> <li>Add PR title format to <code>CONTRIBUTING.md</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/10665">#10665</a>)</li> <li>Fix list markup to include blank lines required (<a href="https://redirect.github.com/astral-sh/ruff/pull/10591">#10591</a>)</li> <li>Put <code>flake8-logging</code> next to the other flake8 plugins in registry (<a href="https://redirect.github.com/astral-sh/ruff/pull/10587">#10587</a>)</li> <li>[<code>flake8-bandit</code>] Update warning message for rule <code>S305</code> to address insecure block cipher mode use (<a href="https://redirect.github.com/astral-sh/ruff/pull/10602">#10602</a>)</li> <li>[<code>flake8-bugbear</code>] Document use of anonymous assignment in <code>useless-expression</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/10551">#10551</a>)</li> <li>[<code>flake8-datetimez</code>] Clarify error messages and docs for <code>DTZ</code> rules (<a href="https://redirect.github.com/astral-sh/ruff/pull/10621">#10621</a>)</li> <li>[<code>pycodestyle</code>] Use same before vs. after numbers for <code>space-around-operator</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/10640">#10640</a>)</li> <li>[<code>ruff</code>] Change <code>quadratic-list-summation</code> docs to use <code>iadd</code> consistently (<a href="https://redirect.github.com/astral-sh/ruff/pull/10666">#10666</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's changelog</a>.</em></p> <blockquote> <h2>0.3.5</h2> <h3>Preview features</h3> <ul> <li>[<code>pylint</code>] Implement <code>modified-iterating-set</code> (<code>E4703</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10473">#10473</a>)</li> <li>[<code>refurb</code>] Implement <code>for-loop-set-mutations</code> (<code>FURB142</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10583">#10583</a>)</li> <li>[<code>refurb</code>] Implement <code>unnecessary-from-float</code> (<code>FURB164</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10647">#10647</a>)</li> <li>[<code>refurb</code>] Implement <code>verbose-decimal-constructor</code> (<code>FURB157</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10533">#10533</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li>[<code>flake8-comprehensions</code>] Handled special case for <code>C401</code> which also matches <code>C416</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/10596">#10596</a>)</li> <li>[<code>flake8-pyi</code>] Mark <code>unaliased-collections-abc-set-import</code> fix as "safe" for more cases in stub files (<code>PYI025</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10547">#10547</a>)</li> <li>[<code>numpy</code>] Add <code>row_stack</code> to NumPy 2.0 migration rule (<a href="https://redirect.github.com/astral-sh/ruff/pull/10646">#10646</a>)</li> <li>[<code>pycodestyle</code>] Allow cell magics before an import (<code>E402</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10545">#10545</a>)</li> <li>[<code>pycodestyle</code>] Avoid blank line rules for the first logical line in cell (<a href="https://redirect.github.com/astral-sh/ruff/pull/10291">#10291</a>)</li> </ul> <h3>Configuration</h3> <ul> <li>Respected nested namespace packages (<a href="https://redirect.github.com/astral-sh/ruff/pull/10541">#10541</a>)</li> <li>[<code>flake8-boolean-trap</code>] Add setting for user defined allowed boolean trap (<a href="https://redirect.github.com/astral-sh/ruff/pull/10531">#10531</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>Correctly handle references in <code>__all__</code> definitions when renaming symbols in autofixes (<a href="https://redirect.github.com/astral-sh/ruff/pull/10527">#10527</a>)</li> <li>Track ranges of names inside <code>__all__</code> definitions (<a href="https://redirect.github.com/astral-sh/ruff/pull/10525">#10525</a>)</li> <li>[<code>flake8-bugbear</code>] Avoid false positive for usage after <code>continue</code> (<code>B031</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10539">#10539</a>)</li> <li>[<code>flake8-copyright</code>] Accept commas in default copyright pattern (<a href="https://redirect.github.com/astral-sh/ruff/pull/9498">#9498</a>)</li> <li>[<code>flake8-datetimez</code>] Allow f-strings with <code>%z</code> for <code>DTZ007</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/10651">#10651</a>)</li> <li>[<code>flake8-pytest-style</code>] Fix <code>PT014</code> autofix for last item in list (<a href="https://redirect.github.com/astral-sh/ruff/pull/10532">#10532</a>)</li> <li>[<code>flake8-quotes</code>] Ignore <code>Q000</code>, <code>Q001</code> when string is inside forward ref (<a href="https://redirect.github.com/astral-sh/ruff/pull/10585">#10585</a>)</li> <li>[<code>isort</code>] Always place non-relative imports after relative imports (<a href="https://redirect.github.com/astral-sh/ruff/pull/10669">#10669</a>)</li> <li>[<code>isort</code>] Respect Unicode characters in import sorting (<a href="https://redirect.github.com/astral-sh/ruff/pull/10529">#10529</a>)</li> <li>[<code>pyflakes</code>] Fix F821 false negatives when <code>from __future__ import annotations</code> is active (attempt 2) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10524">#10524</a>)</li> <li>[<code>pyflakes</code>] Make <code>unnecessary-lambda</code> an always-unsafe fix (<a href="https://redirect.github.com/astral-sh/ruff/pull/10668">#10668</a>)</li> <li>[<code>pylint</code>] Fixed false-positive on the rule <code>PLW1641</code> (<code>eq-without-hash</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10566">#10566</a>)</li> <li>[<code>ruff</code>] Fix panic in unused <code># noqa</code> removal with multi-byte space (<code>RUF100</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/10682">#10682</a>)</li> </ul> <h3>Documentation</h3> <ul> <li>Add PR title format to <code>CONTRIBUTING.md</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/10665">#10665</a>)</li> <li>Fix list markup to include blank lines required (<a href="https://redirect.github.com/astral-sh/ruff/pull/10591">#10591</a>)</li> <li>Put <code>flake8-logging</code> next to the other flake8 plugins in registry (<a href="https://redirect.github.com/astral-sh/ruff/pull/10587">#10587</a>)</li> <li>[<code>flake8-bandit</code>] Update warning message for rule <code>S305</code> to address insecure block cipher mode use (<a href="https://redirect.github.com/astral-sh/ruff/pull/10602">#10602</a>)</li> <li>[<code>flake8-bugbear</code>] Document use of anonymous assignment in <code>useless-expression</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/10551">#10551</a>)</li> <li>[<code>flake8-datetimez</code>] Clarify error messages and docs for <code>DTZ</code> rules (<a href="https://redirect.github.com/astral-sh/ruff/pull/10621">#10621</a>)</li> <li>[<code>pycodestyle</code>] Use same before vs. after numbers for <code>space-around-operator</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/10640">#10640</a>)</li> <li>[<code>ruff</code>] Change <code>quadratic-list-summation</code> docs to use <code>iadd</code> consistently (<a href="https://redirect.github.com/astral-sh/ruff/pull/10666">#10666</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/astral-sh/ruff/commit/200ebeebdc8ab8ee14f56922e21b218f41a5a7e4"><code>200ebee</code></a> Bump version to v0.3.5 (<a href="https://redirect.github.com/astral-sh/ruff/issues/10717">#10717</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/23e8279093d8f891fc8bb59ebea2532649801ed3"><code>23e8279</code></a> chore(deps): update npm development dependencies (<a href="https://redirect.github.com/astral-sh/ruff/issues/10716">#10716</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/221b3236a8770e2f9a0c502290b78a5ec58698cc"><code>221b323</code></a> chore(deps): update strum to 0.26.0 (<a href="https://redirect.github.com/astral-sh/ruff/issues/10715">#10715</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/a0e15448488badd81b0924653c180cd18029b2c2"><code>a0e1544</code></a> chore(deps): update rust crate pep440_rs to 0.5.0 (<a href="https://redirect.github.com/astral-sh/ruff/issues/10703">#10703</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/2740fab7ad8963892d15581e624764c7a7894999"><code>2740fab</code></a> Renovate: group all <code>strum</code> dependencies together (<a href="https://redirect.github.com/astral-sh/ruff/issues/10714">#10714</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/7042b9b16dcb91ffa6a49bab6e8d43066131af2a"><code>7042b9b</code></a> fix(deps): update rust crate similar to v2.5.0 (<a href="https://redirect.github.com/astral-sh/ruff/issues/10711">#10711</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/4047d456b6e1b5bfd67cf81b921350e2f2989a6c"><code>4047d45</code></a> chore(deps): update rust crate insta to v1.38.0 (<a href="https://redirect.github.com/astral-sh/ruff/issues/10701">#10701</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/20d69ea504b95e4cd7751dbb5a17aa446721945d"><code>20d69ea</code></a> chore(deps): update npm development dependencies (<a href="https://redirect.github.com/astral-sh/ruff/issues/10697">#10697</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/d021cac0c9755e7f34ee3941c9a98aa7befa9750"><code>d021cac</code></a> chore(deps): update rust crate tracing-tree to 0.3.0 (<a href="https://redirect.github.com/astral-sh/ruff/issues/10709">#10709</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/46369d48fe1089d48e0590fcf6fb028218ab84b0"><code>46369d4</code></a> chore(deps): update rust crate uuid to v1.8.0 (<a href="https://redirect.github.com/astral-sh/ruff/issues/10710">#10710</a>)</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/ruff/compare/v0.3.4...v0.3.5">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Eduard van Valkenburg <[email protected]> |
||
|
|
a8bf2b6b48 |
Python: Bump pillow from 10.2.0 to 10.3.0 in /python (#5758)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.2.0 to 10.3.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/python-pillow/Pillow/releases">pillow's releases</a>.</em></p> <blockquote> <h2>10.3.0</h2> <p><a href="https://pillow.readthedocs.io/en/stable/releasenotes/10.3.0.html">https://pillow.readthedocs.io/en/stable/releasenotes/10.3.0.html</a></p> <h2>Changes</h2> <ul> <li>CVE-2024-28219: Use strncpy to avoid buffer overflow <a href="https://redirect.github.com/python-pillow/Pillow/issues/7928">#7928</a> [<a href="https://github.com/hugovk"><code>@hugovk</code></a>]</li> <li>Use <code>functools.lru_cache</code> for <code>hopper()</code> <a href="https://redirect.github.com/python-pillow/Pillow/issues/7912">#7912</a> [<a href="https://github.com/hugovk"><code>@hugovk</code></a>]</li> <li>Raise ValueError if seeking to greater than offset-sized integer in TIFF <a href="https://redirect.github.com/python-pillow/Pillow/issues/7883">#7883</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Improve speed of loading QOI images <a href="https://redirect.github.com/python-pillow/Pillow/issues/7925">#7925</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Added RGB to I;16N conversion <a href="https://redirect.github.com/python-pillow/Pillow/issues/7920">#7920</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Add --report argument to <strong>main</strong>.py to omit supported formats <a href="https://redirect.github.com/python-pillow/Pillow/issues/7818">#7818</a> [<a href="https://github.com/nulano"><code>@nulano</code></a>]</li> <li>Added RGB to I;16, I;16L and I;16B conversion <a href="https://redirect.github.com/python-pillow/Pillow/issues/7918">#7918</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Fix editable installation with custom build backend and configuration options <a href="https://redirect.github.com/python-pillow/Pillow/issues/7658">#7658</a> [<a href="https://github.com/nulano"><code>@nulano</code></a>]</li> <li>Fix putdata() for I;16N on big-endian <a href="https://redirect.github.com/python-pillow/Pillow/issues/7209">#7209</a> [<a href="https://github.com/Yay295"><code>@Yay295</code></a>]</li> <li>Determine MPO size from markers, not EXIF data <a href="https://redirect.github.com/python-pillow/Pillow/issues/7884">#7884</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Improved conversion from RGB to RGBa, LA and La <a href="https://redirect.github.com/python-pillow/Pillow/issues/7888">#7888</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Support FITS images with GZIP_1 compression <a href="https://redirect.github.com/python-pillow/Pillow/issues/7894">#7894</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Use I;16 mode for 9-bit JPEG 2000 images <a href="https://redirect.github.com/python-pillow/Pillow/issues/7900">#7900</a> [<a href="https://github.com/scaramallion"><code>@scaramallion</code></a>]</li> <li>Raise ValueError if kmeans is negative <a href="https://redirect.github.com/python-pillow/Pillow/issues/7891">#7891</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Remove TIFF tag OSUBFILETYPE when saving using libtiff <a href="https://redirect.github.com/python-pillow/Pillow/issues/7893">#7893</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Raise ValueError for negative values when loading P1-P3 PPM images <a href="https://redirect.github.com/python-pillow/Pillow/issues/7882">#7882</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Added reading of JPEG2000 palettes <a href="https://redirect.github.com/python-pillow/Pillow/issues/7870">#7870</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Added alpha_quality argument when saving WebP images <a href="https://redirect.github.com/python-pillow/Pillow/issues/7872">#7872</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Fixed joined corners for ImageDraw rounded_rectangle() non-integer dimensions <a href="https://redirect.github.com/python-pillow/Pillow/issues/7881">#7881</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Removed Python and NumPy pinning on Cygwin <a href="https://redirect.github.com/python-pillow/Pillow/issues/7880">#7880</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Update UnidentifiedImageError and <strong>version</strong> imports <a href="https://redirect.github.com/python-pillow/Pillow/issues/7644">#7644</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Stop reading EPS image at EOF marker <a href="https://redirect.github.com/python-pillow/Pillow/issues/7753">#7753</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>PSD layer co-ordinates may be negative <a href="https://redirect.github.com/python-pillow/Pillow/issues/7706">#7706</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Use subprocess with CREATE_NO_WINDOW flag in ImageShow WindowsViewer <a href="https://redirect.github.com/python-pillow/Pillow/issues/7791">#7791</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>When saving GIF frame that restores to background color, do not fill identical pixels <a href="https://redirect.github.com/python-pillow/Pillow/issues/7788">#7788</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Fixed reading PNG iCCP compression method <a href="https://redirect.github.com/python-pillow/Pillow/issues/7823">#7823</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Allow writing IFDRational to UNDEFINED tag <a href="https://redirect.github.com/python-pillow/Pillow/issues/7840">#7840</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Fix logged tag name when loading Exif data <a href="https://redirect.github.com/python-pillow/Pillow/issues/7842">#7842</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Use maximum frame size in IHDR chunk when saving APNG images <a href="https://redirect.github.com/python-pillow/Pillow/issues/7821">#7821</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Prevent opening P TGA images without a palette <a href="https://redirect.github.com/python-pillow/Pillow/issues/7797">#7797</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Use palette when loading ICO images <a href="https://redirect.github.com/python-pillow/Pillow/issues/7798">#7798</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Use consistent arguments for load_read and load_seek <a href="https://redirect.github.com/python-pillow/Pillow/issues/7713">#7713</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Turn off nullability warnings for macOS SDK <a href="https://redirect.github.com/python-pillow/Pillow/issues/7827">#7827</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Fix shift-sign issue in Convert.c <a href="https://redirect.github.com/python-pillow/Pillow/issues/7838">#7838</a> [<a href="https://github.com/r-barnes"><code>@r-barnes</code></a>]</li> <li>winbuild: Refactor dependency versions into constants <a href="https://redirect.github.com/python-pillow/Pillow/issues/7843">#7843</a> [<a href="https://github.com/hugovk"><code>@hugovk</code></a>]</li> <li>Build macOS arm64 wheels natively <a href="https://redirect.github.com/python-pillow/Pillow/issues/7852">#7852</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Fixed typo <a href="https://redirect.github.com/python-pillow/Pillow/issues/7855">#7855</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Open 16-bit grayscale PNGs as I;16 <a href="https://redirect.github.com/python-pillow/Pillow/issues/7849">#7849</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Handle truncated chunks at the end of PNG images <a href="https://redirect.github.com/python-pillow/Pillow/issues/7709">#7709</a> [<a href="https://github.com/lajiyuan"><code>@lajiyuan</code></a>]</li> <li>Match mask size to pasted image size in GifImagePlugin <a href="https://redirect.github.com/python-pillow/Pillow/issues/7779">#7779</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Changed SupportsGetMesh protocol to be public <a href="https://redirect.github.com/python-pillow/Pillow/issues/7841">#7841</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Release GIL while calling <code>WebPAnimDecoderGetNext</code> <a href="https://redirect.github.com/python-pillow/Pillow/issues/7782">#7782</a> [<a href="https://github.com/evanmiller"><code>@evanmiller</code></a>]</li> <li>Fixed reading FLI/FLC images with a prefix chunk <a href="https://redirect.github.com/python-pillow/Pillow/issues/7804">#7804</a> [<a href="https://github.com/twolife"><code>@twolife</code></a>]</li> <li>Updated package name for Tidelift <a href="https://redirect.github.com/python-pillow/Pillow/issues/7810">#7810</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> <li>Removed unused code <a href="https://redirect.github.com/python-pillow/Pillow/issues/7744">#7744</a> [<a href="https://github.com/radarhere"><code>@radarhere</code></a>]</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst">pillow's changelog</a>.</em></p> <blockquote> <h2>10.3.0 (2024-04-01)</h2> <ul> <li> <p>CVE-2024-28219: Use <code>strncpy</code> to avoid buffer overflow <a href="https://redirect.github.com/python-pillow/Pillow/issues/7928">#7928</a> [radarhere, hugovk]</p> </li> <li> <p>Deprecate <code>eval()</code>, replacing it with <code>lambda_eval()</code> and <code>unsafe_eval()</code> <a href="https://redirect.github.com/python-pillow/Pillow/issues/7927">#7927</a> [radarhere, hugovk]</p> </li> <li> <p>Raise <code>ValueError</code> if seeking to greater than offset-sized integer in TIFF <a href="https://redirect.github.com/python-pillow/Pillow/issues/7883">#7883</a> [radarhere]</p> </li> <li> <p>Add <code>--report</code> argument to <code>__main__.py</code> to omit supported formats <a href="https://redirect.github.com/python-pillow/Pillow/issues/7818">#7818</a> [nulano, radarhere, hugovk]</p> </li> <li> <p>Added RGB to I;16, I;16L, I;16B and I;16N conversion <a href="https://redirect.github.com/python-pillow/Pillow/issues/7918">#7918</a>, <a href="https://redirect.github.com/python-pillow/Pillow/issues/7920">#7920</a> [radarhere]</p> </li> <li> <p>Fix editable installation with custom build backend and configuration options <a href="https://redirect.github.com/python-pillow/Pillow/issues/7658">#7658</a> [nulano, radarhere]</p> </li> <li> <p>Fix putdata() for I;16N on big-endian <a href="https://redirect.github.com/python-pillow/Pillow/issues/7209">#7209</a> [Yay295, hugovk, radarhere]</p> </li> <li> <p>Determine MPO size from markers, not EXIF data <a href="https://redirect.github.com/python-pillow/Pillow/issues/7884">#7884</a> [radarhere]</p> </li> <li> <p>Improved conversion from RGB to RGBa, LA and La <a href="https://redirect.github.com/python-pillow/Pillow/issues/7888">#7888</a> [radarhere]</p> </li> <li> <p>Support FITS images with GZIP_1 compression <a href="https://redirect.github.com/python-pillow/Pillow/issues/7894">#7894</a> [radarhere]</p> </li> <li> <p>Use I;16 mode for 9-bit JPEG 2000 images <a href="https://redirect.github.com/python-pillow/Pillow/issues/7900">#7900</a> [scaramallion, radarhere]</p> </li> <li> <p>Raise ValueError if kmeans is negative <a href="https://redirect.github.com/python-pillow/Pillow/issues/7891">#7891</a> [radarhere]</p> </li> <li> <p>Remove TIFF tag OSUBFILETYPE when saving using libtiff <a href="https://redirect.github.com/python-pillow/Pillow/issues/7893">#7893</a> [radarhere]</p> </li> <li> <p>Raise ValueError for negative values when loading P1-P3 PPM images <a href="https://redirect.github.com/python-pillow/Pillow/issues/7882">#7882</a> [radarhere]</p> </li> <li> <p>Added reading of JPEG2000 palettes <a href="https://redirect.github.com/python-pillow/Pillow/issues/7870">#7870</a> [radarhere]</p> </li> <li> <p>Added alpha_quality argument when saving WebP images <a href="https://redirect.github.com/python-pillow/Pillow/issues/7872">#7872</a> [radarhere]</p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/python-pillow/Pillow/commit/5c89d88eee199ba53f64581ea39b6a1bc52feb1a"><code>5c89d88</code></a> 10.3.0 version bump</li> <li><a href="https://github.com/python-pillow/Pillow/commit/63cbfcfdea2d163ec93bae8d283fcfe4b73b5dc7"><code>63cbfcf</code></a> Update CHANGES.rst [ci skip]</li> <li><a href="https://github.com/python-pillow/Pillow/commit/2776126aa9af322b416eaca247f4f8ebefd08128"><code>2776126</code></a> Merge pull request <a href="https://redirect.github.com/python-pillow/Pillow/issues/7928">#7928</a> from python-pillow/lcms</li> <li><a href="https://github.com/python-pillow/Pillow/commit/aeb51cbb169eb3285818ba1390ddf2771d897e6e"><code>aeb51cb</code></a> Merge branch 'main' into lcms</li> <li><a href="https://github.com/python-pillow/Pillow/commit/5beb0b66648db8b542bb5260eed79b25e33d643b"><code>5beb0b6</code></a> Update CHANGES.rst [ci skip]</li> <li><a href="https://github.com/python-pillow/Pillow/commit/cac6ffa7b399ea79b6239984d1307056a0b19af2"><code>cac6ffa</code></a> Merge pull request <a href="https://redirect.github.com/python-pillow/Pillow/issues/7927">#7927</a> from python-pillow/imagemath</li> <li><a href="https://github.com/python-pillow/Pillow/commit/f5eeeacf7539eaa0d93a677d7666bc7c142c8d1c"><code>f5eeeac</code></a> Name as 'options' in lambda_eval and unsafe_eval, but '_dict' in deprecated eval</li> <li><a href="https://github.com/python-pillow/Pillow/commit/facf3af93dabcbdd8cdbda8c3b50eefafa3bb04c"><code>facf3af</code></a> Added release notes</li> <li><a href="https://github.com/python-pillow/Pillow/commit/2a93aba5cfcf6e241ab4f9392c13e3b74032c061"><code>2a93aba</code></a> Use strncpy to avoid buffer overflow</li> <li><a href="https://github.com/python-pillow/Pillow/commit/a670597bc30e9d489656fc9d807170b8f3d7ca57"><code>a670597</code></a> Update CHANGES.rst [ci skip]</li> <li>Additional commits viewable in <a href="https://github.com/python-pillow/Pillow/compare/10.2.0...10.3.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/microsoft/semantic-kernel/network/alerts). </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
629624cee3 |
Python: removed pipeline (#5779)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Remove the ability to run multiple functions in go in kernel.invoke. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 Co-authored-by: Evan Mattson <[email protected]> |
||
|
|
4edaa13d4a |
Python: updated decorator to allow no brackets (#5776)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Small change to allow a kernel function decorator without name and description, to be defined without brackets. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 |
||
|
|
0a75ba8145 |
Python: dev_setup and readme updates (#5770)
This pull request primarily updates the `DEV_SETUP.md` and `README.md` files in the `python` directory. The changes focus on improving the setup instructions, updating the code snippets, and providing additional information on running tests, code coverage, and keeping the local repository up-to-date. Changes to setup instructions: * [`python/DEV_SETUP.md`](diffhunk://#diff-22a026622159be328328c5bb6fef874e8aa799efb6ab8844d0c94ad051b08f3cR75-R90): Added instructions on how to use Python 3.11 with Poetry, how to install pre-commit hooks, and how to run tests using VSCode Tasks. [[1]](diffhunk://#diff-22a026622159be328328c5bb6fef874e8aa799efb6ab8844d0c94ad051b08f3cR75-R90) [[2]](diffhunk://#diff-22a026622159be328328c5bb6fef874e8aa799efb6ab8844d0c94ad051b08f3cR112-R114) [[3]](diffhunk://#diff-22a026622159be328328c5bb6fef874e8aa799efb6ab8844d0c94ad051b08f3cR131-R133) [[4]](diffhunk://#diff-22a026622159be328328c5bb6fef874e8aa799efb6ab8844d0c94ad051b08f3cL287-R252) Code snippets updates: * [`python/DEV_SETUP.md`](diffhunk://#diff-22a026622159be328328c5bb6fef874e8aa799efb6ab8844d0c94ad051b08f3cL140-L227): Updated the code snippets to reflect the latest changes in the codebase. This includes changes in the use of Pydantic and the use of KernelBaseModel. [[1]](diffhunk://#diff-22a026622159be328328c5bb6fef874e8aa799efb6ab8844d0c94ad051b08f3cL140-L227) [[2]](diffhunk://#diff-22a026622159be328328c5bb6fef874e8aa799efb6ab8844d0c94ad051b08f3cL244-R177) * [`python/README.md`](diffhunk://#diff-217ed82f87b78b399e304b07a159b27dff327c0f83adf4a2fc30b03bcbf84b01L58-R66): Updated the code snippet to reflect the change in getting request settings from a service ID. Additional information: * [`python/DEV_SETUP.md`](diffhunk://#diff-22a026622159be328328c5bb6fef874e8aa799efb6ab8844d0c94ad051b08f3cL287-R252): Added information on how to run code coverage, how to keep the local repository up-to-date, and how to resolve conflicts after a rebase. * [`python/README.md`](diffhunk://#diff-217ed82f87b78b399e304b07a159b27dff327c0f83adf4a2fc30b03bcbf84b01R7-R14): Added instructions on how to install optional dependencies. |
||
|
|
3490e2afac |
Python: Add missing await to openapi client (#5759)
### Motivation and Context Add missing await to openapi client <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description Add missing await to openapi client <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄 |
||
|
|
67eda9888e |
Python: Fix the command for pipeline checks in DEV_SETUP.md (#5726)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Since `.pre-commit-config.yaml` was moved in #5689, I would fix the command accordingly. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> please see the `Files Changed` tab. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 Co-authored-by: Evan Mattson <[email protected]> |
||
|
|
ca2ad19130 |
Python: Update to AOAI OYD 2024-02-15-preview API version (#5684)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description * Updated models to support the new preview API version 2024-02-15-preview, with some backward compatibility with previous API shape through the use of aliases * Updated samples, unit tests and integration tests * Added experimental settings management using pydantic-settings -- not strictly required here, but I thought it was useful for testing to be able to set all values through the .env file, and validation comes for free using Pydantic. Looking forward to feedback on this. :) ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄 --------- Co-authored-by: Abby Hartman <[email protected]> Co-authored-by: Evan Mattson <[email protected]> |
||
|
|
3437683270 |
Python: Small docstring fix (#5741)
### Motivation and Context This is a single-line fix to a Python docstring to get it to conform to Sphinx standards and convention used [elsewhere](https://github.com/microsoft/semantic-kernel/blob/290f44d593daa21f5a4f88eb5bb4e49468ebb608/python/semantic_kernel/planners/plan.py#L137) in the project. (My team owns the reference docs generation process for this and other libraries. We forced a build the other day from our side for test purposes and noticed it stumbled over this line. Feel free to ping me if any questions.) ### Description See changes, it's a one-liner 😁 ### Contribution Checklist I ashamedly admit I have done *none* of the below; hopefully this is a gimme, apologies if it creates noise. - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄 |
||
|
|
290f44d593 |
Python: small fix for CH serialization (#5738)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Noticed a small issue when ChatHistory is created with different types of messages, and then serialized. This fixed that and adds a test for that case. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 |
||
|
|
2bfcaf6443 |
Python: Bump transformers from 4.39.1 to 4.39.2 in /python (#5720)
Bumps [transformers](https://github.com/huggingface/transformers) from 4.39.1 to 4.39.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/huggingface/transformers/releases">transformers's releases</a>.</em></p> <blockquote> <h2>Patch release v4.39.2</h2> <p>Series of fixes for backwards compatibility (AutoAWQ and other quantization libraries, imports from <code>trainer_pt_utils</code>) and functionality (LLaMA tokenizer conversion)</p> <ul> <li>Safe import of LRScheduler <a href="https://redirect.github.com/huggingface/transformers/issues/29919">#29919</a></li> <li>[<code>BC</code>] Fix BC for other libraries <a href="https://redirect.github.com/huggingface/transformers/issues/29934">#29934</a></li> <li>[<code>LlamaSlowConverter</code>] Slow to Fast better support <a href="https://redirect.github.com/huggingface/transformers/issues/29797">#29797</a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/huggingface/transformers/commit/97c00cdfe132164dbd793447a088432fa359fd36"><code>97c00cd</code></a> Release: v4.39.2</li> <li><a href="https://github.com/huggingface/transformers/commit/e40fe39e2f87764162a391cefc3bfeca2b9bb7a0"><code>e40fe39</code></a> [<code>LlamaSlowConverter</code>] Slow to Fast better support (<a href="https://redirect.github.com/huggingface/transformers/issues/29797">#29797</a>)</li> <li><a href="https://github.com/huggingface/transformers/commit/02b101211301f9796dc1889685613c8c693b3f00"><code>02b1012</code></a> [<code>BC</code>] Fix BC for other libraries (<a href="https://redirect.github.com/huggingface/transformers/issues/29934">#29934</a>)</li> <li><a href="https://github.com/huggingface/transformers/commit/1b6d5017e21b0a36831d6ed7a25d022bfe85ea89"><code>1b6d501</code></a> Safe import of LRScheduler (<a href="https://redirect.github.com/huggingface/transformers/issues/29919">#29919</a>)</li> <li>See full diff in <a href="https://github.com/huggingface/transformers/compare/v4.39.1...v4.39.2">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Evan Mattson <[email protected]> |
||
|
|
87ead74b12 |
.Net & Python: Fix broken links in notebooks (#5698)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> I have fixed broken links found in the `06-memory-and-embeddings.ipynb` in `notebooks` (both in the `python` and `dotnet`). ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> please see the `Files Changed` tab. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 Co-authored-by: Mark Wallace <[email protected]> |
||
|
|
39aea9d8a9 | Python: .Net: Fixed typos based on new spell checker vocabulary (#5717) | ||
|
|
a81bed2d82 |
Python: Bump pyarrow from 14.0.2 to 15.0.2 in /python (#5647)
Bumps [pyarrow](https://github.com/apache/arrow) from 14.0.2 to 15.0.2. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/apache/arrow/commit/e03105efc38edca4ca429bf967a17b4d0fbebe40"><code>e03105e</code></a> MINOR: [Release] Update versions for 15.0.2</li> <li><a href="https://github.com/apache/arrow/commit/af83909f42cd43698a39e9eb0413dabc0d720db2"><code>af83909</code></a> MINOR: [Release] Update .deb/.rpm changelogs for 15.0.2</li> <li><a href="https://github.com/apache/arrow/commit/e81ddfe56e4d993978de06ba54ee0d4ec97b8bc9"><code>e81ddfe</code></a> MINOR: [Release] Update CHANGELOG.md for 15.0.2</li> <li><a href="https://github.com/apache/arrow/commit/481fab10f07059f1a4143dffedf38a2d2ae4e141"><code>481fab1</code></a> <a href="https://redirect.github.com/apache/arrow/issues/40252">GH-40252</a>: [C++] Make span SFINAE standards-conforming to enable compilation w...</li> <li><a href="https://github.com/apache/arrow/commit/cb35c53398d7305901a1ab7ace9b416fa1627b09"><code>cb35c53</code></a> <a href="https://redirect.github.com/apache/arrow/issues/40248">GH-40248</a>: [R] fallback to the correct libtool when we find a GNU one (<a href="https://redirect.github.com/apache/arrow/issues/40259">#40259</a>)</li> <li><a href="https://github.com/apache/arrow/commit/6921d54cf25dcb32e46f211d4cf4e84b759046e0"><code>6921d54</code></a> <a href="https://redirect.github.com/apache/arrow/issues/39582">GH-39582</a>: [C++][Acero] Increase size of Acero TempStack (<a href="https://redirect.github.com/apache/arrow/issues/40007">#40007</a>)</li> <li><a href="https://github.com/apache/arrow/commit/0969975dda352059eb5f830c5368db4144ebf8ed"><code>0969975</code></a> <a href="https://redirect.github.com/apache/arrow/issues/40068">GH-40068</a>: [C++] Possible data race when reading metadata of a parquet file (...</li> <li><a href="https://github.com/apache/arrow/commit/5cd4f07c7b309bbbdbdf18a0f2325055287cbc74"><code>5cd4f07</code></a> <a href="https://redirect.github.com/apache/arrow/issues/40485">GH-40485</a>: [Python][CI] Skip failing test_dateutil_tzinfo_to_string (<a href="https://redirect.github.com/apache/arrow/issues/40486">#40486</a>)</li> <li><a href="https://github.com/apache/arrow/commit/1c352a898ce5be02c2e08c8201b97457b1a33f68"><code>1c352a8</code></a> <a href="https://redirect.github.com/apache/arrow/issues/39943">GH-39943</a>: [CI][Python] Update manylinux images to avoid GPG problems download...</li> <li><a href="https://github.com/apache/arrow/commit/a6cabb248a464a023eb2f799e8e8102ec62a1145"><code>a6cabb2</code></a> <a href="https://redirect.github.com/apache/arrow/issues/40386">GH-40386</a>: [Python] Fix except clauses (<a href="https://redirect.github.com/apache/arrow/issues/40387">#40387</a>)</li> <li>Additional commits viewable in <a href="https://github.com/apache/arrow/compare/go/v14.0.2...go/v15.0.2">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Evan Mattson <[email protected]> |
||
|
|
e563920b70 |
Python: Honor the function calling options if configured. (#5701)
### Motivation and Context In the function calling stepwise planner, some settings like max_tokens (based on max_completion_tokens from the planner settings) and the max auto invoke attempts were not used. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description This PR fixes the issue where the prompt execution settings for chat completion wasn't using the function calling stepwise planner options, if configured. Closes #5661 <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄 |
||
|
|
2558b015b9 |
Python: fixing README.md example in python (#5708)
### Motivation and Context This pull request fixed the example on the "get started guide" discussed [here](https://github.com/microsoft/semantic-kernel/discussions/5307). Even though the maintainer closed the discussion and said that it was fixed, people kept finding the same error. ### Description Add the missing argument in the function [`create_function_from_prompt`](https://github.com/microsoft/semantic-kernel/blob/main/python/semantic_kernel/kernel.py), and fix the names on the second example. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 Co-authored-by: Evan Mattson <[email protected]> |
||
|
|
37edd5fb7e |
Python: Bump versions to 0.9.5b1 for release. (#5713)
### Motivation and Context Bump versions to 0.9.5b1 for release. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description Bump versions to 0.9.5b1 for release. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄 |
||
|
|
c4c7464f07 |
Python: Introduce operations to handle OpenAI plugins, improve OpenAPI plugins, and allow for auth (#5695)
### Motivation and Context Python had the ability to handle operations for OpenAPI plugins, but at a basic level. It did not have the ability to handle OpenAI plugins, nor did it allow the user to configure an authentication callback. This PR brings in that functionality. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description This PR: - Allows a user to handle OpenAI plugins with/without auth. Closes #5355 - Improves the functionality around handling OpenAPI specs. - Introduces an auth callback mechanism to allow for REST API calls to use auth - Introduces OpenAI/OpenAPI function execution settings. - Provides two new kernel examples that show how to handle a simple OpenAI plugin (Klarna) as well as a more complex plugin (Azure Key Vault) that requires auth. - Updates unit tests. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄 |
||
|
|
14a0881989 |
Python: mypy clears kernel.py (#5689)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Fixed all mypy errors for kernel.py In preparation of extending that to all files in semantic_kernel Also got the pre-commit hook working on a commit, with mypy checks fixes #5630 ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Moved pre-commit-config to base folder, can now be extended to have specific hooks for other languages fixed things in kernel.py to satisfy mypy used assert for some things, so that they can be skipped when running in -o mode. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 |
||
|
|
75089cb711 |
Python: Enhance Chat Message Content creation and parsing (#5520)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Introduces a polymorphic approach to creating and rendering Chat Message Contents and it's subclasses, leverages Pydantic Rootmodel for that. Fixes #5496 ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Adds ChatMessageContentBase that can create all types of CMC's, based on a type field (str) Redoes some of the rendering and parsing also retooled the hierarchy structure for Contents, including introducing a StreamingContentMixin instead of the StreamingKernelContent (which was never used), now all content classes (TextContent, CMC, etc) determine the fields used, while the Mixin adds one additional field and two additional methods for streaming messages, especially __add__ everything else runs the same way. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 |
||
|
|
192414180e |
Python: small fix for running prompt without any execution settings (#5687)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> I noticed that when running a piece without any execution settings, it errored out, while it should use 'default' service with the default settings for that service, that is now fixed. Small updates to the rag example. Added TODO: to replace the embedding_generator service in SemanticTextMemory with Kernel and the same service_selector pattern as for KernelFunctions. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 |
||
|
|
c110327249 |
Python: Fix - Action Planner breaking when parameters are not explicitly given in the ask (#5590)
Solution to the issue: Python: Action Planner breaking when parameters are not explicitly given in the ask https://github.com/microsoft/semantic-kernel/issues/5583 ### Motivation and Context The action planner breaks when the user does not provide specific parameters in the ask/goal. Users might have generic questions like "what is the date today?". Fix for the issue https://github.com/microsoft/semantic-kernel/issues/5583 ### Description Just adding an IF condition before iterating through the generated_plan variable to check if parameters are present or not does the job. Added unit test for a case like the example give above. ### Contribution Checklist - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 --------- Co-authored-by: arfsyed <[email protected]> Co-authored-by: Evan Mattson <[email protected]> |
||
|
|
84a75eca86 |
Python: Allow function calling stepwise planner to use AzureOpenAI chat service (#5618)
### Motivation and Context The first iteration of the function calling stepwise planner only used OpenAI. Now allow AzureChatService to use the planner. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description This PR: - Allows the use of AzureOpenAI for the FC Stepwise Planner - Fixes some formatting issues when generating the names/metadata of Plugins. .NET gets the function metadata as JSON, and the Azure Model performs much better with it formatted like this. - Fix some missing spaces in the constant message used in the planner -- Azure is treating the new lines in that const message incorrectly and it causes content filtering results (reaching out to the team to understand why this is). <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄 |
||
|
|
79620c727e |
Python: Remove jinja2 built in helpers from custom helpers. Introduce messages custom func helper. (#5617)
### Motivation and Context Jinja2 has a lot of built-in global functions, filters, and test methods. There's no need to have the overlap between those built-ins and the custom helpers we had defined. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description This PR: - Removes the overlap custom methods we had added so that one can use the built-in jinja2 filters, tests, and others. - Add some unit tests to exercise those built-ins, mainly to show how they can be used. - Introduces a `messages` custom helper function for handlebars and jinja2 which pretty prints the current chat_history. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄 |
||
|
|
a7d5bbfd42 |
.Net & Python: Fix Broken Links (#5393)
### Description I used [link-inspector](https://github.com/justindhillon/link-inspector) to find and fix broken links in this project. This is an updated PR of #4910, which fixes the merge conflict. Here are the links I have fixed: https://docs.microsoft.com/rest/api/keyvault/getsecrets/getsecrets --> https://learn.microsoft.com/en-us/rest/api/keyvault/secrets/get-secret/get-secret https://docs.microsoft.com/rest/api/keyvault/getkeys/getkeys --> https://learn.microsoft.com/en-us/rest/api/keyvault/keys/get-keys/get-keys https://docs.microsoft.com/rest/api/keyvault/encrypt/encrypt --> https://learn.microsoft.com/en-us/rest/api/keyvault/keys/encrypt/encrypt https://docs.microsoft.com/rest/api/keyvault/decrypt/decrypt --> https://learn.microsoft.com/en-us/rest/api/keyvault/keys/decrypt/decrypt https://docs.microsoft.com/rest/api/keyvault/createkey/createkey --> https://learn.microsoft.com/en-us/rest/api/keyvault/keys/create-key/create-key https://docs.microsoft.com/rest/api/keyvault/getsecretversions/getsecretversions --> https://learn.microsoft.com/en-us/rest/api/keyvault/secrets/get-secret-versions/get-secret-versions https://github.com/microsoft/semantic-kernel/blob/main/python/semantic_kernel/planning/plan.py --> https://github.com/microsoft/semantic-kernel/blob/main/python/semantic_kernel/planners/plan.py https://github.com/microsoft/semantic-kernel/blob/main/python/semantic_kernel/planning/sequential_planner/Plugins/SequentialPlanning/skprompt.txt --> https://github.com/microsoft/semantic-kernel/blob/main/samples/plugins/QAPlugin/Form/skprompt.txt ### Support my work These links were found with [link-inspector](https://github.com/justindhillon/link-inspector). If you find this PR useful, give the repo a ⭐ ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄 --------- Co-authored-by: Stuart Morris <[email protected]> Co-authored-by: SergeyMenshykh <[email protected]> Co-authored-by: Mark Wallace <[email protected]> Co-authored-by: Roger Barreto <[email protected]> Co-authored-by: Jadyn <[email protected]> Co-authored-by: Evan Mattson <[email protected]> Co-authored-by: Chris <[email protected]> Co-authored-by: Eduard van Valkenburg <[email protected]> |