Semantic Kernel Python README document fix
Motivation and Context
Semantic Kernel newbee here, trying to walk through the simple guide in python/README.md. Out-of-date implementations from kernel_config.py and OpenAITextCompletion and are found in the document.
To go through the guide in the document, one should do the following modifications:
- new path to import text completion service:
from semantic_kernel.ai.open_ai import OpenAITextCompletion, AzureTextCompletion - change
add_text_servicetoadd_text_methodto register the text completion service org_idis not required for initializing the text completion service
Description
fix python/README.md:
- change the path to import
OpenAITextCompletion,AzureTextCompletiontosemantic_kernel.ai.open_ai - use
add_text_backendmethod for text completion service to match the current implementation - add a tip that
org_idis not required for initializing the text completion service
Hi there, I still have some question on the import path of OpenAITextCompletion. It seems that the connector path has returned, but when I try to pip install the semantic kernel, the importing error still exists: ModuleNotFoundError: No module named 'semantic_kernel.connectors'
In the latest update on python-doc-fix, I return the connector path back to make it consist with current main branch implementation.
Will this inconsistency be fixed soon?
@daibi @shawncal I believe that the newest API is using add_text_service not add_text_backend
https://github.com/microsoft/semantic-kernel/blob/main/python/semantic_kernel/kernel_config.py
Hi there, I still have some question on the import path of
OpenAITextCompletion. It seems that theconnectorpath has returned, but when I try to pip install the semantic kernel, the importing error still exists:ModuleNotFoundError: No module named 'semantic_kernel.connectors'In the latest update on
python-doc-fix, I return theconnectorpath back to make it consist with currentmainbranch implementation.Will this inconsistency be fixed soon?
We're doing a lot of cleanup since the core Python SK APIs have been updated! The pip package is currently not always published with the latest changes. Definitely reflect whatever is the latest in main.
@awharrison-28 @dluc FYI
@alexchaomander Yeah you are right. I reviewed again and the implementation has been changed to add_text_service.
But the problem still exists when I pip install the newest version of SK
Consider publishing a new version of python package and close this pull request?
@alexchaomander Yeah you are right. I reviewed again and the implementation has been changed to
add_text_service.But the problem still exists when I pip install the newest version of SK
Consider publishing a new version of python package and close this pull request?
Yup we're on it! Right now main is out of sync with the latest pip package. We need to publish a new one. @dluc @awharrison-28
@awharrison-28 we updated the README too soon, e.g. before releasing the pip package. When introducing breaking changes like this one, the documentation should be synchronized with the release. In other words, code and documentation sometimes are updated asynchronously.
Readme and notebooks should all be consistent with the new pip package released today: 0.2.6.dev
Closing this as it should be resolved with latest pip package.