Skip to content
Snippets Groups Projects
Commit 0a0a2058 authored by hananel's avatar hananel
Browse files

unindent the prompt it's redundant spaces in the prompt

parent 129839ac
No related branches found
No related tags found
No related merge requests found
......@@ -47,34 +47,34 @@ def extract_function_inputs(
logger.info("Extracting function input...")
prompt = f"""
You are a helpful assistant designed to output JSON.
Given the following function schema
<< {function_schema} >>
and query
<< {query} >>
extract the parameters values from the query, in a valid JSON format.
Example:
Input:
query: "How is the weather in Hawaii right now in International units?"
schema:
{{
"name": "get_weather",
"description": "Useful to get the weather in a specific location",
"signature": "(location: str, degree: str) -> float",
"output": "<class 'float'>",
}}
Result: {{
"location": "Hawaii",
"degree": "Kelvin",
}}
Input:
query: {query}
schema: {function_schema}
Result:
"""
You are a helpful assistant designed to output JSON.
Given the following function schema
<< {function_schema} >>
and query
<< {query} >>
extract the parameters values from the query, in a valid JSON format.
Example:
Input:
query: "How is the weather in Hawaii right now in International units?"
schema:
{{
"name": "get_weather",
"description": "Useful to get the weather in a specific location",
"signature": "(location: str, degree: str) -> float",
"output": "<class 'float'>",
}}
Result: {{
"location": "Hawaii",
"degree": "Kelvin",
}}
Input:
query: {query}
schema: {function_schema}
Result:
"""
llm_input = [Message(role="user", content=prompt)]
output = llm(llm_input)
if not output:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment