Skip to content

Commit

Permalink
fix: corrige função
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroHPAlmeida committed Jun 13, 2024
1 parent 1eb0e04 commit 1be85c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/apis/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
The message must be written entirely in Brazilian Portuguese''',
},
{
'id': 'error',
'id': 'ERROR',
'template': '''You are responsible for writing creative notification messages for script executions. \
Write a creative message stating that an error occurred while running the script. \
As the message will be sent via Telegram, avoid characters that will not be interpreted correctly. Use emojis as much as you want. \
Expand All @@ -28,7 +28,7 @@


def get_prompt(template_id: str) -> ChatPromptTemplate:
template = next((t for t in TEMPLATES if t['id'] == template_id), None)
template = next((t for t in TEMPLATES if t['id'] == template_id.upper()), None)
if template is None:
raise ValueError(f'Invalid template id: {template_id}')
return template['prompt']

0 comments on commit 1be85c3

Please sign in to comment.