Skip to content

Commit

Permalink
unindent the second prompt as well
Browse files Browse the repository at this point in the history
  • Loading branch information
hananelll committed Jan 11, 2024
1 parent 19984ff commit 7a070a3
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions semantic_router/route.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,29 +96,29 @@ def _generate_dynamic_route(cls, llm: BaseLLM, function_schema: dict[str, Any]):
logger.info("Generating dynamic route...")

prompt = f"""
You are tasked to generate a JSON configuration based on the provided
function schema. Please follow the template below, no other tokens allowed:
<config>
{{
"name": "<function_name>",
"utterances": [
"<example_utterance_1>",
"<example_utterance_2>",
"<example_utterance_3>",
"<example_utterance_4>",
"<example_utterance_5>"]
}}
</config>
Only include the "name" and "utterances" keys in your answer.
The "name" should match the function name and the "utterances"
should comprise a list of 5 example phrases that could be used to invoke
the function. Use real values instead of placeholders.
Input schema:
{function_schema}
"""
You are tasked to generate a JSON configuration based on the provided
function schema. Please follow the template below, no other tokens allowed:
<config>
{{
"name": "<function_name>",
"utterances": [
"<example_utterance_1>",
"<example_utterance_2>",
"<example_utterance_3>",
"<example_utterance_4>",
"<example_utterance_5>"]
}}
</config>
Only include the "name" and "utterances" keys in your answer.
The "name" should match the function name and the "utterances"
should comprise a list of 5 example phrases that could be used to invoke
the function. Use real values instead of placeholders.
Input schema:
{function_schema}
"""

llm_input = [Message(role="user", content=prompt)]
output = llm(llm_input)
Expand Down

0 comments on commit 7a070a3

Please sign in to comment.