Use ISO format when passing date to LLMs (#118705)
parent
60bcd27a47
commit
f9dff1632e
|
@ -35,8 +35,8 @@ from .singleton import singleton
|
||||||
LLM_API_ASSIST = "assist"
|
LLM_API_ASSIST = "assist"
|
||||||
|
|
||||||
BASE_PROMPT = (
|
BASE_PROMPT = (
|
||||||
'Current time is {{ now().strftime("%X") }}. '
|
'Current time is {{ now().strftime("%H:%M:%S") }}. '
|
||||||
'Today\'s date is {{ now().strftime("%x") }}.\n'
|
'Today\'s date is {{ now().strftime("%Y-%m-%d") }}.\n'
|
||||||
)
|
)
|
||||||
|
|
||||||
DEFAULT_INSTRUCTIONS_PROMPT = """You are a voice assistant for Home Assistant.
|
DEFAULT_INSTRUCTIONS_PROMPT = """You are a voice assistant for Home Assistant.
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
'history': list([
|
'history': list([
|
||||||
dict({
|
dict({
|
||||||
'parts': '''
|
'parts': '''
|
||||||
Current time is 05:00:00. Today's date is 05/24/24.
|
Current time is 05:00:00. Today's date is 2024-05-24.
|
||||||
You are a voice assistant for Home Assistant.
|
You are a voice assistant for Home Assistant.
|
||||||
Answer in plain text. Keep it simple and to the point.
|
Answer in plain text. Keep it simple and to the point.
|
||||||
Only if the user wants to control a device, tell them to edit the AI configuration and allow access to Home Assistant.
|
Only if the user wants to control a device, tell them to edit the AI configuration and allow access to Home Assistant.
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
'history': list([
|
'history': list([
|
||||||
dict({
|
dict({
|
||||||
'parts': '''
|
'parts': '''
|
||||||
Current time is 05:00:00. Today's date is 05/24/24.
|
Current time is 05:00:00. Today's date is 2024-05-24.
|
||||||
You are a voice assistant for Home Assistant.
|
You are a voice assistant for Home Assistant.
|
||||||
Answer in plain text. Keep it simple and to the point.
|
Answer in plain text. Keep it simple and to the point.
|
||||||
Only if the user wants to control a device, tell them to edit the AI configuration and allow access to Home Assistant.
|
Only if the user wants to control a device, tell them to edit the AI configuration and allow access to Home Assistant.
|
||||||
|
@ -144,7 +144,7 @@
|
||||||
'history': list([
|
'history': list([
|
||||||
dict({
|
dict({
|
||||||
'parts': '''
|
'parts': '''
|
||||||
Current time is 05:00:00. Today's date is 05/24/24.
|
Current time is 05:00:00. Today's date is 2024-05-24.
|
||||||
You are a voice assistant for Home Assistant.
|
You are a voice assistant for Home Assistant.
|
||||||
Answer in plain text. Keep it simple and to the point.
|
Answer in plain text. Keep it simple and to the point.
|
||||||
<no_api_prompt>
|
<no_api_prompt>
|
||||||
|
@ -199,7 +199,7 @@
|
||||||
'history': list([
|
'history': list([
|
||||||
dict({
|
dict({
|
||||||
'parts': '''
|
'parts': '''
|
||||||
Current time is 05:00:00. Today's date is 05/24/24.
|
Current time is 05:00:00. Today's date is 2024-05-24.
|
||||||
You are a voice assistant for Home Assistant.
|
You are a voice assistant for Home Assistant.
|
||||||
Answer in plain text. Keep it simple and to the point.
|
Answer in plain text. Keep it simple and to the point.
|
||||||
<no_api_prompt>
|
<no_api_prompt>
|
||||||
|
@ -254,7 +254,7 @@
|
||||||
'history': list([
|
'history': list([
|
||||||
dict({
|
dict({
|
||||||
'parts': '''
|
'parts': '''
|
||||||
Current time is 05:00:00. Today's date is 05/24/24.
|
Current time is 05:00:00. Today's date is 2024-05-24.
|
||||||
You are a voice assistant for Home Assistant.
|
You are a voice assistant for Home Assistant.
|
||||||
Answer in plain text. Keep it simple and to the point.
|
Answer in plain text. Keep it simple and to the point.
|
||||||
<api_prompt>
|
<api_prompt>
|
||||||
|
@ -309,7 +309,7 @@
|
||||||
'history': list([
|
'history': list([
|
||||||
dict({
|
dict({
|
||||||
'parts': '''
|
'parts': '''
|
||||||
Current time is 05:00:00. Today's date is 05/24/24.
|
Current time is 05:00:00. Today's date is 2024-05-24.
|
||||||
You are a voice assistant for Home Assistant.
|
You are a voice assistant for Home Assistant.
|
||||||
Answer in plain text. Keep it simple and to the point.
|
Answer in plain text. Keep it simple and to the point.
|
||||||
<api_prompt>
|
<api_prompt>
|
||||||
|
|
Loading…
Reference in New Issue