Remove initial-prompt field from new_session.ui form and update create_session.dspy to handle empty initial message
This commit is contained in:
parent
2115829274
commit
9494a235f2
BIN
wwwroot/.new_session.ui.swp
Normal file
BIN
wwwroot/.new_session.ui.swp
Normal file
Binary file not shown.
@ -33,15 +33,6 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"url": "/hermes-web-cli/hermes_services/options"
|
"url": "/hermes-web-cli/hermes_services/options"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"uitype": "text",
|
|
||||||
"name": "initial-prompt",
|
|
||||||
"label": "Initial Prompt (Optional)",
|
|
||||||
"placeholder": "Enter initial context or instructions...",
|
|
||||||
"width": "100%",
|
|
||||||
"height": "100px",
|
|
||||||
"marginBottom": "24px"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# Create a new session with the selected Hermes service
|
# Create a new session with the selected Hermes service
|
||||||
# This .dspy file handles the POST request from new_session.ui form submission
|
# This .dspy file handles the POST request from new_session.ui form submission
|
||||||
# It receives form data with service_id and initial-prompt fields
|
# It receives form data with service_id field
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Extract form data from request context
|
# Extract form data from request context
|
||||||
@ -12,7 +12,6 @@ try:
|
|||||||
|
|
||||||
# Get required parameters
|
# Get required parameters
|
||||||
service_id = form_data.get('service_id')
|
service_id = form_data.get('service_id')
|
||||||
initial_prompt = form_data.get('initial-prompt', '')
|
|
||||||
|
|
||||||
if not service_id:
|
if not service_id:
|
||||||
# Redirect back to form with error
|
# Redirect back to form with error
|
||||||
@ -20,7 +19,8 @@ try:
|
|||||||
|
|
||||||
# Use the function provided by the hermes-web-cli module
|
# Use the function provided by the hermes-web-cli module
|
||||||
# This will call the remote hermes-service API
|
# This will call the remote hermes-service API
|
||||||
session_result = create_session(service_id, initial_prompt)
|
# Pass empty string as initial message since we don't collect it in the form
|
||||||
|
session_result = create_session(service_id, "")
|
||||||
|
|
||||||
if session_result:
|
if session_result:
|
||||||
# Redirect to the new session's user interaction page
|
# Redirect to the new session's user interaction page
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user