mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 02:19:06 +00:00
Python: dev_setup and readme updates (#5770)
This pull request primarily updates the `DEV_SETUP.md` and `README.md` files in the `python` directory. The changes focus on improving the setup instructions, updating the code snippets, and providing additional information on running tests, code coverage, and keeping the local repository up-to-date. Changes to setup instructions: * [`python/DEV_SETUP.md`](diffhunk://#diff-22a026622159be328328c5bb6fef874e8aa799efb6ab8844d0c94ad051b08f3cR75-R90): Added instructions on how to use Python 3.11 with Poetry, how to install pre-commit hooks, and how to run tests using VSCode Tasks. [[1]](diffhunk://#diff-22a026622159be328328c5bb6fef874e8aa799efb6ab8844d0c94ad051b08f3cR75-R90) [[2]](diffhunk://#diff-22a026622159be328328c5bb6fef874e8aa799efb6ab8844d0c94ad051b08f3cR112-R114) [[3]](diffhunk://#diff-22a026622159be328328c5bb6fef874e8aa799efb6ab8844d0c94ad051b08f3cR131-R133) [[4]](diffhunk://#diff-22a026622159be328328c5bb6fef874e8aa799efb6ab8844d0c94ad051b08f3cL287-R252) Code snippets updates: * [`python/DEV_SETUP.md`](diffhunk://#diff-22a026622159be328328c5bb6fef874e8aa799efb6ab8844d0c94ad051b08f3cL140-L227): Updated the code snippets to reflect the latest changes in the codebase. This includes changes in the use of Pydantic and the use of KernelBaseModel. [[1]](diffhunk://#diff-22a026622159be328328c5bb6fef874e8aa799efb6ab8844d0c94ad051b08f3cL140-L227) [[2]](diffhunk://#diff-22a026622159be328328c5bb6fef874e8aa799efb6ab8844d0c94ad051b08f3cL244-R177) * [`python/README.md`](diffhunk://#diff-217ed82f87b78b399e304b07a159b27dff327c0f83adf4a2fc30b03bcbf84b01L58-R66): Updated the code snippet to reflect the change in getting request settings from a service ID. Additional information: * [`python/DEV_SETUP.md`](diffhunk://#diff-22a026622159be328328c5bb6fef874e8aa799efb6ab8844d0c94ad051b08f3cL287-R252): Added information on how to run code coverage, how to keep the local repository up-to-date, and how to resolve conflicts after a rebase. * [`python/README.md`](diffhunk://#diff-217ed82f87b78b399e304b07a159b27dff327c0f83adf4a2fc30b03bcbf84b01R7-R14): Added instructions on how to install optional dependencies.
This commit is contained in:
+9
-1
@@ -4,6 +4,14 @@ Install the latest package:
|
||||
|
||||
python -m pip install --upgrade semantic-kernel
|
||||
|
||||
If you want to use some of the optional dependencies (OpenAI is installed by default), you can install them with:
|
||||
|
||||
python -m pip install --upgrade semantic-kernel[hugging_face]
|
||||
|
||||
of all of them:
|
||||
|
||||
python -m pip install --upgrade semantic-kernel[all]
|
||||
|
||||
# AI Services
|
||||
|
||||
## OpenAI / Azure OpenAI API keys
|
||||
@@ -55,7 +63,7 @@ kernel.add_service(
|
||||
# )
|
||||
|
||||
# Define the request settings
|
||||
req_settings = kernel.get_service(service_id).get_prompt_execution_settings_class()(service_id=service_id)
|
||||
req_settings = kernel.get_prompt_execution_settings_from_service_id(service_id)
|
||||
req_settings.max_tokens = 2000
|
||||
req_settings.temperature = 0.7
|
||||
req_settings.top_p = 0.8
|
||||
|
||||
Reference in New Issue
Block a user