Skip to content

Commit

Permalink
Python: Fix weaviate integration tests (#1422)
Browse files Browse the repository at this point in the history
### Motivation and Context
The addition of the field `additional metadata` to `MemoryRecord` was
not propagated to the weaviate integration tests. This PR ensures that
the fields are properly filled and aligned.


### Description
- Added an entry for `"additional info"` to the memory record test
fixtures for weaviate.
  • Loading branch information
awharrison-28 authored Jun 12, 2023
1 parent ca40fef commit 67aa732
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
"description": "The text of the record.",
"dataType": ["text"],
},
{
"name": "additionalMetadata",
"description": "Optional custom metadata of the record.",
"dataType": ["string"],
},
],
}

Expand Down Expand Up @@ -81,6 +86,7 @@ class FieldMapper:
"_id": "skId",
"_description": "description",
"_text": "text",
"_additional_metadata": "additionalMetadata",
"_embedding": "vector",
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def documents():
"1",
"The quick brown fox jumps over the lazy dog.",
"A classic pangram.",
"additional info",
np.array([0.1, 0.1]),
)
)
Expand All @@ -34,6 +35,7 @@ def documents():
"2",
"The five boxing wizards jump quickly.",
"Another popular pangram.",
"additional info",
np.array([0.1, 0.11]),
)
)
Expand All @@ -42,6 +44,7 @@ def documents():
"3",
"Pack my box with five dozen liquor jugs.",
"A useful pangram.",
"additional info",
np.array([0.11, 0.1]),
)
)
Expand All @@ -51,6 +54,7 @@ def documents():
"4",
"Lorem ipsum dolor sit amet.",
"A common placeholder text.",
"additional info",
np.array([-10, -10]),
)
)
Expand All @@ -59,6 +63,7 @@ def documents():
"5",
"Etiam faucibus orci vitae lacus pellentesque.",
"A Latin text.",
"additional info",
np.array([-10.1, -10.2]),
)
)
Expand Down
2 changes: 1 addition & 1 deletion python/tests/unit/skill_definition/test_functions_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest
from semantic_kernel.kernel_exception import KernelException
from semantic_kernel.skill_definition.function_view import FunctionView
from semantic_kernel.skill_definition.functions_view import FunctionsView, FunctionView
from semantic_kernel.skill_definition.functions_view import FunctionsView


def test_add_semantic_function():
Expand Down

0 comments on commit 67aa732

Please sign in to comment.