Skip to content
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: TextMemoryPlugin in 0.9.9b1 default values are off #6311

Closed
davidatorres opened this issue May 17, 2024 · 2 comments · Fixed by #6351
Closed

Python: TextMemoryPlugin in 0.9.9b1 default values are off #6311

davidatorres opened this issue May 17, 2024 · 2 comments · Fixed by #6351
Labels
python Pull requests for the Python Semantic Kernel triage

Comments

@davidatorres
Copy link

davidatorres commented May 17, 2024

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '06-memory-and-embeddings.ipynb'
  2. Execute Run All
  3. VS Code prompt - User> "talk to me about my finances"
  4. See error below... note the default values for the parameters are off -- ask should not be 'generic', collection should not be '0.75', etc. The error manifest with recall parameter that does not have a default but it should be '1'.

Error occurred while invoking function chat_with_memory: Error rendering code block: Error rendering function: name='recall' plugin_name='TextMemoryPlugin' description='Recall a fact from the long term memory'
parameters=[
KernelParameterMetadata(name='ask', description='The information to retrieve', default_value='generic', type_='str', is_required=False, type_object=<class 'str'>),
KernelParameterMetadata(name='collection', description='The collection to search for information.', default_value=0.75, type_='str', is_required=False, type_object=<class 'str'>),
KernelParameterMetadata(name='relevance', description='The relevance score, from 0.0 to 1.0; 1.0 means perfect match', default_value=1, type_='float', is_required=False, type_object=<class 'float'>),
KernelParameterMetadata(name='limit', description='The maximum number of relevant memories to recall.', default_value=None, type_='int', is_required=True, type_object=<class 'int'>)
] is_prompt=False is_asynchronous=True return_parameter=KernelParameterMetadata(name='return', description='', default_value=None, type_='str', is_required=True, type_object=None) additional_properties={} with error: Parameter limit is required but not provided in the arguments.

Expected behavior
Return info about finances

Screenshots
image

Platform

  • OS: Mac (M1)
  • IDE: VS Code
  • Language: Python
  • Source: 0.9.9b1

Additional context
please suggest quick fix.

@markwallace-microsoft markwallace-microsoft added python Pull requests for the Python Semantic Kernel triage labels May 17, 2024
@github-actions github-actions bot changed the title TextMemoryPlugin in 0.9.9b1 default values are off Python: TextMemoryPlugin in 0.9.9b1 default values are off May 17, 2024
@dmytrostruk
Copy link
Member

@moonbox3 Could you please take a look?

@moonbox3
Copy link
Contributor

@davidatorres we've been busy preparing for Build. I'll have a look this week. Thanks for your patience.

github-merge-queue bot pushed a commit that referenced this issue May 22, 2024
### 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.
-->
There was an issue when you create a function with multiple arguments,
some with a default.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Improved the parsing of the function, using py3.10 specific features.
Closes #6311 

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] 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
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests for the Python Semantic Kernel triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants