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

Bump to version 2 (Python) #88

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Python/prompt-sdk-headless/.autoblocks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ autogenerate:
prompts:
- id: text-summarization
major_versions:
- 1
- 2
2 changes: 1 addition & 1 deletion Python/prompt-sdk-headless/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def main():
role="system",
content=prompt.render.system(
language_requirement=prompt.render.util_language(
language="Spanish",
lang="Spanish",
),
tone_requirement=prompt.render.util_tone(
tone="formal",
Expand Down
9 changes: 4 additions & 5 deletions Python/prompt-sdk-headless/src/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TextSummarizationParams(FrozenModel):
class TextSummarizationTemplateRenderer(TemplateRenderer):
__name_mapper__ = {
"document": "document",
"language": "language",
"lang": "lang",
"languageRequirement": "language_requirement",
"tone": "tone",
"toneRequirement": "tone_requirement",
Expand Down Expand Up @@ -56,11 +56,11 @@ def user(
def util_language(
self,
*,
language: str,
lang: str,
) -> str:
return self._render(
"util/language",
language=language,
lang=lang,
)

def util_tone(
Expand All @@ -86,7 +86,6 @@ class TextSummarizationExecutionContext(

class TextSummarizationMinorVersion(Enum):
v0 = "0"
v1 = "1"
LATEST = "latest"


Expand All @@ -97,5 +96,5 @@ class TextSummarizationPromptManager(
],
):
__prompt_id__ = "text-summarization"
__prompt_major_version__ = "1"
__prompt_major_version__ = "2"
__execution_context_class__ = TextSummarizationExecutionContext