Commit Graph
12 Commits
Author SHA1 Message Date
7ed26eacaa Python: Update notebooks by pinning pip package and removing requirements.txt (#868)
### Motivation and Context

* Removing the requirements.txt and just pinning each notebook to a pip
package that should work.
Doing this allows users to run notebooks without error even if the code
in the core repo updates.
When a new pip package is released, we will bump the version number in
each notebook.
* Fix usage of context variables. Apps should avoid using anonymous
context variables and prefer using the context, to retain access to the
kernel internals during the orchestration.

---------

Co-authored-by: Alex Chao <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
2023-05-08 18:13:17 -07:00
Mark KarleandShawn Callegari 3e1d13e945 Merge KernelConfig with Kernel (#731)
### 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]>
2023-05-05 22:27:49 -07:00
Abby Harrison 04206c67dc Python: Update Notebooks to version 0.2.6.dev0; Fix bug in 0.2.5.dev0 (#761)
### 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
2023-05-01 17:16:01 -07:00
Abby Harrison c9b9220333 Refactor 'AI Backend' -> 'AI Service'; Move AI Namespace to semantic_kernel.connectors.ai (#595)
### 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)
2023-04-25 00:01:16 +00:00
Abby Harrison 978ca64802 update link to new feature matrix in Python SK Readme (#541)
### Motivation and Context
Updated broken link due to move and rename of the Feature Parity Matrix
markdown file.
2023-04-19 13:50:50 -07:00
db2c1ef128 corrected python documentation (#501)
### Motivation and Context
1. Why is this change required? prompts are not semantic functions with
input <-> other way round
  2. What problem does it solve? clearer understanding
  3. What scenario does it contribute to? documentation

### Description
- corrected wording
- added a table for Q&A


### Contribution Checklist
- [x] I didn't break anyone 😄

---------

Co-authored-by: Devis Lucato <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
2023-04-18 11:13:20 -07:00
Abby HarrisonandDevis Lucato d9323b573f Remove kernel builder pattern for Python: sk.kernel_create() -> sk.Kernel() (#454)
### Motivation and Context

This PR makes creating a kernel instance more pythonic. The builder
pattern is removed and the kernel is constructed using Kernel(...).

Work originally started with #137

### Description

- Removed kernel_builder.py.
- Instance creation pattern `kernel = sk.create_kernel() -> kernel =
sk.Kernel()`
- For notebook 6, there is no need to create a separate kernel for the
GitHub files. Changed to use a separate collection.


Co-authored-by: Devis Lucato <[email protected]>
2023-04-17 11:07:46 -07:00
Devis Lucato e2e5e2dad3 Python: docs update + ruff config + fix tests 2023-04-13 16:12:36 -07:00
Devis Lucato 5fc05b2bea * Update notebooks to use pip package
* Add python getting started notebook
* Fix notebooks usage of Azure text completion
* Fix bug with skills definition
* Update READMEs
* New release version 0.2.2
2023-04-13 16:12:36 -07:00
Devis Lucato 3b04cfa1d2 Update READMEs, reduce code complexity, misc improvements (#374)
READMEs and examples are out of date and showing incorrect code. There
are also a few bugs in the SKFunction blocking simpler syntax.

Extend SKFunction to allow synchronous calls and have simpler syntax
when async is not required.

* Update homepage README, moving all Python examples under python/README
* Make SKFunction callable as per v0
* Fix bugs in SKFunction
* Fix examples using realistic code
* Allow to use functions synchronously
2023-04-13 16:12:36 -07:00
Jordan Henkel 407fb36e59 Python: cleanup/sync/fixes (for examples, docs, tests, notebooks) (#317)
### Motivation and Context

The `python-preview` branch is under active development and many
docs/tests/examples are getting a bit out of sync. There are also a few
small cleanup chores/refactors to make _usage_ easier (e.g., to make
examples cleaner). I've grouped these small fixes (plus a few bug fixes)
into this "cleanup" PR.

### Description

This PR does the following:

1. Updates the out-of-date example in `README.md`
2. Fixes all 5 of the notebooks we support right now (1,2,3,4, and 6;
notebook 5 is planner, I've blanked out most of the code there so we
don't confuse people, especially as the planner API is changing)
3. Fixes a bug w/ `stop_sequences` in `(Azure)OpenAITextCompletion`
4. Fixes a bug introduced in our upgrades to the embeddings cosine-sim
check (we should add more thorough tests here)
5. Cleans up tests
6. Ensures end-to-end tests are all runnable 
7. Fixes up the `kernel_extensions` to work more naturally (so that end
users can use them directly on the `kernel` object and get good
type-hinting)
2023-04-13 16:12:36 -07:00
Devis Lucato 655c583ee0 Initial commit 2023-04-13 16:12:36 -07:00