-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python: Update Python getting-started notebooks #6573
Python: Update Python getting-started notebooks #6573
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we forcing users to write prompts and history in this custom XML format?
It's a feature that the prompt template supports. Prompts of this format will be parsed into a chat history object underneath. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm a bit lost. What's the requirement on removing the ChatHistory
object? I think this could warrant a separate example showing how the ChatHistory can be constructed with XML; but I don't think this particular getting_started example needs to be changed. The changes you propose are definitely valid, but may be better for a concept
example.
Another option is the following:
I believe we already have samples to show how to use the chat history class: https://github.com/microsoft/semantic-kernel/blob/main/python/samples/concepts/chat_completion/azure_chat_gpt_api.py |
python/samples/getting_started/10-multiple-results-per-prompt.ipynb
Outdated
Show resolved
Hide resolved
### 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. --> Went through the Python getting-started notebooks and found some issues. Updating the notebooks to address the issues. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> 1. `00-getting-started.ipynb`: (improvement) clear all the services before registering new ones. This will allow users to rerun the just the cells without it throwing "Service already exists". 2. `01-basic-loading-the-kernel.ipynb`: (improvement) clear all the services before registering new ones. This will allow users to rerun the just the cells without it throwing "Service already exists". 3. `10-multiple-results-per-prompt.ipynb`: (fix) the hugging face service is not set up to return multiple responses. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] 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 - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
Motivation and Context
Went through the Python getting-started notebooks and found some issues. Updating the notebooks to address the issues.
Description
00-getting-started.ipynb
: (improvement) clear all the services before registering new ones. This will allow users to rerun the just the cells without it throwing "Service already exists".01-basic-loading-the-kernel.ipynb
: (improvement) clear all the services before registering new ones. This will allow users to rerun the just the cells without it throwing "Service already exists".10-multiple-results-per-prompt.ipynb
: (fix) the hugging face service is not set up to return multiple responses.Contribution Checklist