forked from microsoft/semantic-kernel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwriter_skill_fake.py
25 lines (20 loc) · 888 Bytes
/
writer_skill_fake.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Copyright (c) Microsoft. All rights reserved.
from semantic_kernel.skill_definition import sk_function, sk_function_context_parameter
# TODO: this fake skill is temporal usage.
# C# supports import skill from samples dir by using test helper and python should do the same
# `semantic-kernel/dotnet/src/IntegrationTests/TestHelpers.cs`
class WriterSkillFake:
@sk_function(
description="Translate",
name="Translate",
)
def translate(self, language: str) -> str:
return f"Translate: {language}"
@sk_function(description="Write an outline for a novel", name="NovelOutline")
@sk_function_context_parameter(
name="endMarker",
description="The marker to use to end each chapter.",
default_value="<!--===ENDPART===-->",
)
def write_novel_outline(self, input: str) -> str:
return f"Novel outline: {input}"