### 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? Improved parity between .Net and Python
implementations
2. What problem does it solve? Allow for waiting in Python
implementation
3. What scenario does it contribute to? Parity
4. If it fixes an open issue, please link to the issue here.
-->
### Description
Pretty simple allows for waiting X seconds in a thread
### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [x] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [x] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [x] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
### Motivation and Context
To fix a runtime error on windows for python version 3.10, 3.11 and
above
On windows, python version above 3.10.1, there will be a runtime error
caused by asyncio event loop. add adapting code for windows when python
version is above 3.10.1 to avoid the error.
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Refer link:
https://docs.python.org/3/library/asyncio-policy.html
"Note In Python versions 3.10.9, 3.11.1 and 3.12 the
[get_event_loop()](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.get_event_loop)
method of the default asyncio policy emits a
[DeprecationWarning](https://docs.python.org/3/library/exceptions.html#DeprecationWarning)
if there is no running event loop and no current loop is set. In some
future Python release this will become an error."
Note: per testing, this error also occurred on python 3.10 below 3.10.9
Co-authored-by: Mark Karle <[email protected]>
Co-authored-by: Lee Miller <[email protected]>
### Motivation and Context
Closes#1469
There are scenarios where the basic_planner prompt results in a valid
plan surrounded by additional text. This renders the plan unable to be
json deserialized. This PR addresses this scenario. Note that it does
NOT address malformed json.
### Description
- added a regex in basic_planner.execute_plan_async that grabs only json
blocks. See screenshot below of it ignoring additional, non-json text.
- Added dependency on `regex` pip package (`re` package does not support
regex recursion)
Co-authored-by: Shawn Callegari <[email protected]>
### Motivation and Context
Replacing flake8 and isort with ruff in the pre-commit hook.
Adding "I" to ruff rules so that it checks for import errors.
Co-authored-by: Abby Harrison <[email protected]>
### Motivation and Context
The addition of the field `additional metadata` to `MemoryRecord` was
not propagated to the weaviate integration tests. This PR ensures that
the fields are properly filled and aligned.
### Description
- Added an entry for `"additional info"` to the memory record test
fixtures for weaviate.
### Motivation and Context
#1212
### Description
Fixed a bug in the process of checking native function.
---------
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
### Motivation and Context
To take advantage of APIs offered by most LLMs and to be in sync with
.NET SK, this PR introduces the ability to generate multiple text
completions or chat completions from a single prompt.

### Description
- Return type hint for `complete_async` and `complete_chat_async`
changed from `str -> Union[str, List[str]]`. The use of `Union` is the
proper way to indicate multiple return types prior to Python 3.10+. 3.10
supports the use of the `|` symbol, but since the Python SK is supported
on 3.8 and 3.9, I did not adopt the newer standard.
- `complete_async`, `complete_stream_async`, `complete_chat_async`, and
`complete_chat_stream_async` now support settings field
`number_of_responses` greater than 1. Previously only a value of 1 was
supported.
- **Note: hf_text_completion does not support streaming multiple
responses due to a limitation of TextIteratorStreamer. This feature
requires the ability to parse distinct responses from
TextIteratorStreamer.**
- Fixed a bug where `complete_async` was streaming single responses as
1D arrays, content now is simply a string.
### Example Usage
#### Setup
```
kernel = sk.Kernel()
# Configure OpenAI service
api_key, org_id = sk.openai_settings_from_dot_env()
oai_text_service = OpenAITextCompletion("text-davinci-003", api_key, org_id)
oai_chat_service = OpenAIChatCompletion("gpt-3.5-turbo", api_key, org_id)
# Configure Hugging Face service
hf_text_service = HuggingFaceTextCompletion("gpt2", task="text-generation")
# Configure Prompt
prompt = "what is the purpose of a rubber duck?"
# Configure Request Settings
text_request_settings_multi = CompleteRequestSettings(
max_tokens=100,
temperature=0.7,
top_p=1,
frequency_penalty=0.5,
presence_penalty=0.8,
number_of_responses=4
)
chat_request_settings_multi = ChatRequestSettings(
max_tokens=100,
temperature=0.7,
top_p=1,
frequency_penalty=0.5,
presence_penalty=0.8,
number_of_responses=4
)
```
#### Text Completion (Standard)
```
texts = await oai_text_service.complete_async(prompt, text_request_settings_multi)
i = 0
for text in texts:
print("Option " + str(i) + ": " + text)
i += 1
```
#### Streaming Text Completion
```
multi_stream = oai_text_service.complete_stream_async(prompt, text_request_settings_multi)
texts = [''] * text_request_settings_multi.number_of_responses
async for text in multi_stream:
i = 0
os.system('cls' if os.name == 'nt' else 'clear') # clear the screen for a better experience
print("PROMPT: " + prompt)
for option in text:
texts[i] = texts[i] + option
print("{0}: {1}".format(i, texts[i]))
i += 1
```
#### Chat Completion (Standard)
```
texts = await oai_chat_service.complete_chat_async([("user",prompt)], chat_request_settings_multi)
i = 0
for text in texts:
print("Option " + str(i) + ": " + text)
i += 1
```
#### Streaming Chat Completion
```
multi_stream = oai_chat_service.complete_chat_stream_async([("user",prompt)], chat_request_settings_multi)
texts = [''] * chat_request_settings_multi.number_of_responses
async for text in multi_stream:
i = 0
os.system('cls' if os.name == 'nt' else 'clear') # clear the screen for a better experience
print("PROMPT: " + prompt)
for option in text:
texts[i] = texts[i] + option
print("{0}: {1}".format(i, texts[i]))
i += 1
```
#### HuggingFace Standard Completion
```
texts = await hf_text_service.complete_async(prompt, request_settings_multi)
i = 0
for text in texts:
print("-----------------------------------")
print("Option " + str(i) + ": " + text)
i += 1
```
### Motivation and Context
This changes our parsing of the .env file to use
[`python-dotenv`](https://pypi.org/project/python-dotenv/) which will be
more flexible.
Tested that the notebooks would still run correctly.
### Motivation and Context
Closes#1271 and addresses several TODOs in ChromaMemoryStore
### Description
- added field `additional_metadata` to `MemoryRecord` and all downstream
methods/classes (see `SemanticTextMemoryBase`, `SemanticTextMemory`,
`MemoryQueryResult`, and `ChromaMemoryStore`)
- addressed ChromaMemoryStore TODO 'what is key used for?' For chromadb,
key and id are effectively the same value, but the two fields are
differentiated for memory stores like Qdrant which require that key be a
uuid. I updated the logic so that this is more apparent. Note that this
results in no change in end-user functionality.
- Updated ChromaMemoryStore TODO 'get_async say embedding is optional
but Record constructor requires it.` MemoryRecord constructor no longer
requires an embedding. Logic is updated and a test added to show that
embedding retrieval is functionally optional.
- Add persist to Chroma on upsert or delete
- Fixes#1289
### Description
Added `self._client.persist()` in the `upsert_async` and
`delete_collection_async`.
Co-authored-by: Abby Harrison <[email protected]>
Following the tutorial notebooks:
```
async def populate_memory(kernel: sk.Kernel) -> None:
# Add some documents to the semantic memory
await kernel.memory.save_information_async(
"aboutMe", id="info1", text="My name is Andrea"
)
await kernel.memory.save_information_async(
"aboutMe", id="info2", text="I currently work as a tour guide"
)
await kernel.memory.save_information_async(
"aboutMe", id="info3", text="I've been living in Seattle since 2005"
)
await kernel.memory.save_information_async(
"aboutMe", id="info4", text="I visited France and Italy five times since 2015"
)
await kernel.memory.save_information_async(
"aboutMe", id="info5", text="My family is from New York"
)
```
and calling:
```
await kernel.memory.get_async("aboutMe", "info1")
```
Results in the error:
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[6], line 1
----> 1 await kernel.memory.get_async("aboutMe", "info1")
File [~/code/ncp/semantic-kernel/python/semantic_kernel/memory/semantic_text_memory.py:116](https://file+.vscode-resource.vscode-cdn.net/Users/dleen/code/ncp/semantic-kernel/samples/notebooks/python/~/code/ncp/semantic-kernel/python/semantic_kernel/memory/semantic_text_memory.py:116), in SemanticTextMemory.get_async(self, collection, key)
106 """Get information from the memory (calls the memory store's get method).
107
108 Arguments:
(...)
113 Optional[MemoryQueryResult] -- The MemoryQueryResult if found, None otherwise.
114 """
115 record = await self._storage.get_async(collection_name=collection, key=key)
--> 116 return MemoryQueryResult.from_memory_record(record) if record else None
TypeError: MemoryQueryResult.from_memory_record() missing 1 required positional argument: 'relevance'
```
Since this is an exact match using `get_async` and `None` if not found,
we can assign a relevance of `1.0` meaning a perfect match.
### Motivation and Context
The change enables the planner to make use of time references like "last
wednesday" or "three days ago" which currently cause issues. This
enables better use of SequentialPlanner when servicing user intent.
Issue: https://github.com/microsoft/semantic-kernel/issues/922
### Description
This adds two new functions to the core TimeSkill class in both .net and
python.
1. DaysAgo(str days) - takes an argument representing a number of days
and offsets it from the current date to return the resultant date as the
answer.
2. LastMatchingDay(str dayName) - takes the name of a day of the week
and works backwards from yesterday to give it the first matching date of
that day (e.g. "last wednesday"). Currently it only works with English
day names, and this is reflected in the prompt description.
Simple unit tests are added for each function.
Co-authored-by: Devis Lucato <[email protected]>
### Motivation and Context
This PR introduces streaming methods to TextCompletionBase and
ChatCompletionBase. With this pr, you can stream LLM output in the
following ways:
```
import semantic_kernel as sk
from semantic_kernel.connectors.ai import ChatCompletionClientBase, TextCompletionClientBase, ChatRequestSettings, CompleteRequestSettings
from semantic_kernel.connectors.ai.open_ai import AzureTextCompletion, AzureChatCompletion, OpenAITextCompletion, OpenAIChatCompletion
from semantic_kernel.connectors.ai.hugging_face import HuggingFaceTextCompletion
kernel = sk.Kernel()
# Configure Azure LLM service
deployment, api_key, endpoint = sk.azure_openai_settings_from_dot_env()
text_service = AzureTextCompletion("text-davinci-003", endpoint, api_key)
chat_service = AzureChatCompletion("gpt-35-turbo", endpoint, api_key)
# Configure OpenAI service
api_key, org_id = sk.openai_settings_from_dot_env()
oai_text_service = OpenAITextCompletion("text-davinci-003", api_key, org_id)
oai_chat_service = OpenAIChatCompletion("gpt-3.5-turbo", api_key, org_id)
# Configure Hugging Face service
hf_text_service = HuggingFaceTextCompletion("gpt2", task="text-generation")
request_settings = CompleteRequestSettings(
max_tokens=1000,
temperature=0.7,
top_p=1,
frequency_penalty=0.5,
presence_penalty=0.5
)
stream = oai_text_service.complete_stream_async("Write an essay on why AI is awesome:", request_settings)
async for text in stream:
print(text, end = "") # end = "" to avoid newlines
chat_request_settings = ChatRequestSettings(
max_tokens=1000,
temperature=0.7,
top_p=1,
frequency_penalty=0.5,
presence_penalty=0.5,
)
stream = oai_chat_service.complete_chat_stream_async([("user","Write an essay on why AI is awesome:")], chat_request_settings)
async for text in stream:
print(text, end = "") # end = "" to avoid newlines
request_settings = CompleteRequestSettings(
max_tokens=256,
temperature=0.7,
top_p=1,
frequency_penalty=0.5,
presence_penalty=0.5
)
stream = hf_text_service.complete_stream_async("Hi my name is ", request_settings)
async for text in stream:
print(text, end = "") # end = "" to avoid newlines
```
**Out of Scope**: Improving the chat history interface with come in a
future PR
### Description
- added the method complete_stream_async to TextCompletionBase
- added the method complete_chat_stream_async to ChatCompletionBase
- Updated OpenAI and Hugging Face text completion service classes to
support new streaming methods
- Added new __init__.py to make importing service classes
### Motivation and Context
In the Python `BasicPlanner` one of the examples has a 'translate'
function, but doesn't quite reference it correctly in the JSON output.
### Description
The overall approach is to make the various parts of the few-shot
example in the prompt self-consistent.
### Motivation and Context
Use of abstraction was not consistent in the python SK. This PR makes
the import and use of ABC consistent and removes unused file kernel.py.
### Description
- MemoryStoreBase derives from ABC - this properly sets its metaclass.
MemoryStoreBase itself should never be instantiated, only derived.
- RetryMechanism derives ABC, so should be named 'Base' like all other
derivatives of ABC in this repo.
- removed kernel_base.py, was made obsolete by
https://github.com/microsoft/semantic-kernel/pull/1015
### Motivation and Context
#691#1053
### Description
1. Added an argument to prevent TypeError when inferring an unknown
type.
2. Fixed a bug in the process of checking parameters when inferring the
InStringAndContext type.
### Motivation and Context
The separation of Kernel, KernelBase, and KernelExtensions is several
layers of unnecessary abstraction. This PR does not change any API or
kernel behavior - it just reduces the number of files and namespaces to
accomplish the same functionality.
### Description
- Removed the `semantic_kernel/kernel_extensions` namespace. Methods
that existed in this namespace now exist in kernel.py.
- Removed KernelBase - this abstract class implies that there are
multiple ways to instantiate SK. For Python, we expect only a single
type of Kernel to instantiated for all instances.
- Updated tests and imports to accommodate the above changes.
Add support for Chroma https://docs.trychroma.com/
> Chroma is the open-source embedding database. Chroma makes it easy to
build LLM apps by making knowledge, facts, and skills pluggable for
LLMs.
### Motivation and Context
* #403 Support for Chroma embedding database
* #426 Python: feat: add chroma memory store
* #449 Python: feat: add chroma memory store
---------
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
### Motivation and Context
Porting conversation summary skill. Integration test is added as well.
Action item and topic will be ported later.
---------
Co-authored-by: Po-Wei Huang <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
### Motivation and Context
Using both OpenAI and Azure OpenAI services would not work due to the
way they were configured. The `openai` module would be configured
globally with keys and endpoints for one type of service and then
overwritten when adding another service. Instead, we can configure the
settings when making the API calls.
Also, some integration tests are failing because of throttling by GPT4.
### Description
- Use the API settings when calling the openai API instead of
configuring gloabally
- Increased delay to 3 seconds for some integration tests to avoid rate
limit errors
- Relaxed the assertion strings for some integration tests
- Ran pre-commit linting
- Switch some tests to GPT Turbo 3.5
---------
Co-authored-by: Devis Lucato <[email protected]>
### Motivation and Context
Port MathSkill from C# to python3. This is essential for advanced skill
like plan
### Description
The PR includes two part. The first part is an implementation of
MathSkill. The implementation follows C# version.
It does several things:
1. Parse initial value
2. Get value from context
3. Sum or subtract
The unit test covers these scenarios:
1. Add/subtract value
2. Error should throw if string is not correct. Not able to parse.
Last part is the init.py and feature matrix.
Unit test pass locally.
Co-authored-by: Po-Wei Huang <[email protected]>
Co-authored-by: Mark Karle <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
* Fix lint errors
* Bump version number
* Add retry loop to integration tests
* Enable all integration tests: some tests will fail if OpenAI/Azure are
throttling.
### Motivation and Context
KernelConfig isn't needed as it's less pythonic and is not used
independently from Kernel. This moves all its methods and members into
Kernel.
### Description
- Removed KernelConfig
- Put KernelConfig's methods and variables into Kernel
- Ran unit and end-to-end tests
- Did not run notebooks because they are out of date with the current
repo.
---------
Co-authored-by: Shawn Callegari <[email protected]>
calling the memory record's embedding property throws
`RecursionError: maximum recursion depth exceeded`
return the attribute instead of the property
Signed-off-by: hsm207 <[email protected]>
### Motivation and Context
The release of Python SK from 0.2.4 -> 0.2.6 significantly increased the
size of the pip package. The dependencies causing this are not core to
the kernel, so this PR establishes a pattern for SK connector
dependencies (ex: Hugging Face, memory storage)
### Description
- Added a poetry group called hugging_face - this is the same name as
the connectors namespace in the code.
- Added dependency installs to the Hugging Face sample notebook.
- removed Hugging Face dependencies from requirements.txt.
- Added import errors for torch, transformers, and sentence-transformers
in the hugging_face connector classes.
- Added command `--with hugging_face` to integration test setup.
### 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.
-->
python: fix the issue of `No module named 'semantic_kernel.planning'`.
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Add __init__ file for the planning package.
### Motivation and Context
Many users and customers have expressed interest in having planning
capabilities in Python. This PR seeks to provide a basic version of the
planner so that people can learn and play around with the concepts and
can be comfortable with implementing their own versions.
A Jupyter notebook is included.
### Description
Most of the logic of the plan can be found under the `PROMPT` in
`basic_planner.py`.
There is a known limitation that this currently doesn't explicit parse
out arguments that are defined in the semantic function prompts, so when
creating the [AVAILABLE FUNCTIONS] string, it just uses the name of the
function and the description.
The execution of the plan also happens from start to finish. There is
currently no support for piecewise execution.
---------
Co-authored-by: Alex Chao <[email protected]>
Co-authored-by: Alex Chao <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Mark Karle <[email protected]>
### Motivation and Context
Run python integration tests on every push to main, and every 12 hours.
These integration tests will run on every push to main as well as twice
a day. At the time of this PR, we are seeing ~3 PRs to the python SK per
day. Each Integration test run will make ~32 AI requests. For each PR,
12 runs will be made: 3 each for python 3.8, 3.9, 3.10, and 3.11 for a
total of ~400 calls per push to main.
We should re-evaluate the trigger on pushes to main if PRs to the python
SK significantly increase.
### Description
- add workflow definition for integration tests
- Example run:
https://github.com/microsoft/semantic-kernel/actions/runs/4874609026/jobs/8695771345?pr=763
- For push triggers, add path checks for dotnet/** or python/**
depending on the type of workflow
- pinned requirements.txt dependencies to the versions pinned in the
pyproject.toml file to ensure parity between pip package dependencies
and local code
**Note**: Integration tests are failing on windows with python 3.8 -
already captured a task to address the problem
### Motivation and Context
New release version 0.2.6
Fix bug in 0.2.5.dev0 pip package
Update notebooks to the latest pip package (0.2.6)
### Description of Changes
- fixed a param name error in the creation of a reference memory_record
- renamed text_service -> text_completion_service (consistency with .NET)
- renamed text_embedding_service -> text_embedding_generation_service
(consistency with .NET)
- Updated notebooks accordingly
- bumped pip versions to 0.2.6.dev0
### Motivation and Context
This PR introduces the ability to run formal integration tests for
python using pytest - separated from unit tests for easier automation.
### Description
- moved `python/tests/end-to-end` directory to
`python/tests/integration`
- renamed integration tests to test_* pattern so pytest will detect them
- import `GenerationConfig` for hugging face completions - according to
logs, this is the recommended practice
### Motivation and Context
This PR significantly reduces the complexity of implementing a new
memory store. Previously, memory stores needed to implement
EmbeddingIndexBase, DataStoreBase, and MemoryStoreBase. Now, memory
stores only need to implement MemoryStoreBase. This PR also brings
MemoryStoreBase to parity with the .NET IMemoryStore interface.
### Description
- Removed `data_entry.py`, `data_store_base.py`,
`volatile_data_store.py`, and `embedding_index_base.py`
- Added `with_embedding` parameter to all get/search methods. Passing
the embedding between the application and storage is not optional and
defaults to False
- `MemoryStoreBase` (Python SK) == `IMemoryStore` (.NET SK)
- Updated `volatile_memory_store` to implement `MemoryStoreBase`
- Removed `ABC` from `MemoryStoreBase`
- Added documentation to memory files
Closes https://github.com/microsoft/semantic-kernel/issues/670
### Motivation and Context
This PR introduces native python support for Hugging Face models that
can: complete text, generate new text, summarize, and that generate
embeddings. Currently only supports downloading the models locally from
the HF model hub. Future plans include supporting the HF inference API
as well.
### Description
- Added 2 services: `hf_text_completion` and `hf_text_embedding`
- `hf_text_completion` supports the following tasks: _text-generation_,
_text2text-generation_, and _summarization_
- `hf_text_embedding` supports any model supported by the
sentence-transformers pip package
- Added dependencies: pytorch, transformers, sentence-transformers to
`requirements.txt` and `poetry.lock`
- fixed typo: `get_embedding_service_service_id` ->
`get_embedding_service_id`
- Added a number of integration tests for supported HF models
### Motivation and Context
Porting the text partitioning module to python
(Reopening of PR #427 )
### Description
- This is adding the Text partitioning module in
`semantic_kernel/semantic_functions/semantic_text_partitioner.py`
and the function_extention in
`semantic_kernel/semantic_functions/function_extension.py`
- Compared to the C# version the files were added directly into the
`semantic_functions` directory instead of the
`semantic_functions/partitioning` to not have too many nested
directories.
### Motivation and Context
ve_skill_from_directory`, I've noticed that if
there are 2 or more similar directories(see dir tree below), it doesn't
work correctly.
```
(base) joowonkim ~/Repo/sk-consultings/example-thinkpool/poc1-architecture/skills main ± tree
.
├── handler_skills
│ ├── AccountHandlerSkill
│ │ └── native_function.py
│ ├── PortfolioHandlerSkill
│ │ └── native_function.py
│ └── StockHandlerSkill
│ └── native_function.py
├── intent_skills
│ └── IntentDetectionSkill
│ └── ParseIntent
│ ├── config.json
│ └── skprompt.txt
```
Importing using absolute paths rather than sys.paths reliably worked as
intended.
### Description
remove `sys.path` related codes and change them into using absolute path
of `native_function.py`
### Motivation and Context
Users want to use ChatGPT as the service for their semantic functions.
This feature exists with the C# SK. ChatGPT is perfectly capable of
doing this. Additionally added more end-to-end tests with the intention
of being able to run them as integration tests for the Python SK.
### Description
- `OpenAIChatCompletion` now additionally inherits from
`TextCompletionClientBase`. This extends to `AzureOpenAIChatCompletion`.
- If a chat service is also a `TextCompletionClientBase`, it will be
added to both `text_services` and `chat_services`.
- Created 4 end-to-end tests that target the combination of Azure,
OpenAI, text service, and chat service. Abstracted common behavior for
these tests.
- Added asserts to these end-to-end tests. These should be run as
integration tests, but that will be handled in a separate PR.
### Motivation and Context
This PR is a consistency update between the Python and .NET Semantic
Kernels.
**This PR does not contain any feature enhancements or improvements!**
### Description
- Replace terminology 'backend' with 'service'
- Move semantic_kernel.ai (semantic_kernel/ai) to
semantic_kernel.connectors.ai (semantic_kernel/connectors/ai)
### Motivation and Context
the method Today() in TimeSkill.cs and today() in TimeSkill.py was
missing.
Today must be an alias for Date.
### Description
Add the method Today.
Co-authored-by: Abby Harrison <[email protected]>
### Motivation and Context
It is confusing to have multiple skfunction invoke_* calls. This PR
combines invoke and invoke_with_vars to enable calls with the input
pattern: with SKContext, or with SKContextVariables.
### Description
- Removed `sk_function` methods `invoke_with_vars` and
`invoke_with_vars_async`
- Added the following optional paramters to `sk_function` methods
`invoke_` and `invoke_async`: `variables` and `memory`
- Added log warnings for when an both SKContext and variables/memory are
passed to `invoke` methods - this design ensures that the SDContext and
it's associated variables and memory are prioritized
- Updated tests and notebooks where applicable
### Motivation and Context
HttpSkill python version
### Description
- Porting the HttpSkill from C# to Python.
- Adding corresponding unit tests.
Co-authored-by: Abby Harrison <[email protected]>
### Motivation and Context
To make the Python SK more pythonic, combined all kernel.run_* methods
into a single method with optional parameters.
### Description
- Removed `kernel.run_on_vars_async()`
- Removed `kernel.run_on_str_async()`
- Added `SKContext`, `ContextVariables`, and string params to
`kernel.run_async()`
- Moved `run_on_vars_async()` logic to `run_async()` method
- Arranged method params so that required params come before optional
params.
- Updated tests and notebooks where applicable.