Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: .Net Ollama (Merge main) #7231

Merged
merged 52 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
18cab64
Python: Bump weaviate-client from 4.6.4 to 4.6.5 in /python (#7037)
dependabot[bot] Jul 2, 2024
a4f5529
Python: Bump qdrant-client from 1.9.2 to 1.10.0 in /python (#7036)
dependabot[bot] Jul 2, 2024
13de7c4
.Net: Bump Azure.AI.OpenAI.Assistants from 1.0.0-beta.3 to 1.0.0-beta…
dependabot[bot] Jul 2, 2024
2870323
.Net: Bump Azure.Monitor.OpenTelemetry.Exporter from 1.2.0 to 1.3.0 i…
dependabot[bot] Jul 2, 2024
cd582d4
.Net: Bump DuckDB.NET.Data.Full from 1.0.0 to 1.0.1 in /dotnet (#7042)
dependabot[bot] Jul 2, 2024
e375b6f
.Net: Bump Microsoft.Extensions.Http.Resilience from 8.2.0 to 8.6.0 i…
dependabot[bot] Jul 2, 2024
d16bd66
.Net: update Kernel.cs (#6999)
eltociear Jul 2, 2024
b85e7ae
.Net Agents - Support streaming for ChatCompletionAgent (#6956)
crickman Jul 2, 2024
b071168
.Net: Fix milvus search metric type bug. (#7063)
shuaihuadu Jul 3, 2024
1b4d348
.Net: Gemini added support of system messages and removed messages or…
Krzysztof318 Jul 3, 2024
e77ffdf
.Net: Version 1.15.1 (#7089)
dmytrostruk Jul 3, 2024
f02321d
.Net: Sample showing model thought process for each function call (#6…
markwallace-microsoft Jul 4, 2024
007e3da
Python: Update sessions python plugin to work with the correct endpoi…
moonbox3 Jul 4, 2024
ca7a58e
Python: #6499 Mistral AI Chat Completion (#7049)
nmoeller Jul 4, 2024
c8fa30b
.Net: Allow custom serialization options to be passed to TextMemoryPl…
westey-m Jul 4, 2024
a0a753a
ADR Bug - Fixed typo in ADR (#7113)
crickman Jul 5, 2024
5779b7d
Python: Verify local models in Ollama and LM Studio are compatible wi…
TaoChenOSU Jul 5, 2024
2a3ba0c
Python: slight mypy ini update (#7139)
eavanvalkenburg Jul 8, 2024
23f2dce
.Net: Filters graduation (#7004)
dmytrostruk Jul 8, 2024
13e3a22
.Net: Include request data when operation is cancelled (#7119)
markwallace-microsoft Jul 8, 2024
32d3f5d
.Net: Fix hugging face embedding (#6673)
N-E-W-T-O-N Jul 8, 2024
44f5db1
Python: Turn on mypy for OpenAPI plugins. Increase code coverage. (#7…
moonbox3 Jul 8, 2024
543c2fd
.Net: Fixed typos in feature graduation GitHub Issue template (#7157)
dmytrostruk Jul 8, 2024
44d47ac
Python: Enable mypy for connector utils and search connectors. Improv…
moonbox3 Jul 9, 2024
4e99b76
Python: Turn on mypy for function choice behavior. Improve test cover…
moonbox3 Jul 9, 2024
0ad7f54
Python: Azure AI Inference Function Calling (#7035)
TaoChenOSU Jul 9, 2024
f62b2cf
Python: Bump Python project version to 1.2.0 for a release. (#7177)
moonbox3 Jul 9, 2024
469092f
Python: Enable mypy for the HuggingFace connectors. Increase unit tes…
moonbox3 Jul 9, 2024
23ef6bd
.Net: Bump Microsoft.ML.OnnxRuntime from 1.18.0 to 1.18.1 in /dotnet …
dependabot[bot] Jul 9, 2024
6782cc8
Python: Bump zipp from 3.18.2 to 3.19.1 in /python (#7179)
dependabot[bot] Jul 10, 2024
439a8be
Python: Bump motor from 3.4.0 to 3.5.0 in /python (#7160)
dependabot[bot] Jul 10, 2024
5e333d3
Python: Bump ruff to 0.5.1 (#7180)
moonbox3 Jul 10, 2024
c2d4da8
Python: Bump pydantic-settings from 2.3.3 to 2.3.4 in /python (#7159)
dependabot[bot] Jul 10, 2024
ed46332
Python: Bump mistralai from 0.4.1 to 0.4.2 in /python (#7161)
dependabot[bot] Jul 10, 2024
1fb0d95
Python: Bump certifi from 2024.2.2 to 2024.7.4 in /python (#7120)
dependabot[bot] Jul 10, 2024
6258138
.Net: Upgrade the System.Text.Json package to the patched version 8.0…
SergeyMenshykh Jul 10, 2024
90e2237
Python: Small docstring fix (#7187)
qowlsdn8007 Jul 10, 2024
ea92767
Python: mypy and tests for OpenAI (#7144)
eavanvalkenburg Jul 11, 2024
bdf30a6
Python: allow more options for FunctionCallContent constructor (#7105)
eavanvalkenburg Jul 11, 2024
8a23c26
Python: add experimental unit tests for python 3.13 (#7204)
eavanvalkenburg Jul 11, 2024
434a353
.Net Agent - Cosmetic Sample Updates (#7199)
crickman Jul 11, 2024
240280a
Python: Introduce the single, non-group chat completion agent (#7116)
moonbox3 Jul 11, 2024
904d1f5
Python: Increase unit test coverage (#7211)
moonbox3 Jul 11, 2024
6a0077c
Python: added singular get methods (#7202)
eavanvalkenburg Jul 11, 2024
6944914
Python : CQ MyPy Fix for MistralAI Connector (#7182)
nmoeller Jul 11, 2024
6b59077
.Net Agents - Add dynamic logging methods (#7069)
crickman Jul 11, 2024
aa9de1a
Python: File id fix (#7219)
eavanvalkenburg Jul 12, 2024
cff4c7a
Python: remove continue on error on steps (#7220)
eavanvalkenburg Jul 12, 2024
e936275
Python: updated test coverage run (#7224)
eavanvalkenburg Jul 12, 2024
095472d
Python: fix runs on (#7226)
eavanvalkenburg Jul 12, 2024
69d8354
Python: Fix test coverage (#7227)
eavanvalkenburg Jul 12, 2024
ac364e6
Python: filepath fix (#7228)
eavanvalkenburg Jul 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_graduation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ about: Plan the graduation of an experimental feature

Checklist to be completed when graduating an experimental feature

- [ ] Notify PM's and EM's that feature is read for graduation
- [ ] Notify PM's and EM's that feature is ready for graduation
- [ ] Contact PM for list of sample use cases
- [ ] Verify there are sample implementations​ for each of the use cases
- [ ] Verify telemetry and logging are complete
- [ ] ​Verify API docs are complete and arrange to have them published
- [ ] Make appropriate updates to Learn docs​
- [ ] Make appropriate updates to Concept samples
- [ ] Male appropriate updates to Blog posts
- [ ] Make appropriate updates to Blog posts
- [ ] Verify there are no serious open Issues​​
- [ ] Update table in EXPERIMENTS.md
- [ ] Remove SKEXP​ flag from the experimental code
4 changes: 4 additions & 0 deletions .github/workflows/python-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ jobs:
AZURE_KEY_VAULT_CLIENT_ID: ${{secrets.AZURE_KEY_VAULT_CLIENT_ID}}
AZURE_KEY_VAULT_CLIENT_SECRET: ${{secrets.AZURE_KEY_VAULT_CLIENT_SECRET}}
ACA_POOL_MANAGEMENT_ENDPOINT: ${{secrets.ACA_POOL_MANAGEMENT_ENDPOINT}}
MISTRALAI_API_KEY: ${{secrets.MISTRALAI_API_KEY}}
MISTRALAI_CHAT_MODEL_ID: ${{ vars.MISTRALAI_CHAT_MODEL_ID }}
run: |
if ${{ matrix.os == 'ubuntu-latest' }}; then
docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest
Expand Down Expand Up @@ -163,6 +165,8 @@ jobs:
AZURE_KEY_VAULT_CLIENT_ID: ${{secrets.AZURE_KEY_VAULT_CLIENT_ID}}
AZURE_KEY_VAULT_CLIENT_SECRET: ${{secrets.AZURE_KEY_VAULT_CLIENT_SECRET}}
ACA_POOL_MANAGEMENT_ENDPOINT: ${{secrets.ACA_POOL_MANAGEMENT_ENDPOINT}}
MISTRALAI_API_KEY: ${{secrets.MISTRALAI_API_KEY}}
MISTRALAI_CHAT_MODEL_ID: ${{ vars.MISTRALAI_CHAT_MODEL_ID }}
run: |
if ${{ matrix.os == 'ubuntu-latest' }}; then
docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest
Expand Down
55 changes: 0 additions & 55 deletions .github/workflows/python-samples-tests.yml

This file was deleted.

38 changes: 18 additions & 20 deletions .github/workflows/python-test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,59 +10,57 @@ on:
types:
- in_progress

env:
PYTHON_VERSION: "3.10"
RUN_OS: ubuntu-latest

jobs:
python-tests-coverage:
name: Create Test Coverage Messages
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
continue-on-error: true
permissions:
pull-requests: write
contents: read
actions: read
strategy:
matrix:
python-version: ["3.10"]
os: [ubuntu-latest]
steps:
- name: Wait for unit tests to succeed
continue-on-error: true
uses: lewagon/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha }}
check-name: 'Python Unit Tests (${{ matrix.python-version}}, ${{ matrix.os }})'
check-name: 'Python Unit Tests (${{ env.PYTHON_VERSION }}, ${{ env.RUN_OS }}, false)'
repo-token: ${{ secrets.GH_ACTIONS_PR_WRITE }}
wait-interval: 10
wait-interval: 90
allowed-conclusions: success
- uses: actions/checkout@v4
- name: Setup filename variables
run: echo "FILE_ID=${{ github.event.number }}-${{ env.RUN_OS }}-${{ env.PYTHON_VERSION }}" >> $GITHUB_ENV
- name: Download coverage
continue-on-error: true
uses: dawidd6/action-download-artifact@v3
with:
name: python-coverage-${{ matrix.os }}-${{ matrix.python-version }}.txt
name: python-coverage-${{ env.FILE_ID }}.txt
github_token: ${{ secrets.GH_ACTIONS_PR_WRITE }}
workflow: python-unit-tests.yml
search_artifacts: true
if_no_artifact_found: warn
- name: Download pytest
continue-on-error: true
uses: dawidd6/action-download-artifact@v3
with:
name: pytest-${{ matrix.os }}-${{ matrix.python-version }}.xml
name: pytest-${{ env.FILE_ID }}.xml
github_token: ${{ secrets.GH_ACTIONS_PR_WRITE }}
workflow: python-unit-tests.yml
search_artifacts: true
if_no_artifact_found: warn
- name: Pytest coverage comment
continue-on-error: true
id: coverageComment
uses: MishaKav/pytest-coverage-comment@main
with:
github-token: ${{ secrets.GH_ACTIONS_PR_WRITE }}
pytest-coverage-path: python-coverage-${{ matrix.os }}-${{ matrix.python-version }}.txt
pytest-coverage-path: python-coverage.txt
coverage-path-prefix: "python/"
title: "Python ${{ matrix.python-version }} Test Coverage Report"
badge-title: "Py${{ matrix.python-version }} Test Coverage"
title: "Python ${{ env.PYTHON_VERSION }} Test Coverage Report"
badge-title: "Py${{ env.PYTHON_VERSION }} Test Coverage"
report-only-changed-files: true
junitxml-title: "Python ${{ matrix.python-version }} Unit Test Overview"
junitxml-path: pytest-${{ matrix.os }}-${{ matrix.python-version }}.xml
junitxml-title: "Python ${{ env.PYTHON_VERSION }} Unit Test Overview"
junitxml-path: pytest.xml
default-branch: "main"
unique-id-for-comment: python-${{ matrix.python-version }}
unique-id-for-comment: python-${{ env.PYTHON_VERSION }}
27 changes: 19 additions & 8 deletions .github/workflows/python-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,26 @@ jobs:
python-unit-tests:
name: Python Unit Tests
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
fail-fast: true
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest, macos-latest]
experimental: [false]
include:
- python-version: "3.13.0-beta.3"
os: "ubuntu-latest"
experimental: true
permissions:
contents: write
defaults:
run:
working-directory: python
steps:
- uses: actions/checkout@v4
- name: Setup filename variables
run: echo "FILE_ID=${{ github.event.number }}-${{ matrix.os }}-${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -27,20 +38,20 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install dependencies
run: cd python && poetry install --with unit-tests
run: poetry install --with unit-tests
- name: Test with pytest
run: cd python && poetry run pytest -q --junitxml=pytest-${{ matrix.os }}-${{ matrix.python-version }}.xml --cov=semantic_kernel --cov-report=term-missing:skip-covered ./tests/unit | tee python-coverage-${{ matrix.os }}-${{ matrix.python-version }}.txt
run: poetry run pytest -q --junitxml=pytest.xml --cov=semantic_kernel --cov-report=term-missing:skip-covered ./tests/unit | tee python-coverage.txt
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: python-coverage-${{ matrix.os }}-${{ matrix.python-version }}.txt
path: python/python-coverage-${{ matrix.os }}-${{ matrix.python-version }}.txt
name: python-coverage-${{ env.FILE_ID }}.txt
path: python/python-coverage.txt
overwrite: true
retention-days: 1
retention-days: 1
- name: Upload pytest.xml
uses: actions/upload-artifact@v4
with:
name: pytest-${{ matrix.os }}-${{ matrix.python-version }}.xml
path: python/pytest-${{ matrix.os }}-${{ matrix.python-version }}.xml
name: pytest-${{ env.FILE_ID }}.xml
path: python/pytest.xml
overwrite: true
retention-days: 1
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ repos:
- id: pyupgrade
args: [--py310-plus]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.5
rev: v0.5.1
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ is an SDK that integrates Large Language Models (LLMs) like
[Azure OpenAI](https://azure.microsoft.com/en-us/products/ai-services/openai-service),
and [Hugging Face](https://huggingface.co/)
with conventional programming languages like C#, Python, and Java. Semantic Kernel achieves this
by allowing you to define [plugins](https://learn.microsoft.com/en-us/semantic-kernel/ai-orchestration/plugins)
by allowing you to define [plugins](https://learn.microsoft.com/en-us/semantic-kernel/concepts/plugins)
that can be chained together
in just a [few lines of code](https://learn.microsoft.com/en-us/semantic-kernel/ai-orchestration/chaining-functions?tabs=Csharp#using-the-runasync-method-to-simplify-your-code).

Expand Down
6 changes: 3 additions & 3 deletions docs/decisions/0046-kernel-content-graduation.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Pros:
- With no deferred content we have simpler API and a single responsibility for contents.
- Can be written and read in both `Data` or `DataUri` formats.
- Can have a `Uri` reference property, which is common for specialized contexts.
- Fully serializeable.
- Fully serializable.
- Data Uri parameters support (serialization included).
- Data Uri and Base64 validation checks
- Data Uri and Data can be dynamically generated
Expand Down Expand Up @@ -197,7 +197,7 @@ Pros:
- Can be used as a `BinaryContent` type
- Can be written and read in both `Data` or `DataUri` formats.
- Can have a `Uri` dedicated for referenced location.
- Fully serializeable.
- Fully serializable.
- Data Uri parameters support (serialization included).
- Data Uri and Base64 validation checks
- Can be retrieved
Expand Down Expand Up @@ -254,7 +254,7 @@ Pros:
- Can be used as a `BinaryContent` type
- Can be written and read in both `Data` or `DataUri` formats.
- Can have a `Uri` dedicated for referenced location.
- Fully serializeable.
- Fully serializable.
- Data Uri parameters support (serialization included).
- Data Uri and Base64 validation checks
- Can be retrieved
Expand Down
12 changes: 6 additions & 6 deletions dotnet/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<ItemGroup>
<PackageVersion Include="Azure.AI.ContentSafety" Version="1.0.0" />
<PackageVersion Include="Azure.AI.OpenAI" Version="1.0.0-beta.17" />
<PackageVersion Include="Azure.AI.OpenAI.Assistants" Version="1.0.0-beta.3" />
<PackageVersion Include="Azure.AI.OpenAI.Assistants" Version="1.0.0-beta.4" />
<PackageVersion Include="Azure.Identity" Version="1.12.0" />
<PackageVersion Include="Azure.Monitor.OpenTelemetry.Exporter" Version="1.2.0" />
<PackageVersion Include="Azure.Monitor.OpenTelemetry.Exporter" Version="1.3.0" />
<PackageVersion Include="Azure.Search.Documents" Version="11.5.1" />
<PackageVersion Include="Handlebars.Net.Helpers" Version="2.4.1.5" />
<PackageVersion Include="Markdig" Version="0.37.0" />
Expand All @@ -28,13 +28,13 @@
<PackageVersion Include="Microsoft.Bcl.TimeProvider" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageVersion Include="Microsoft.Identity.Client" Version="4.61.3" />
<PackageVersion Include="Microsoft.ML.OnnxRuntime" Version="1.18.0" />
<PackageVersion Include="Microsoft.ML.OnnxRuntime" Version="1.18.1" />
<PackageVersion Include="FastBertTokenizer" Version="1.0.28" />
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="8.0.1" />
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
<PackageVersion Include="System.Memory.Data" Version="8.0.0" />
<PackageVersion Include="System.Numerics.Tensors" Version="8.0.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.2" />
<PackageVersion Include="System.Text.Json" Version="8.0.4" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
<!-- Tokenizers -->
Expand All @@ -51,7 +51,7 @@
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="8.2.0" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="8.6.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
Expand All @@ -71,7 +71,7 @@
<!-- Plugins -->
<PackageVersion Include="DocumentFormat.OpenXml" Version="3.0.2" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="8.0.2" />
<PackageVersion Include="DuckDB.NET.Data.Full" Version="1.0.0" />
<PackageVersion Include="DuckDB.NET.Data.Full" Version="1.0.1" />
<PackageVersion Include="DuckDB.NET.Data" Version="1.0.1" />
<PackageVersion Include="MongoDB.Driver" Version="2.25.0" />
<PackageVersion Include="Microsoft.Graph" Version="[4.51.0, 5)" />
Expand Down
Loading
Loading