Skip to content

Commit

Permalink
Python: Bump Python version to 0.4.1. Make TextMemorySkill attributes…
Browse files Browse the repository at this point in the history
… ClassVar. (#4001)

Bump Python version to 0.4.1. Make TextMemorySkill attributes ClassVar.

### Motivation and Context

Bumping Python version to 0.4.1 for next release. Fix TextMemorySkill
attribute error to make it be a ClassVar after upgrading to Pydantic
2.0.

<!-- 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.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### 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 😄

---------

Co-authored-by: Evan Mattson <[email protected]>
  • Loading branch information
moonbox3 and moonbox3 authored Dec 5, 2023
1 parent 3249099 commit a204be8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "semantic-kernel"
version = "0.4.0.dev"
version = "0.4.1.dev"
description = ""
authors = ["Microsoft <[email protected]>"]
readme = "pip/README.md"
Expand Down
15 changes: 8 additions & 7 deletions python/semantic_kernel/core_skills/text_memory_skill.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) Microsoft. All rights reserved.
import json
import typing as t
from typing import ClassVar

from semantic_kernel.sk_pydantic import SKBaseModel
from semantic_kernel.skill_definition import sk_function, sk_function_context_parameter
Expand All @@ -10,13 +11,13 @@


class TextMemorySkill(SKBaseModel):
COLLECTION_PARAM: str = "collection"
RELEVANCE_PARAM: str = "relevance"
KEY_PARAM: str = "key"
LIMIT_PARAM: str = "limit"
DEFAULT_COLLECTION: str = "generic"
DEFAULT_RELEVANCE: float = 0.75
DEFAULT_LIMIT: int = 1
COLLECTION_PARAM: ClassVar[str] = "collection"
RELEVANCE_PARAM: ClassVar[str] = "relevance"
KEY_PARAM: ClassVar[str] = "key"
LIMIT_PARAM: ClassVar[str] = "limit"
DEFAULT_COLLECTION: ClassVar[str] = "generic"
DEFAULT_RELEVANCE: ClassVar[float] = 0.75
DEFAULT_LIMIT: ClassVar[int] = 1

# @staticmethod
@sk_function(
Expand Down

0 comments on commit a204be8

Please sign in to comment.