mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 02:19:06 +00:00
### 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. --> We noticed that the openai package dependency spec was off and did not update that when present to the newest version, fixed now. Also we mistakenly had a default value for parallel_tool_calls in our prompt executions settings, as with other settings we do not maintain a default value if the API has a default and in this case having that parameter when calling a reasoning model threw an error, fixed 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 😄
226 lines
5.4 KiB
TOML
226 lines
5.4 KiB
TOML
[project]
|
|
name = "semantic-kernel"
|
|
description = "Semantic Kernel Python SDK"
|
|
authors = [{ name = "Microsoft", email = "[email protected]"}]
|
|
readme = "pip/README.md"
|
|
# Version read from __version__ field in __init__.py by Flit
|
|
dynamic = ["version"]
|
|
requires-python = ">=3.10"
|
|
license = {file = "LICENSE"}
|
|
urls.homepage = "https://learn.microsoft.com/en-us/semantic-kernel/overview/"
|
|
urls.source = "https://github.com/microsoft/semantic-kernel/tree/main/python"
|
|
urls.release_notes = "https://github.com/microsoft/semantic-kernel/releases?q=tag%3Apython-1&expanded=true"
|
|
urls.issues = "https://github.com/microsoft/semantic-kernel/issues"
|
|
classifiers = [
|
|
"License :: OSI Approved :: MIT License",
|
|
"Development Status :: 5 - Production/Stable",
|
|
"Intended Audience :: Developers",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Framework :: Pydantic :: 2",
|
|
"Typing :: Typed",
|
|
]
|
|
dependencies = [
|
|
"aiohttp ~= 3.8",
|
|
"cloudevents ~=1.0",
|
|
"pydantic >=2.0,<2.11,!=2.10.0,!=2.10.1,!=2.10.2,!=2.10.3",
|
|
"pydantic-settings ~= 2.0",
|
|
"defusedxml ~= 0.7",
|
|
# azure identity
|
|
"azure-identity ~= 1.13",
|
|
# embeddings
|
|
"numpy >= 1.25.0; python_version < '3.12'",
|
|
"numpy >= 1.26.0; python_version >= '3.12'",
|
|
# openai connector
|
|
"openai ~= 1.61",
|
|
# openapi and swagger
|
|
"openapi_core >= 0.18,<0.20",
|
|
# OpenTelemetry
|
|
"opentelemetry-api ~= 1.24",
|
|
"opentelemetry-sdk ~= 1.24",
|
|
"prance ~= 23.6.21.0",
|
|
# templating
|
|
"pybars4 ~= 0.9",
|
|
"jinja2 ~= 3.1",
|
|
"nest-asyncio ~= 1.6",
|
|
]
|
|
|
|
### Optional dependencies
|
|
[project.optional-dependencies]
|
|
azure = [
|
|
"azure-ai-inference >= 1.0.0b6",
|
|
"azure-ai-projects >= 1.0.0b5",
|
|
"azure-core-tracing-opentelemetry >= 1.0.0b11",
|
|
"azure-search-documents >= 11.6.0b4",
|
|
"azure-identity ~= 1.13",
|
|
"azure-cosmos ~= 4.7"
|
|
]
|
|
chroma = [
|
|
"chromadb >= 0.5,< 0.7"
|
|
]
|
|
google = [
|
|
"google-cloud-aiplatform == 1.79.0",
|
|
"google-generativeai == 0.7"
|
|
]
|
|
hugging_face = [
|
|
"transformers[torch] ~= 4.28",
|
|
"sentence-transformers >= 2.2,< 4.0",
|
|
"torch == 2.6.0"
|
|
]
|
|
mongo = [
|
|
"pymongo >= 4.8.0, < 4.12",
|
|
"motor >= 3.3.2,< 3.7.0"
|
|
]
|
|
notebooks = [
|
|
"ipykernel ~= 6.29"
|
|
]
|
|
milvus = [
|
|
"pymilvus >= 2.3,< 2.6",
|
|
"milvus >= 2.3,<2.3.8; platform_system != 'Windows'"
|
|
]
|
|
mistralai = [
|
|
"mistralai >= 1.2,< 2.0"
|
|
]
|
|
ollama = [
|
|
"ollama ~= 0.4"
|
|
]
|
|
onnx = [
|
|
"onnxruntime-genai ~= 0.5"
|
|
]
|
|
anthropic = [
|
|
"anthropic ~= 0.32"
|
|
]
|
|
pinecone = [
|
|
"pinecone-client ~= 5.0"
|
|
]
|
|
postgres = [
|
|
"psycopg[binary,pool] ~= 3.2"
|
|
]
|
|
qdrant = [
|
|
"qdrant-client ~= 1.9"
|
|
]
|
|
redis = [
|
|
"redis[hiredis] ~= 5.0",
|
|
"types-redis ~= 4.6.0.20240425",
|
|
"redisvl >= 0.3.6",
|
|
]
|
|
usearch = [
|
|
"usearch ~= 2.9",
|
|
"pyarrow >= 12.0,< 20.0"
|
|
]
|
|
weaviate = [
|
|
"weaviate-client>=4.7,<5.0",
|
|
]
|
|
pandas = [
|
|
"pandas ~= 2.2"
|
|
]
|
|
aws = [
|
|
"boto3~=1.36.4",
|
|
]
|
|
dapr = [
|
|
"dapr>=1.14.0",
|
|
"dapr-ext-fastapi>=1.14.0",
|
|
"flask-dapr>=1.14.0"
|
|
]
|
|
|
|
[tool.uv]
|
|
prerelease = "if-necessary-or-explicit"
|
|
dev-dependencies = [
|
|
"pre-commit ~= 3.7",
|
|
"ipykernel ~= 6.29",
|
|
"nbconvert ~= 7.16",
|
|
"pytest ~= 8.2",
|
|
"pytest-xdist[psutil] ~= 3.6",
|
|
"pytest-cov >= 5.0",
|
|
"pytest-asyncio ~= 0.24",
|
|
"pytest-timeout>=2.3.1",
|
|
"snoop ~= 0.4",
|
|
"mypy >= 1.10",
|
|
"types-PyYAML ~= 6.0.12.20240311",
|
|
"ruff ~= 0.7",
|
|
]
|
|
environments = [
|
|
"sys_platform == 'darwin'",
|
|
"sys_platform == 'linux'",
|
|
"sys_platform == 'win32'"
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = 'tests'
|
|
addopts = "-ra -q -r fEX"
|
|
asyncio_mode = "auto"
|
|
asyncio_default_fixture_loop_scope = "function"
|
|
filterwarnings = [
|
|
'ignore:.*FunctionChoiceBehavior.*:DeprecationWarning'
|
|
]
|
|
timeout = 120
|
|
markers = [
|
|
"ollama: mark a test as requiring the Ollama service (use \"not ollama\" to skip those tests)",
|
|
"onnx: mark a test as requiring the Onnx service (use \"not onnx\" to skip those tests)"
|
|
]
|
|
|
|
[tool.ruff]
|
|
line-length = 120
|
|
target-version = "py310"
|
|
include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
|
|
preview = true
|
|
|
|
[tool.ruff.lint]
|
|
fixable = ["ALL"]
|
|
unfixable = []
|
|
select = [
|
|
"D", #pydocstyle checks
|
|
"E", #error checks
|
|
"F", #pyflakes checks
|
|
"I", #isort
|
|
"CPY", #copyright
|
|
"ISC", #implicit string concat
|
|
"INP", #implicit namespace package
|
|
"RSE", #raise exception parantheses check
|
|
"RET", #flake8-return check
|
|
"SIM", #flake8-simplify check
|
|
"TD", #todos
|
|
"FIX", #fixme checks
|
|
"ERA", #remove connected out code
|
|
"RUF" #RUF specific rules
|
|
]
|
|
ignore = [
|
|
"D100", #allow missing docstring in public module
|
|
"D104", #allow missing docstring in public package
|
|
"TD003", #allow missing link to todo issue
|
|
"FIX002" #allow todo
|
|
]
|
|
|
|
[tool.ruff.format]
|
|
docstring-code-format = true
|
|
|
|
[tool.ruff.lint.pydocstyle]
|
|
convention = "google"
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
# Ignore all directories named `tests` and `samples`.
|
|
"tests/**" = ["D", "INP", "TD", "ERA001", "RUF"]
|
|
"samples/**" = ["D", "INP", "ERA001", "RUF"]
|
|
# Ignore all files that end in `_test.py`.
|
|
"*_test.py" = ["D"]
|
|
"*.ipynb" = ["CPY", "E501"]
|
|
|
|
[tool.ruff.lint.flake8-copyright]
|
|
notice-rgx = "^# Copyright \\(c\\) Microsoft\\. All rights reserved\\."
|
|
min-file-size = 1
|
|
|
|
[tool.bandit]
|
|
targets = ["semantic_kernel"]
|
|
exclude_dirs = ["tests"]
|
|
|
|
[tool.flit.module]
|
|
name = "semantic_kernel"
|
|
|
|
[build-system]
|
|
requires = ["flit-core >= 3.9,<4.0"]
|
|
build-backend = "flit_core.buildapi"
|
|
|
|
|