Commit Graph
237 Commits
Author SHA1 Message Date
JibandAbby Harrison 56bcccfab6 Python: Make semantic_kernel.NullLogger match logging.Logger function signatures (#2892)
### 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. #2889 
2. Allows Contributors and Devs to seamlessly use `NullLogger` or
generalized `Logger` class without having to do attribute checks
3. See details in #2889 
4. #2889 

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

* I added in a `_NullerMeta` metaclass to the `NullLogger` to iterate
over all the function signatures in the `Logger` class and have them
issue no returns.
* This is backward compatible and breaks no existing implementations.

### 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: Abby Harrison <[email protected]>
2023-09-27 19:30:22 +00:00
Eduard van ValkenburgandAbby Harrison eb9ecba63f Python: simple implementation of token usage (#2844)
### 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 token usage tracking to the OpenAI classes, similar to how that is
done in dotnet.
Similar approach as #2526 but for Python
TODO: add a similar construct to python for the SKContext.LastResult.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Added three fields to the OpenAI Chat and Text completion classes.
After doing a call, check if 'usage" is in the response and then update
the fields, can be read through properties.

### 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: Abby Harrison <[email protected]>
2023-09-27 02:59:32 +00:00
Mark Karle 45f492aa89 Python: Enforcing return typehints on native functions (#2948)
### 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 solves [this
issue](https://github.com/microsoft/semantic-kernel/issues/1069) where
native functions are not returning the expected result. In python,
return typehints are optional. However, the semantic kernel requires a
return typehint to determine how to handle the function. For that
reason, we're now enforcing return typehints and raising an exception
when one is not provided. This may break existing void functions but
none in our repo are affected.

Fixes #1069 
### 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 😄

## Summary
This pull request includes two sets of changes. First, it fixes the
return type annotations in three core skills: file_io_skill,
text_memory_skill, and wait_skill. Specifically, the write_async method
in file_io_skill and the save_async method in text_memory_skill now have
a return type of None, and the wait method in wait_skill now has a
return type of None. Additionally, the
import_native_skill_from_directory method in kernel.py has been
refactored to simplify the code. Second, this pull request adds error
handling for functions with no return type in the delegate inference
module. Previously, if a function did not specify a return type, the
DelegateType could not be inferred, leading to errors. This pull request
adds a check for functions with no return type and raises a
KernelException with an appropriate error message. Additionally, this
pull request includes some minor changes to unit tests for native
functions.

## Changes
- Fixed return type annotation for write_async method in file_io_skill
- Fixed return type annotation for save_async method in
text_memory_skill
- Fixed return type annotation for wait method in wait_skill
- Refactored import_native_skill_from_directory method in kernel.py
- Added error handling for functions with no return type in the delegate
inference module
- Added a check for functions with no return type and raised a
KernelException with an appropriate error message
- Made minor changes to unit tests for native functions

---
*Powered by [Microsoft Semantic
Kernel](https://github.com/microsoft/semantic-kernel)*
2023-09-27 01:24:42 +00:00
dependabot[bot] 4c7df67d87 Python: Bump qdrant-client from 1.4.0 to 1.5.4 in /python (#2872)
Bumps [qdrant-client](https://github.com/qdrant/qdrant-client) from
1.4.0 to 1.5.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/qdrant/qdrant-client/releases">qdrant-client's
releases</a>.</em></p>
<blockquote>
<h2>v1.5.0</h2>
<h1>Changelog</h1>
<h2>Features</h2>
<ul>
<li><a
href="https://redirect.github.com/qdrant/qdrant-client/pull/280">qdrant/qdrant-client#280</a>,
<a
href="https://github.com/qdrant/qdrant-client/commit/6f8c5172d77a1775474d6ae145e7552543803806">https://github.com/qdrant/qdrant-client/commit/6f8c5172d77a1775474d6ae145e7552543803806</a>
- Compatibility updates for Qdrant v1.5.x</li>
<li><a
href="https://redirect.github.com/qdrant/qdrant-client/pull/210">qdrant/qdrant-client#210</a>
- <a href="https://github.com/qdrant/fastembed">fastembed</a>
integration. Enables lightweight, fast, Python library built for
retrieval embedding generation.</li>
<li><a
href="https://redirect.github.com/qdrant/qdrant-client/pull/243">qdrant/qdrant-client#243</a>
- Migration tool, allows easy data migration from one instance to
another</li>
</ul>
<h2>Bugfix</h2>
<ul>
<li><a
href="https://redirect.github.com/qdrant/qdrant-client/pull/258">qdrant/qdrant-client#258</a>
- disable forcing of http2 for cloud connections</li>
<li><a
href="https://redirect.github.com/qdrant/qdrant-client/pull/268">qdrant/qdrant-client#268</a>
- fix values count &amp; is_empty &amp; is_null conditions for local
mode</li>
</ul>
<h2>Important Notes</h2>
<ul>
<li>Python 3.7 is no longer supported</li>
</ul>
<hr />
<p>Use fastembed library to easily encode &amp; index documents into
qdrant</p>
<pre><code>pip install fastembed qdrant-client
</code></pre>
<pre lang="python"><code>from qdrant_client import QdrantClient
<h1>Initialize the client</h1>
<p>client = QdrantClient(&quot;:memory:&quot;) # or
QdrantClient(path=&quot;path/to/db&quot;)</p>
<h1>Prepare your documents, metadata, and IDs</h1>
<p>docs = [&quot;Qdrant has Langchain integrations&quot;, &quot;Qdrant
also has Llama Index integrations&quot;]
metadata = [
{&quot;source&quot;: &quot;Langchain-docs&quot;},
{&quot;source&quot;: &quot;Linkedin-docs&quot;},
]
ids = [42, 2]</p>
<h1>Use the new add method</h1>
<p>client.add(
collection_name=&quot;demo_collection&quot;,
documents=docs,
metadata=metadata,
ids=ids
)</p>
<p>search_result = client.query(
&lt;/tr&gt;&lt;/table&gt;
</code></pre></p>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/qdrant/qdrant-client/commit/82ecb104ed919596d7753c1a31017dfada8d3e02"><code>82ecb10</code></a>
bump version 1.5.4</li>
<li><a
href="https://github.com/qdrant/qdrant-client/commit/3fca54a6b9b6ecb4f1d606fd79baf6161805c624"><code>3fca54a</code></a>
new: add kwargs to QdrantBase (<a
href="https://redirect.github.com/qdrant/qdrant-client/issues/292">#292</a>)</li>
<li><a
href="https://github.com/qdrant/qdrant-client/commit/977780069489fa8b6b482c62f61d7fad7c81c051"><code>9777800</code></a>
bump version 1.5.3</li>
<li><a
href="https://github.com/qdrant/qdrant-client/commit/352aee6b6bb4d62c14a64d361f0d6ec0cadd6faf"><code>352aee6</code></a>
bump to v1.5.2 (<a
href="https://redirect.github.com/qdrant/qdrant-client/issues/290">#290</a>)</li>
<li><a
href="https://github.com/qdrant/qdrant-client/commit/52db932889835719f0bf840f8484fccfd80abc37"><code>52db932</code></a>
fix: explicitly convert np vector to list for previous versions of
pydantic (...</li>
<li><a
href="https://github.com/qdrant/qdrant-client/commit/4aa7e4bb6f7738b93c33a1a6fb59e287877b4e68"><code>4aa7e4b</code></a>
bump to v1.5.1 (<a
href="https://redirect.github.com/qdrant/qdrant-client/issues/287">#287</a>)</li>
<li><a
href="https://github.com/qdrant/qdrant-client/commit/27d4e2197b29cf226411264da14acc956876533a"><code>27d4e21</code></a>
fix fastembed for pydantic 1.x (<a
href="https://redirect.github.com/qdrant/qdrant-client/issues/285">#285</a>)</li>
<li><a
href="https://github.com/qdrant/qdrant-client/commit/c1e640ff25e76aa58dd5b899aec74360c9c3be48"><code>c1e640f</code></a>
V1.5.0 (<a
href="https://redirect.github.com/qdrant/qdrant-client/issues/281">#281</a>)</li>
<li><a
href="https://github.com/qdrant/qdrant-client/commit/cc34721c6faf501ece1117dd86bcb63d17e06c74"><code>cc34721</code></a>
fix README for fastembed</li>
<li><a
href="https://github.com/qdrant/qdrant-client/commit/41fd8015b793ba741d6e3b13bfb1228794d36f7a"><code>41fd801</code></a>
sync API (<a
href="https://redirect.github.com/qdrant/qdrant-client/issues/280">#280</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/qdrant/qdrant-client/compare/v1.4.0...v1.5.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=qdrant-client&package-manager=pip&previous-version=1.4.0&new-version=1.5.4)](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>
2023-09-21 05:09:40 +00:00
dependabot[bot]andMark Karle e8d84a832f Python: Bump azure-core from 1.29.3 to 1.29.4 in /python (#2874)
Bumps [azure-core](https://github.com/Azure/azure-sdk-for-python) from
1.29.3 to 1.29.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Azure/azure-sdk-for-python/releases">azure-core's
releases</a>.</em></p>
<blockquote>
<h2>azure-core_1.29.4</h2>
<h2>1.29.4 (2023-09-07)</h2>
<h3>Bugs Fixed</h3>
<ul>
<li>Fixed the issue that some urls trigger an infinite loop. <a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31346">#31346</a></li>
<li>Fixed issue where IndexError was raised if multipart responses did
not match the number of requests. <a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31471">#31471</a></li>
<li>Fixed issue unbound variable exception if dict is invalid in
CloudEvent.from_dict. <a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31835">#31835</a></li>
<li>Fixed issue asyncBearerTokenCredentialPolicy is not backward
compatible with SansIOHTTPPolicy. <a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31836">#31836</a></li>
<li>Fixed issue mypy complains with new version of azure-core. <a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31564">#31564</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/caa586f7b7d8f45c427463143ad9e1ba7a68ed5c"><code>caa586f</code></a>
update changelog (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31977">#31977</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/c97f5de0cb4be37a528af4f77250a0d1cc91774d"><code>c97f5de</code></a>
Update changelogs (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31969">#31969</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/d7e4b6caa6417347f2d6508c7369c5fab620811b"><code>d7e4b6c</code></a>
Pyright fixes for azure-core (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31766">#31766</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/f1f383698087d29dc63e956d37cec089bb2220dc"><code>f1f3836</code></a>
Refactor Conda Pipeline (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31804">#31804</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/232d010e890ba3a94cdd4fc0d97a7107e9eb1e90"><code>232d010</code></a>
add remaining missing keywords setting</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/a9d3c898a2e53b7082dfa056f2802b779910ded2"><code>a9d3c89</code></a>
Fix Tracing typing (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31943">#31943</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/96281d775213b3c6278496940ae3c350c8f9b32d"><code>96281d7</code></a>
Fix infinite loop (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31718">#31718</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/ffb31dd6f144796d2cb21471ba9734763914dce1"><code>ffb31dd</code></a>
[Core][OTel] Update documentation (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31778">#31778</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/98a94c414f01fc0ed28535eeaa9e381622ec368c"><code>98a94c4</code></a>
[Core] Fix multipart responses not matching requests error (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31707">#31707</a>)</li>
<li><a
href="https://github.com/Azure/azure-sdk-for-python/commit/cb215184b0e050fb6face2dd458723f10cd851c3"><code>cb21518</code></a>
Increment package version after release of azure-core (<a
href="https://redirect.github.com/Azure/azure-sdk-for-python/issues/31760">#31760</a>)</li>
<li>See full diff in <a
href="https://github.com/Azure/azure-sdk-for-python/compare/azure-core_1.29.3...azure-core_1.29.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=azure-core&package-manager=pip&previous-version=1.29.3&new-version=1.29.4)](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: Mark Karle <[email protected]>
2023-09-20 23:46:15 +00:00
Eduard van Valkenburg de7e478b38 Python: use black as the default formatter (#2845)
### 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 multiple times that I was getting failed tests because Black
did not run.
Changed the settings to make black the default formatter, in line with
the checks.

### 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 😄
2023-09-20 23:45:27 +00:00
dependabot[bot] 1425d0d255 Python: Bump chromadb from 0.4.6 to 0.4.10 in /python (#2873)
Bumps [chromadb](https://github.com/chroma-core/chroma) from 0.4.6 to
0.4.10.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/chroma-core/chroma/releases">chromadb's
releases</a>.</em></p>
<blockquote>
<h2>0.4.10</h2>
<p>Version: <code>0.4.10</code>
Git ref: <code>refs/tags/0.4.10</code>
Build Date: <code>2023-09-11T20:00</code>
PIP Package: <code>chroma-0.4.10.tar.gz</code>
Github Container Registry Image:
<code>ghcr.io/chroma-core/chroma:0.4.10</code>
DockerHub Image: <code>chromadb/chroma:0.4.10</code></p>
<h2>What's Changed</h2>
<ul>
<li>update JS instructions by <a
href="https://github.com/jeffchuber"><code>@​jeffchuber</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/960">chroma-core/chroma#960</a></li>
<li>[BLD] Add dockerhub support by <a
href="https://github.com/HammadB"><code>@​HammadB</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1112">chroma-core/chroma#1112</a></li>
<li>[BUG]: Issue where In/Nin list values by <a
href="https://github.com/tazarov"><code>@​tazarov</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1111">chroma-core/chroma#1111</a></li>
<li>[BUG]: URL Parsing And Validation by <a
href="https://github.com/tazarov"><code>@​tazarov</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1118">chroma-core/chroma#1118</a></li>
<li>[ENH] Added auth and external volume support for GCP by <a
href="https://github.com/tazarov"><code>@​tazarov</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1107">chroma-core/chroma#1107</a></li>
<li>[CHORE] Bump HNSWlib to latest version that has precompiled binaries
by <a href="https://github.com/HammadB"><code>@​HammadB</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1109">chroma-core/chroma#1109</a></li>
<li>[RELEASE] 0.4.10 by <a
href="https://github.com/HammadB"><code>@​HammadB</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1132">chroma-core/chroma#1132</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/chroma-core/chroma/compare/0.4.9...0.4.10">https://github.com/chroma-core/chroma/compare/0.4.9...0.4.10</a></p>
<h2>0.4.9</h2>
<p>Version: <code>0.4.9</code>
Git ref: <code>refs/tags/0.4.9</code>
Build Date: <code>2023-09-06T05:40</code>
PIP Package: <code>chroma-0.4.9.tar.gz</code>
Docker Image: <code>ghcr.io/chroma-core/chroma:0.4.9</code></p>
<h2>What's Changed</h2>
<ul>
<li>[ENH] Added providers to onnx runtime session by <a
href="https://github.com/tazarov"><code>@​tazarov</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1006">chroma-core/chroma#1006</a></li>
<li>multiplatform docker release builds by <a
href="https://github.com/jeffchuber"><code>@​jeffchuber</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/857">chroma-core/chroma#857</a></li>
<li>[ENH]: JS Client Support for Auth by <a
href="https://github.com/tazarov"><code>@​tazarov</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1050">chroma-core/chroma#1050</a></li>
<li>[ENH]: OpenAI npm package v4 breaking changes by <a
href="https://github.com/tazarov"><code>@​tazarov</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1039">chroma-core/chroma#1039</a></li>
<li>[BUG] fix: numpy version compat for 3.7 vs &gt; for
cross_version_tests by <a
href="https://github.com/HammadB"><code>@​HammadB</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1064">chroma-core/chroma#1064</a></li>
<li>fix: use workaround for dynamic import by <a
href="https://github.com/perzeuss"><code>@​perzeuss</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/956">chroma-core/chroma#956</a></li>
<li>[BUG]: Fixed Static Auth Token range of allowed chars by <a
href="https://github.com/tazarov"><code>@​tazarov</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1076">chroma-core/chroma#1076</a></li>
<li>[CLN] replaced lambdas with def by <a
href="https://github.com/leo-gan"><code>@​leo-gan</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1070">chroma-core/chroma#1070</a></li>
<li>Add CIP-1 Allow Filtering for Collections by <a
href="https://github.com/Ishiihara"><code>@​Ishiihara</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/855">chroma-core/chroma#855</a></li>
<li>[BUG]: Local Segment Dir Removal by <a
href="https://github.com/tazarov"><code>@​tazarov</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1080">chroma-core/chroma#1080</a></li>
<li>[ENH]: CIP-4: In and Not In Metadata Filters by <a
href="https://github.com/tazarov"><code>@​tazarov</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1081">chroma-core/chroma#1081</a></li>
<li>[BUG] docker-compose default persistent directory path updated by <a
href="https://github.com/Benvii"><code>@​Benvii</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1046">chroma-core/chroma#1046</a></li>
<li>[ENH]: AWS Deployment by <a
href="https://github.com/tazarov"><code>@​tazarov</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1086">chroma-core/chroma#1086</a></li>
<li>[ENH]: Improved HttpClient URL support by <a
href="https://github.com/tazarov"><code>@​tazarov</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1067">chroma-core/chroma#1067</a></li>
<li>Add explicit env to docker compose so that it can hint at usage by
<a href="https://github.com/HammadB"><code>@​HammadB</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1088">chroma-core/chroma#1088</a></li>
<li>[BLD] Add release automation for JS client by <a
href="https://github.com/HammadB"><code>@​HammadB</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1091">chroma-core/chroma#1091</a></li>
<li>[BLD] Add working directory to npm run js by <a
href="https://github.com/HammadB"><code>@​HammadB</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1092">chroma-core/chroma#1092</a></li>
<li>[BLD] Prevent python release from running on js tag pushes by <a
href="https://github.com/HammadB"><code>@​HammadB</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1093">chroma-core/chroma#1093</a></li>
<li>[BLD] Release env vars save to GITHUB_ENV by <a
href="https://github.com/HammadB"><code>@​HammadB</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1094">chroma-core/chroma#1094</a></li>
<li>[BLD] Add install deps to JS release workflow by <a
href="https://github.com/HammadB"><code>@​HammadB</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1095">chroma-core/chroma#1095</a></li>
<li>[BLD] Add npm run db:run to run docker-compose up by <a
href="https://github.com/HammadB"><code>@​HammadB</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1097">chroma-core/chroma#1097</a></li>
<li>[RELEASE] Release JS 1.5.7 by <a
href="https://github.com/HammadB"><code>@​HammadB</code></a> in <a
href="https://redirect.github.com/chroma-core/chroma/pull/1090">chroma-core/chroma#1090</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/chroma-core/chroma/commit/8e967304d6c1a18d88b63c1fdb3e7a638a678f01"><code>8e96730</code></a>
[RELEASE] 0.4.10 (<a
href="https://redirect.github.com/chroma-core/chroma/issues/1132">#1132</a>)</li>
<li><a
href="https://github.com/chroma-core/chroma/commit/9db68045e6b57fdaa418ad723f72a3121be297ac"><code>9db6804</code></a>
[CHORE] Bump HNSWlib to latest version that has precompiled binaries (<a
href="https://redirect.github.com/chroma-core/chroma/issues/1109">#1109</a>)</li>
<li><a
href="https://github.com/chroma-core/chroma/commit/2dd5a1552687043889a2dafe27de56577ad278a7"><code>2dd5a15</code></a>
[ENH] Added auth and external volume support for GCP (<a
href="https://redirect.github.com/chroma-core/chroma/issues/1107">#1107</a>)</li>
<li><a
href="https://github.com/chroma-core/chroma/commit/9c1979c9311acb8662fc22a7deac17907a9b128b"><code>9c1979c</code></a>
[BUG]: URL Parsing And Validation (<a
href="https://redirect.github.com/chroma-core/chroma/issues/1118">#1118</a>)</li>
<li><a
href="https://github.com/chroma-core/chroma/commit/ea73f05bdf91ff771388d6c573af9ddd8ca37cbe"><code>ea73f05</code></a>
[BUG]: Issue where In/Nin list values (<a
href="https://redirect.github.com/chroma-core/chroma/issues/1111">#1111</a>)</li>
<li><a
href="https://github.com/chroma-core/chroma/commit/237b3e3c96c0e25d87dec4c5b2b21085c040dfa3"><code>237b3e3</code></a>
[BLD] Add dockerhub support (<a
href="https://redirect.github.com/chroma-core/chroma/issues/1112">#1112</a>)</li>
<li><a
href="https://github.com/chroma-core/chroma/commit/3241de7a6fc20fe178dbe93090ee89f57a5625b6"><code>3241de7</code></a>
update JS instructions (<a
href="https://redirect.github.com/chroma-core/chroma/issues/960">#960</a>)</li>
<li><a
href="https://github.com/chroma-core/chroma/commit/747f7c6457fdea29394cdedcfd7cd0bc0541b3eb"><code>747f7c6</code></a>
[BLD] Update release workflow tag check</li>
<li><a
href="https://github.com/chroma-core/chroma/commit/327accb2de923c413d69dc5878c94f903c24e269"><code>327accb</code></a>
[RELEASE] Release 0.4.9 (<a
href="https://redirect.github.com/chroma-core/chroma/issues/1100">#1100</a>)</li>
<li><a
href="https://github.com/chroma-core/chroma/commit/e862ab207fef6876d65801bed234f0b7d5dbf70f"><code>e862ab2</code></a>
remove unused bin/build (<a
href="https://redirect.github.com/chroma-core/chroma/issues/1099">#1099</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/chroma-core/chroma/compare/0.4.6...0.4.10">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=chromadb&package-manager=pip&previous-version=0.4.6&new-version=0.4.10)](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>
2023-09-20 20:59:12 +00:00
dependabot[bot] 8ceaf53f50 Python: Bump openapi-core from 0.18.0 to 0.18.1 in /python (#2875)
Bumps [openapi-core](https://github.com/python-openapi/openapi-core)
from 0.18.0 to 0.18.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.18.1</h2>
<h2>Bug fixes</h2>
<ul>
<li>Ignore formats for other types in unmarshalling process <a
href="https://redirect.github.com/python-openapi/openapi-core/issues/599">#599</a></li>
</ul>
<h2>Features</h2>
<ul>
<li>More media types supported <a
href="https://redirect.github.com/python-openapi/openapi-core/issues/622">#622</a></li>
<li>Unmarshalling customizations in middlewares
(<code>FalconOpenAPIMiddleware</code>, <code>FlaskOpenAPIView</code>,
<code>FlaskOpenAPIViewDecorator</code>) <a
href="https://redirect.github.com/python-openapi/openapi-core/issues/623">#623</a></li>
</ul>
<h2>Documentation</h2>
<ul>
<li>Changed doc indentation from 3 to 4 <a
href="https://redirect.github.com/python-openapi/openapi-core/issues/631">#631</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/python-openapi/openapi-core/commit/1b688bb4ce6fd5cce0f4978051b948d6a5eb98c0"><code>1b688bb</code></a>
Version 0.18.1</li>
<li><a
href="https://github.com/python-openapi/openapi-core/commit/e9f6ae6a30e01b2a1f78c52fc2befbab4857f212"><code>e9f6ae6</code></a>
Add bump2version to dev dependencies</li>
<li><a
href="https://github.com/python-openapi/openapi-core/commit/c6d99236e71751e49bec04d946d006249a9fad4b"><code>c6d9923</code></a>
asdf python packages ignored</li>
<li><a
href="https://github.com/python-openapi/openapi-core/commit/64d57141bae19e85992dccb5fb879ec8c6109c3c"><code>64d5714</code></a>
asdf versions ignored</li>
<li><a
href="https://github.com/python-openapi/openapi-core/commit/a77e56818346ca5a6ccb2941331f18df174b278f"><code>a77e568</code></a>
Merge pull request <a
href="https://redirect.github.com/python-openapi/openapi-core/issues/666">#666</a>
from python-openapi/dependabot/pip/httpx-0.25.0</li>
<li><a
href="https://github.com/python-openapi/openapi-core/commit/ee3078aef86c9ed15346d7dbacb0cc7a6489d330"><code>ee3078a</code></a>
Merge pull request <a
href="https://redirect.github.com/python-openapi/openapi-core/issues/665">#665</a>
from python-openapi/dependabot/pip/pytest-aiohttp-1.0.5</li>
<li><a
href="https://github.com/python-openapi/openapi-core/commit/79ef199bd7d13fe1017d3a8e7866cd749c873937"><code>79ef199</code></a>
Merge pull request <a
href="https://redirect.github.com/python-openapi/openapi-core/issues/664">#664</a>
from python-openapi/dependabot/pip/black-23.9.1</li>
<li><a
href="https://github.com/python-openapi/openapi-core/commit/2309716a964e5784db0b3a3d212a56a2404c419c"><code>2309716</code></a>
Merge pull request <a
href="https://redirect.github.com/python-openapi/openapi-core/issues/663">#663</a>
from python-openapi/dependabot/pip/pytest-7.4.2</li>
<li><a
href="https://github.com/python-openapi/openapi-core/commit/4c7149b4da13cb6268b55f0bf250a5ce97ccf0c6"><code>4c7149b</code></a>
Bump httpx from 0.24.1 to 0.25.0</li>
<li><a
href="https://github.com/python-openapi/openapi-core/commit/ab428295ab112788ebe11577289806bf63fa5017"><code>ab42829</code></a>
Bump pytest-aiohttp from 1.0.4 to 1.0.5</li>
<li>Additional commits viewable in <a
href="https://github.com/python-openapi/openapi-core/compare/0.18.0...0.18.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=openapi-core&package-manager=pip&previous-version=0.18.0&new-version=0.18.1)](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>
2023-09-19 23:40:13 +00:00
Abby Harrison fc9f31aee5 Python: Update pyproject.toml to version 0.3.13.dev (#2859)
Update pip version in preparation for next package release

### 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 😄
2023-09-18 19:56:36 +00:00
Alwin Arrasyid d5711d3a3a Python: No more hardcoded Azure OpenAI Service deployment name (#2684)
### Motivation and Context

Solve confusion due to hardcoded Azure OpenAI Service deployment name in
Python notebooks.

<!-- 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

Previously, the deployment name for Azure OpenAI Service in the Python
notebooks was hardcoded as "gpt-35-turbo".
This PR solves the confusion by using the `deployment` variable loaded
from `.env` file.

<!-- 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 😄
2023-09-18 18:27:55 +00:00
dependabot[bot] 2d83ac2e80 Python: Bump pyarrow from 12.0.1 to 13.0.0 in /python (#2704)
Bumps [pyarrow](https://github.com/apache/arrow) from 12.0.1 to 13.0.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/apache/arrow/commit/b7d2f7ffca66c868bd2fce5b3749c6caa002a7f0"><code>b7d2f7f</code></a>
MINOR: [Release] Update versions for 13.0.0</li>
<li><a
href="https://github.com/apache/arrow/commit/c28a20a6107865a158b3465a513425922d7807d8"><code>c28a20a</code></a>
MINOR: [Release] Update .deb/.rpm changelogs for 13.0.0</li>
<li><a
href="https://github.com/apache/arrow/commit/43dd768f3143378103b220af4d97ea3c7c6fa043"><code>43dd768</code></a>
MINOR: [Release] Update CHANGELOG.md for 13.0.0</li>
<li><a
href="https://github.com/apache/arrow/commit/0a9898410b69c2d712fbb37ce3a1e63c9c34c38d"><code>0a98984</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/37197">GH-37197</a>:
[Java][CI][Packaging] Free some disk space on the java-jars GitHub
...</li>
<li><a
href="https://github.com/apache/arrow/commit/73660ff383b116166d73a38f957330d5f7654e78"><code>73660ff</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/36969">GH-36969</a>:
[R] Disable GCS by default when doing a bundled build on gcc-13 (<a
href="https://redirect.github.com/apache/arrow/issues/3">#3</a>...</li>
<li><a
href="https://github.com/apache/arrow/commit/594b746892394d3afaa1a62cc0cd3621c2f6ab52"><code>594b746</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/37019">GH-37019</a>:
[R] Documentation for read_parquet() et al needs updating (<a
href="https://redirect.github.com/apache/arrow/issues/37020">#37020</a>)</li>
<li><a
href="https://github.com/apache/arrow/commit/f5a9a59a10a0022aba13bb1b7caa4b8e5c164c1a"><code>f5a9a59</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/36892">GH-36892</a>:
[C++] Fix performance regressions in <code>FieldPath::Get</code> (<a
href="https://redirect.github.com/apache/arrow/issues/37032">#37032</a>)</li>
<li><a
href="https://github.com/apache/arrow/commit/464d01284b02a4b73560d12b9388efecea3fe154"><code>464d012</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/36947">GH-36947</a>:
[CI] Move free up disk space to the Jinja macros to be able to
reus...</li>
<li><a
href="https://github.com/apache/arrow/commit/17a6885cc2dac79d16a1a8eef6ce43f398734746"><code>17a6885</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/36928">GH-36928</a>:
[Java] Make it run well with the netty newest version 4.1.96 (<a
href="https://redirect.github.com/apache/arrow/issues/36926">#36926</a>)</li>
<li><a
href="https://github.com/apache/arrow/commit/4d228512a9a3986c60d93475964218306f5ca240"><code>4d22851</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/36913">GH-36913</a>:
[C++] Skip empty buffer concatenation to fix UBSan error (<a
href="https://redirect.github.com/apache/arrow/issues/36914">#36914</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/apache/arrow/compare/go/v12.0.1...go/v13.0.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pyarrow&package-manager=pip&previous-version=12.0.1&new-version=13.0.0)](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>
2023-09-18 18:01:46 +00:00
dependabot[bot] 730a9a5e33 Python: Bump ruff from 0.0.285 to 0.0.289 in /python (#2837)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.285 to 0.0.289.
<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.0.289</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<h3>Bug Fixes</h3>
<ul>
<li>Invert condition for &lt; and &lt;= in outdated version block by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7284">astral-sh/ruff#7284</a></li>
<li>Ignore <code>@override</code> method when enforcing
<code>bad-dunder-name</code> rule by <a
href="https://github.com/brendonh8"><code>@​brendonh8</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7224">astral-sh/ruff#7224</a></li>
<li>Add <code>NotebookIndex</code> to the cache by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/6863">astral-sh/ruff#6863</a></li>
</ul>
<h3>Preview</h3>
<p>This release includes a new preview mode which can be used to opt-in
to unstable rules and features.</p>
<ul>
<li>Update rule selection to respect preview mode by <a
href="https://github.com/zanieb"><code>@​zanieb</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7195">astral-sh/ruff#7195</a></li>
<li>Display the <code>--preview</code> option in the CLI help menu by <a
href="https://github.com/zanieb"><code>@​zanieb</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7274">astral-sh/ruff#7274</a></li>
</ul>
<p>See the <a
href="https://beta.ruff.rs/docs/preview/">documentation</a> and <a
href="https://github.com/astral-sh/ruff/discussions/6998">versioning
discussion</a> for more details.</p>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/brendonh8"><code>@​brendonh8</code></a>
made their first contribution in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7224">astral-sh/ruff#7224</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/astral-sh/ruff/compare/v0.0.288...v0.0.289">https://github.com/astral-sh/ruff/compare/v0.0.288...v0.0.289</a></p>
<h2>v0.0.288</h2>
<h2>What's Changed</h2>
<h3>Breaking Changes</h3>
<ul>
<li>Remove emoji identifier support by <a
href="https://github.com/MichaReiser"><code>@​MichaReiser</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/7212">astral-sh/ruff#7212</a></li>
<li>Location agnostic GitLab fingerprints by <a
href="https://github.com/gregersn"><code>@​gregersn</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7203">astral-sh/ruff#7203</a></li>
</ul>
<h3>Rules</h3>
<ul>
<li>[<code>ruff</code>]
<ul>
<li><code>RUF001</code>: Remove autofix for ambiguous unicode rule by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7168">astral-sh/ruff#7168</a></li>
</ul>
</li>
</ul>
<h3>Settings</h3>
<ul>
<li>[<code>flake8-self</code>]
<ul>
<li><code>SLF001</code>: Add <code>extend-ignore-names</code> option by
<a href="https://github.com/jaap3"><code>@​jaap3</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7194">astral-sh/ruff#7194</a></li>
</ul>
</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>[<code>flake8-bugbear</code>]
<ul>
<li><code>B006</code>: Add newline if fix is at end-of-file by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7090">astral-sh/ruff#7090</a></li>
<li><code>B006</code>: Fix function docstring followed by whitespace but
no newline by <a
href="https://github.com/zanieb"><code>@​zanieb</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7160">astral-sh/ruff#7160</a></li>
<li><code>B009</code>: Parenthesize expressions when converting to
attribute access by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7091">astral-sh/ruff#7091</a></li>
<li><code>B009</code>, <code>B010</code>: Fix <code>getattr</code> calls
on <code>int</code> literals by <a
href="https://github.com/density"><code>@​density</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7057">astral-sh/ruff#7057</a></li>
<li><code>B013</code>: Supported starred exceptions in length-one tuple
detection by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7080">astral-sh/ruff#7080</a></li>
<li><code>B013</code>: Insert required space when fixing by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/7148">astral-sh/ruff#7148</a></li>
</ul>
</li>
<li>[<code>flake8-comprehensions</code>]</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/BREAKING_CHANGES.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h1>Breaking Changes</h1>
<h2>0.0.288</h2>
<h3>Remove support for emoji identifiers (<a
href="https://redirect.github.com/astral-sh/ruff/pull/7212">#7212</a>)</h3>
<p>Previously, Ruff supported the non-standard compliant emoji
identifiers e.g. <code>📦 = 1</code>.
We decided to remove this non-standard language extension, and Ruff now
reports syntax errors for emoji identifiers in your code, the same as
CPython.</p>
<h3>Improved GitLab fingerprints (<a
href="https://redirect.github.com/astral-sh/ruff/pull/7203">#7203</a>)</h3>
<p>GitLab uses fingerprints to identify new, existing, or fixed
violations. Previously, Ruff included the violation's position in the
fingerprint. Using the location has the downside that changing any code
before the violation causes the fingerprint to change, resulting in
GitLab reporting one fixed and one new violation even though it is a
pre-existing violation.</p>
<p>Ruff now uses a more stable location-agnostic fingerprint to minimize
that existing violations incorrectly get marked as fixed and re-reported
as new violations.</p>
<p>Expect GitLab to report each pre-existing violation in your project
as fixed and a new violation in your Ruff upgrade PR.</p>
<h2>0.0.283 / 0.284</h2>
<h3>The target Python version now defaults to 3.8 instead of 3.10 (<a
href="https://redirect.github.com/astral-sh/ruff/pull/6397">#6397</a>)</h3>
<p>Previously, when a target Python version was not specified, Ruff
would use a default of Python 3.10. However, it is safer to default to
an <em>older</em> Python version to avoid assuming the availability of
new features. We now default to the oldest supported Python version
which is currently Python 3.8.</p>
<p>(We still support Python 3.7 but since <a
href="https://devguide.python.org/versions/#unsupported-versions">it has
reached EOL</a> we've decided not to make it the default here.)</p>
<p>Note this change was announced in 0.0.283 but not active until
0.0.284.</p>
<h2>0.0.277</h2>
<h3><code>.ipynb_checkpoints</code>, <code>.pyenv</code>,
<code>.pytest_cache</code>, and <code>.vscode</code> are now excluded by
default (<a
href="https://redirect.github.com/astral-sh/ruff/pull/5513">#5513</a>)</h3>
<p>Ruff maintains a list of default exclusions, which now consists of
the following patterns:</p>
<ul>
<li><code>.bzr</code></li>
<li><code>.direnv</code></li>
<li><code>.eggs</code></li>
<li><code>.git</code></li>
<li><code>.git-rewrite</code></li>
<li><code>.hg</code></li>
<li><code>.ipynb_checkpoints</code></li>
<li><code>.mypy_cache</code></li>
<li><code>.nox</code></li>
<li><code>.pants.d</code></li>
<li><code>.pyenv</code></li>
<li><code>.pytest_cache</code></li>
<li><code>.pytype</code></li>
<li><code>.ruff_cache</code></li>
<li><code>.svn</code></li>
<li><code>.tox</code></li>
<li><code>.venv</code></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/e7a27794022e18b05136ce8e4fc121f14713ed02"><code>e7a2779</code></a>
Bump version to v0.0.289 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/7308">#7308</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/008da95b29d2b1ccc20e8b5e86bac51296d2df05"><code>008da95</code></a>
Add preview documentation section (<a
href="https://redirect.github.com/astral-sh/ruff/issues/7281">#7281</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/5d4dd3e38e624dffe850853fcc9fb5de38a36d58"><code>5d4dd3e</code></a>
Set the target deployment to <code>main</code> during dispatched
documentation deploymen...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/e561f5783b30eb318c0fa1f7d7d24ad8d89c6e05"><code>e561f57</code></a>
Fix(vscode): Respect line length ruff.toml configuration (<a
href="https://redirect.github.com/astral-sh/ruff/issues/7306">#7306</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/ee0f1270cf8cf816754dbc471e8fb855ca40ca9c"><code>ee0f127</code></a>
Add <code>NotebookIndex</code> to the cache (<a
href="https://redirect.github.com/astral-sh/ruff/issues/6863">#6863</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/e7b7e4a18d881893132dc5e6b2209ebdcedfb253"><code>e7b7e4a</code></a>
Add documentation to <code>duplicate-union-member</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/7225">#7225</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/b4419c34ea8f820157cf428e2bf5f7f2d415c894"><code>b4419c3</code></a>
Ignore <code>@override</code> method when enforcing
<code>bad-dunder-name</code> rule (<a
href="https://redirect.github.com/astral-sh/ruff/issues/7224">#7224</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/08f19226b9571fb87cec16231bb26b21249e2a92"><code>08f1922</code></a>
Fix panic when formatting binary expression with two implicit
concatenated st...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/1e6df19a351170ded4b1e1a4e068993107bd1047"><code>1e6df19</code></a>
Bool expression comment placement (<a
href="https://redirect.github.com/astral-sh/ruff/issues/7269">#7269</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/c21b960fc7ac8b60a3d2e5cc753ed4a9ecfde356"><code>c21b960</code></a>
Display the <code>--preview</code> option in the CLI help menu (<a
href="https://redirect.github.com/astral-sh/ruff/issues/7274">#7274</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.0.285...v0.0.289">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.0.285&new-version=0.0.289)](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>
2023-09-18 17:37:50 +00:00
c74ba11e09 Python: Add Stepwise planner example to planner notebook (#2675)
### Motivation and Context

Add an example of using the Stepwise Planner in notebook 5

---------

Co-authored-by: Alex Chao <achao@achao>
Co-authored-by: Abby Harrison <[email protected]>
2023-09-15 18:34:53 +00:00
dependabot[bot] b87f44e301 Python: Bump pytest from 7.4.0 to 7.4.2 in /python (#2789)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.0 to
7.4.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest/releases">pytest's
releases</a>.</em></p>
<blockquote>
<h2>pytest 7.4.2 (2023-09-07)</h2>
<h1>Bug Fixes</h1>
<ul>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11237">#11237</a>:
Fix doctest collection of <code>functools.cached_property</code>
objects.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11306">#11306</a>:
Fixed bug using <code>--importmode=importlib</code> which would cause
package <code>__init__.py</code> files to be imported more than once in
some cases.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11367">#11367</a>:
Fixed bug where <code>user_properties</code> where not being saved in
the JUnit XML file if a fixture failed during teardown.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11394">#11394</a>:
Fixed crash when parsing long command line arguments that might be
interpreted as files.</p>
</li>
</ul>
<h1>Improved Documentation</h1>
<ul>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11391">#11391</a>:
Improved disclaimer on pytest plugin reference page to better indicate
this is an automated, non-curated listing.</li>
</ul>
<h2>pytest 7.4.1 (2023-09-02)</h2>
<h2>Bug Fixes</h2>
<ul>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/10337">#10337</a>:
Fixed bug where fake intermediate modules generated by
<code>--import-mode=importlib</code> would not include the
child modules as attributes of the parent modules.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/10702">#10702</a>:
Fixed error assertion handling in <code>pytest.approx</code> when
<code>None</code> is an expected or received value when comparing
dictionaries.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/10811">#10811</a>:
Fixed issue when using <code>--import-mode=importlib</code> together
with <code>--doctest-modules</code> that caused modules
to be imported more than once, causing problems with modules that have
import side effects.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest/commit/45f34dfb8d813b00c7d8060a3ea75f7b4bc5cd7d"><code>45f34df</code></a>
Prepare release version 7.4.2</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/e4f022f0d82bd530c3e4409c1c6a87e55ef9098d"><code>e4f022f</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/11406">#11406</a>
from nicoddemus/backport-11404-to-7.4.x</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/63b0c6f75f218b400a5a42305f9fa3830448f7e8"><code>63b0c6f</code></a>
Use _pytest.pathlib.safe_exists in get_dirs_from_args</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/884b911a9cbf3c97689b473ae7f732fc72e06eea"><code>884b911</code></a>
Fix crash when passing a very long cmdline argument (<a
href="https://redirect.github.com/pytest-dev/pytest/issues/11404">#11404</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/6e49a74089540196ae2b2bf8267a530ad9957f3e"><code>6e49a74</code></a>
[7.4.x] Fix doctest collection of <code>functools.cached_property</code>
objects. (<a
href="https://redirect.github.com/pytest-dev/pytest/issues/11403">#11403</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/79c2012d4090bbe0cd0910e1616dc19ca75aea86"><code>79c2012</code></a>
[7.4.x] doc: Remove done training (<a
href="https://redirect.github.com/pytest-dev/pytest/issues/11400">#11400</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/de69883e3a6a923c9eceb28cedf8e9660bd58a51"><code>de69883</code></a>
[7.4.x] improve plugin list disclaimer (<a
href="https://redirect.github.com/pytest-dev/pytest/issues/11398">#11398</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/1de00e9830c57805ec07a0d67095822703b90bb4"><code>1de00e9</code></a>
[7.4.x] Fix import_path for packages (<a
href="https://redirect.github.com/pytest-dev/pytest/issues/11395">#11395</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/7f5d9b9df4e5e323fe3a66aeb956557710e5d277"><code>7f5d9b9</code></a>
Fix user_properties not saved to XML if fixture errors during teardown
(<a
href="https://redirect.github.com/pytest-dev/pytest/issues/11382">#11382</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/82eb86f707cac79f33d0ff69723ccf1cea7e75f7"><code>82eb86f</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/11377">#11377</a>
from pytest-dev/release-7.4.1</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest/compare/7.4.0...7.4.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pytest&package-manager=pip&previous-version=7.4.0&new-version=7.4.2)](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>
2023-09-14 23:53:47 +00:00
Lee MillerandShawn Callegari 8fcd7c0c8b .Net: Fix XML escaping in skprompt.txt examples (#2827)
Update the examples in skprompt.txt to correctly escape XML characters
and improve the clarity of the comments.

Fixes #2246

### 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: Shawn Callegari <[email protected]>
2023-09-14 22:38:43 +00:00
dependabot[bot]andShawn Callegari 03a76bf87f Python: Bump openai from 0.27.9 to 0.28.0 in /python (#2711)
Bumps [openai](https://github.com/openai/openai-python) from 0.27.9 to 0.28.0.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Shawn Callegari <[email protected]>
2023-09-14 15:32:28 -07:00
vivekgarudiandLee Miller 2b94161f4f Python: Update 00-getting-started.ipynb (#2766)
deployment name is required instead of
kernel.add_chat_service("chat_completion",
AzureChatCompletion("gpt-35-turbo", endpoint, api_key))

Fixes #2772

### 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?
  For notebook to work.
  2. What problem does it solve?
  current fails with error deployment not exist.
  3. What scenario does it contribute to?
  Getting started
  7. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Just replaced hardcoded deployment name to use deployment parameter
from .env file! -->

### 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: Lee Miller <[email protected]>
2023-09-13 17:23:31 +00:00
Abby Harrison 407601f18d Python: Update pyproject.toml with version=0.3.12 (#2779)
### 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 😄
2023-09-11 19:56:41 +00:00
Abby Harrison 1b883eac5e Python: Add init file to connectors/memory (#2769)
### Motivation and Context
This PR addresses inconsistencies in auto-doc generation.

### 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 😄
2023-09-11 17:20:31 +00:00
Chris f2f8d5a58a Python - Azure Cognitive Search Connector - Remove redeclaration (#2740)
### Motivation and Context

Customer reported credentials passed into connector are ignored:

https://github.com/microsoft/semantic-kernel/issues/2701

### Description

Local variable declaration taking precedence over function parameters.

### 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 😄
2023-09-07 19:15:51 +00:00
NoahliasandAbby Harrison d17e03842d Python: doc: fix the import (#2691)
### 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.
--> 
typo in docs

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Just fix the error import

### 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: Abby Harrison <[email protected]>
2023-09-07 17:41:24 +00:00
Abby Harrison 7313258072 Python: add chat system message to complete settings (#2726)
### Motivation and Context
This PR parallels work done in .NET for
https://github.com/microsoft/semantic-kernel/pull/2671 and closes
https://github.com/microsoft/semantic-kernel/issues/2722.

This PR allows users to set the chat system message using the semantic
function prompt template.

### Description

* added new `chat_system_message` parameter to
`complete_request_setttings` (defaults to None) and
`chat_request_settings `(defults to "Assistant is a large language
model.")
* added handling of this new parameter to the `chat_prompt_template`
* added corresponding tests
* added a small helper function for deserializing prompt_configs - token
selection biases need to be deserialized to ints, otherwise json loads
deserializes the keys in the set to be strings.

Unrelated 
* added missing __init__ file to the weaviate connector's directory

### 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 😄
2023-09-06 16:01:41 +00:00
Abby Harrison 393277bf8f Python: skip redis tests in CI if the platform is not linux (#2727)
### Motivation and Context
The python integration tests use the public redis docker image. This
image is not available to our macOS and windows test agents. This PR
ensures that the tests are skipped on non-linux platforms (CI only).

### 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 😄
2023-09-05 23:46:20 +00:00
Adarsh AcharyaandLee Miller 72736904ca Python: Fix attribute error in basic_planner.py under class Plan (#2720)
Fixes #2703 
Fixes #2660

### Description
Resolved attribute error in the Plan class under basic_planner.py. 

### Contribution Checklist

- [ ] 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

Unit test results : 

![Screenshot
(454)](https://github.com/microsoft/semantic-kernel/assets/132294330/059b852a-229e-4317-a2e4-bab16ac78e4a)

Co-authored-by: Lee Miller <[email protected]>
2023-09-05 23:09:41 +00:00
Eduard van ValkenburgandAbby Harrison e1595f4b30 Python: fixes for openapi sample (#2655)
### 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 tried the openapi sample, didn't work because the context variables
check if the values are strings, otherwise breaks. Now using strings,
and parsing those in the openapi runner.

### Description
Parse the required values in the openapi runner and updated the sample
to use a string of a dict.

<!-- 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: Abby Harrison <[email protected]>
2023-09-01 00:44:29 +00:00
Karol ŻakandAbby Harrison 90ca3d93ee Python: Error fix for HuggingFaceTextEmbedding when trying to run on GPU (#2629)
### Motivation and Context

I run into error while trying to initialize `HuggingFaceTextEmbedding`
with `device=0`.

```
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
    exec(code, module.__dict__)
  File "/app/app/app.py", line 329, in <module>
    asyncio.run(main())
  File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/app/app/app.py", line 220, in main
    kernel = init_kernel()
  File "/usr/local/lib/python3.9/site-packages/streamlit/runtime/caching/cache_utils.py", line 211, in wrapper
    return cached_func(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/streamlit/runtime/caching/cache_utils.py", line 240, in __call__
    return self._get_or_create_cached_value(args, kwargs)
  File "/usr/local/lib/python3.9/site-packages/streamlit/runtime/caching/cache_utils.py", line 266, in _get_or_create_cached_value
    return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
  File "/usr/local/lib/python3.9/site-packages/streamlit/runtime/caching/cache_utils.py", line 320, in _handle_cache_miss
    computed_value = self._info.func(*func_args, **func_kwargs)
  File "/app/app/app.py", line 148, in init_kernel
    sk_hf.HuggingFaceTextEmbedding("sentence-transformers/all-MiniLM-L6-v2", device=0),
  File "/usr/local/lib/python3.9/site-packages/semantic_kernel/connectors/ai/hugging_face/services/hf_text_embedding.py", line 49, in __init__
    "cuda:" + device if device >= 0 and torch.cuda.is_available() else "cpu"
TypeError: can only concatenate str (not "int") to str
```

<!-- 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


I replace `"cuda:" + device` with `"cuda:" + str(device)`

<!-- 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: Abby Harrison <[email protected]>
2023-08-31 23:49:49 +00:00
Mark McFaddenandLee Miller 954e7c2f93 Python: Update dev setup readme (#2664)
### 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
I made markdown updates to the DEV_SETUP.md file, updating the headings
and setting the language for the code fences.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] 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: Lee Miller <[email protected]>
2023-08-31 23:06:48 +00:00
dependabot[bot]andAbby Harrison 68451fa5ec Python: Bump transformers from 4.32.0 to 4.32.1 in /python (#2616)
Bumps [transformers](https://github.com/huggingface/transformers) from
4.32.0 to 4.32.1.
<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.32.1</h2>
<p>Patch release including several patches from v4.31.0, listed
below:</p>
<ul>
<li>Put IDEFICS in the right section of the doc (<a
href="https://redirect.github.com/huggingface/transformers/issues/25650">#25650</a>)</li>
<li>removing unnecesssary extra parameter (<a
href="https://redirect.github.com/huggingface/transformers/issues/25643">#25643</a>)</li>
<li>[SPM] Patch spm Llama and T5 (<a
href="https://redirect.github.com/huggingface/transformers/issues/25656">#25656</a>)</li>
<li>Fix bloom add prefix space (<a
href="https://redirect.github.com/huggingface/transformers/issues/25652">#25652</a>)</li>
<li>Generate: add missing logits processors docs (<a
href="https://redirect.github.com/huggingface/transformers/issues/21440">#21440</a>)</li>
<li>[idefics] small fixes (<a
href="https://redirect.github.com/huggingface/transformers/issues/25764">#25764</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/huggingface/transformers/commit/ccb92be23def445f2afdea94c31286f84b89eb5b"><code>ccb92be</code></a>
Release: v4.32.1</li>
<li><a
href="https://github.com/huggingface/transformers/commit/657eb26c49d0e747a39e1b9d745e206a74815950"><code>657eb26</code></a>
Skip broken tests</li>
<li><a
href="https://github.com/huggingface/transformers/commit/13aef138ade8068ad8cd9e02fccf0cfd5db2d1d3"><code>13aef13</code></a>
[idefics] small fixes (<a
href="https://redirect.github.com/huggingface/transformers/issues/25764">#25764</a>)</li>
<li><a
href="https://github.com/huggingface/transformers/commit/6836e9dd438943c08cf101f134031a92c6f4500d"><code>6836e9d</code></a>
Generate: add missing logits processors docs (<a
href="https://redirect.github.com/huggingface/transformers/issues/25653">#25653</a>)</li>
<li><a
href="https://github.com/huggingface/transformers/commit/e82040e12be885e75e10eefe44f2376272db9257"><code>e82040e</code></a>
Fix bloom add prefix space (<a
href="https://redirect.github.com/huggingface/transformers/issues/25652">#25652</a>)</li>
<li><a
href="https://github.com/huggingface/transformers/commit/9d42e402ef9975260afbf59294c28d4c4f5ef536"><code>9d42e40</code></a>
[<code>SPM</code>] Patch <code>spm</code> Llama and T5 (<a
href="https://redirect.github.com/huggingface/transformers/issues/25656">#25656</a>)</li>
<li><a
href="https://github.com/huggingface/transformers/commit/27f91578f1cb6a8f15a321332e78377df436b3d6"><code>27f9157</code></a>
removing unnecesssary extra parameter (<a
href="https://redirect.github.com/huggingface/transformers/issues/25643">#25643</a>)</li>
<li><a
href="https://github.com/huggingface/transformers/commit/6a029a8b9e0f4763e0f4686cfdac32547e5b4bdf"><code>6a029a8</code></a>
Put IDEFICS in the right section of the doc (<a
href="https://redirect.github.com/huggingface/transformers/issues/25650">#25650</a>)</li>
<li>See full diff in <a
href="https://github.com/huggingface/transformers/compare/v4.32.0...v4.32.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=transformers&package-manager=pip&previous-version=4.32.0&new-version=4.32.1)](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: Abby Harrison <[email protected]>
2023-08-31 22:12:56 +00:00
Sneha bdc7258938 Python: fix incorrect token_selection_biases assignments (#2644)
### 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.
-->

In #2565 , I addressed a problem where `token_selection_biases` was not
included in the `PromptTemplateConfig`. However, I mistakenly wrote
`config.token_selection_biases` in instances where it should be
`config.completion.token_selection_biases` to assign to the actual
`CompletionConfig` structure.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

Changed these faulty lines to be
`config.completion.token_selection_biases = token_selection_biases`

### 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 😄
2023-08-31 21:37:52 +00:00
73afea986a Python: added settings function to load direct into constructor (#2069)
### 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 that another commonly edited environment setting for api_version
was missing from the settings util. And want to pass the env to the
constructor.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Added api_version to the settings util so that that can be controlled
through .env as well.
Added convenience function that outputs a dict that can be passed
directly into Completion constructors.
Updated sample to use that.

### 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#dev-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Lee Miller <[email protected]>
2023-08-31 20:59:45 +00:00
edf35de85d Python: Redis memory connector (#2132)
### 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. .NET supports Redis memory while Python does not
2. Match up Python features w/ .NET
3. Users can utilize a Redis backend for memories
4. Closes #1981

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

Implemented a memory connector for Redis and made unit tests for it.
Also added .env configuration for a connection string.

### 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#dev-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: Dmytro Struk <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
2023-08-31 20:38:16 +00:00
8d5055abdd Python: Update sk version in notebook samples (#2511)
### Description

<!-- Update semantic kernel version used in dotnet and python notebook
respectively! -->

---------

Co-authored-by: newton.mallick <[email protected]>
Co-authored-by: Mollie Munoz <[email protected]>
Co-authored-by: Lee Miller <[email protected]>
2023-08-31 18:34:33 +00:00
Lee MillerandDmytro Struk e298e2b75c Python: Add setup for contributing-python and tests for Semantic-Kernel-Python (#2536)
Add setup tasks for contributing-python and tests for
Semantic-Kernel-Python. The setup tasks install poetry and python
packages. The tests include unit tests, integration tests, and all tests
for Semantic-Kernel-Python.

### 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: Dmytro Struk <[email protected]>
2023-08-31 16:30:56 +00:00
Abby Harrison d20e4e15af Python: Update pyproject.toml (#2604)
Prep project file in preparation for the next release cycle

### 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 😄
2023-08-29 16:03:35 +00:00
4b2b93d8b0 Python: Update .env with weaviate (#2148)
Included weaviate env variables

---------

Co-authored-by: Dmytro Struk <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Lee Miller <[email protected]>
2023-08-25 23:06:36 +00:00
Sneha a311422a52 Python: Include token_selection_biases in PromptTemplateConfig (#2565)
### 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.
-->

`token_selection_biases` was missing from constructors in
`PromptTemplateConfig` and `CompleteRequestSettings`

Closes #2564 

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

Added `token_selection_biases` into the config template and defaults to
an empty dictionary

### 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 😄
2023-08-24 21:20:53 +00:00
Karol ŻakandAbby Harrison 601c9de124 Python: Add HF model and pipeline kwargs to allow model loading customization (#2547)
### 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 was trying to use this library to load and use [HF Falcon
model](https://huggingface.co/tiiuae/falcon-7b-instruct). Unfortunately
in order to make it work I needed to pass in some additional arguments
such as `torch_dtype`, `cache_dir` or `tokenizer`. It was not possible
with current implementation so I decided to add `model_kwargs` and
`pipeline_kwargs` to the `HuggingFaceTextCompletion` class init function
so now, with the changes I introduced I can successfully load any
`falcon` models by using this code:
```python
import semantic_kernel as sk
import semantic_kernel.connectors.ai.hugging_face as sk_hf
import torch
from transformers import AutoTokenizer


cache_dir = "/mnt/tmp"
model_name = "tiiuae/falcon-7b-instruct"

tokenizer = AutoTokenizer.from_pretrained(
    pretrained_model_name_or_path=model_name,
    cache_dir=cache_dir,
    trust_remote_code=True)

hf_model = sk_hf.HuggingFaceTextCompletion(
    model_name,
    task="text-generation",
    model_kwargs={
        "cache_dir": cache_dir,
        "torch_dtype": torch.bfloat16
    },
    pipeline_kwargs={
        "tokenizer": tokenizer,
        "trust_remote_code": True,
        "device": 0,
    }
)
```

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

The changes I introduced add `model_kwargs` and `pipeline_kwargs` to
`HuggingFaceTextCompletion` class so that these arguments are then
passed to the underlying `transformers.pipeline()` function and thus
allow more customization options.

### 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: Abby Harrison <[email protected]>
2023-08-24 18:24:12 +00:00
Abby HarrisonandLee Miller 052fb2ea96 Python: Integration tests 'needs' path filter job (#2557)
### Motivation and Context

PRs #2533 and #2555 updated the integration tests to trigger off of
python changes only, but did not actually have the resulting jobs
require the path filtering. This means that the tests never run.

### Description
Add path-filter job as a requirement for subsequent jobs.

### 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: Lee Miller <[email protected]>
2023-08-24 16:41:15 +00:00
f251e654ec Python: Enable serialization for sk/orchestration (#2369)
SKFunction has been excluded for now.

Handles issues arising due to many circular imports Update
DelegateInference to handle some cases where annotation is given as a
string to avoid circular imports like in FileIOSkill.

### 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: -->

- [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: Abby Harrison <[email protected]>
Co-authored-by: Mark Karle <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Lee Miller <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
2023-08-24 16:05:39 +00:00
Devis Lucato 13930691e7 Update pyproject.toml 2023-08-23 17:01:11 -07:00
e78242c887 Python : Adding Sample for Azure Cognitive Search Memory (#2510)
### Motivation and Context

This PR resolves
https://github.com/microsoft/semantic-kernel/issues/2493

### Description
The ACS implementation is different from VoltalileMemoryStore and we
don't have any samples for Azure Cognitive Search Memory Store. I want
to add Python Sample for using AzureCognitiveSearchMemoryStore with
OpenAI embeddings.

### 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: Abby Harrison <[email protected]>
Co-authored-by: Lee Miller <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
2023-08-23 23:53:20 +00:00
4e72b9d6ca Python: add restore method to chat_prompt_template (#2495)
### 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.
-->
In order to add ways to save and restore a running conversation this
adds a restore method and a property to the ChatPromptTemplate class.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
1. Add messages property which provides a view to the role,
message.template tuple
2. Add restore classmethod that takes the same input as a regular init,
but adds a list of tuples, it then loops through that list and adds each
message.

### 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: Abby Harrison <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
2023-08-23 23:52:56 +00:00
Julio Carlos Menendez b228346936 Python: Add missing parameter logger on inheriting classes and makes it optional (#2537)
### Motivation and Context
Makes the `logger` parameter optional in
`TextCompletionClientBase.complete_async`,
`TextCompletionClientBase.complete_stream_async`,
`ChatCompletionClientBase.complete_chat_async`, and
`ChatCompletionClientBase.complete_chat_stream_async` to match the
current usage across the project where it's not passed.
It also adds that `logger` optional parameter to the inheriting classes
where needed to match the base class method signatures.

Resolves #2509

### 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 😄
2023-08-23 23:48:12 +00:00
3881a3137f Python: Adding USearch memory connector (#2358)
### Motivation and Context

The integration of [USearch](https://github.com/unum-cloud/usearch) as a
memory connector to Semantic Kernel (SK).

### Description
     
The USearch `Index` does not natively have the ability to store
different collections, and it only stores embeddings without other
attributes like `MemoryRecord`.

The `USearchMemoryStore` class encapsulates these capabilities. It uses
the USearch `Index` to store a collection of embeddings under unique
IDs, with original collection names mapped to those IDs. Other
`MemoryRecord ` attributes are stored in a `pyarrow.Table`, which is
mapped to each collection.

It's important to note the current behavior when a user removes a record
or upserts a new one with an existing ID: the old row is not removed
from the `pyarrow.Table`. This is done for performance reasons but could
lead to the table growing in size.

By default, `USearchMemoryStore` operates as an in-memory store. To
enable persistence, you must set the persist mode with calling
appropriate `__init__ `, supplying a path to the directory for the
persist files. For each collection, two files will be created:
`{collection_name}.usearch` and `{collection_name}.parquet`. Changes
will only be dumped to the disk when `close_async` is called. Due to the
interface provided by the base class `MemoryStoreBase`, this happens
implicitly when using a context manager, or it may be called explicitly.

Since collection names are used to store files on disk, all names are
converted to lowercase.

To ensure efficient use of memory, you should call `close_async`.
---------

Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
2023-08-23 16:18:36 -07:00
4bc5ff716d Python: provide methods to register single native function to the kernel (#2390)
### 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.
-->
solve #2321 

### 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: Abby Harrison <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Lee Miller <[email protected]>
2023-08-23 22:59:08 +00:00
Aditya GudimellaandAbby Harrison 9a1609cbac Python: Added Snoop as a development dependency (#2457)
### Motivation and Context

Add snoop as a dev dependency for easier debugging of tests.

<!-- 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: -->

- [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: Abby Harrison <[email protected]>
2023-08-23 21:12:04 +00:00
05afd29ef6 Python: add stepwise planner (#2223)
### 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.
-->
implement stepwise planner #2221

### 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: Abby Harrison <[email protected]>
Co-authored-by: Lee Miller <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
2023-08-23 19:12:52 +00:00
0a477b198c Python: Update examples and notebooks to stop using text-davinci-003 (#2359)
### Motivation and Context

text-davinci-003 is being retired by Azure OpenAI and is no longer
supported for new deployments

Resolves - https://github.com/microsoft/semantic-kernel/issues/2309

<!-- 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

Update examples and notebooks to use gpt-35-turbo / gpt-3.5-turbo
instead

<!-- 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 😄

Signed-off-by: karthikmurali60 <[email protected]>
Co-authored-by: Lee Miller <[email protected]>
Co-authored-by: Gil LaHaye <[email protected]>
2023-08-23 17:24:56 +00:00
Lee Miller 9a5f2d6a5a Python: Update fake skill and planner test (#2535)
Fix failing integration tests introduced in #2474 (May be filing follow
up issue on that)

- Update WriterSkillFake to include a context parameter for the end
marker
- Update test_sequential_planner to use the new end marker parameter in
WriterSkillFake

### 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 😄
2023-08-23 16:08:08 +00:00
98d2d9fa2e Python: ACS should use Hnsw for vector indexing (#2534)
### Motivation and Context

This PR builds on https://github.com/microsoft/semantic-kernel/pull/2435
- the previous PR updates azure-search to the latest package , where it
is recommended to use HnswVectorSearchAlgorithmConfiguration. The
previous implementation appears to be in a semi-deprecated state.

This new flow is the publicly recommended use for ACS according to
https://github.com/Azure/cognitive-search-vector-pr/tree/main/demo-python/code.

### Description
- update `azure-search-documents` dependency from `11.4.0b6 -> 11.4.0b8`
- index configuration changed from `VectorSearchAlgorithmConfiguration
-> HnswVectorSearchAlgorithmConfiguration`
- update `search_client.search()` call in `get_nearest_matches()` to be
consistent with the new index api

### 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: Kinfey <[email protected]>
Co-authored-by: Lee Miller <[email protected]>
Co-authored-by: Kinfey <[email protected]>
2023-08-22 23:56:49 +00:00