Skip to content

Commit 50e510c

Browse files
committed
SImplify error
Signed-off-by: Raphaël Pinson <[email protected]>
1 parent bbe256b commit 50e510c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llm/agent-server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def query():
5555
yaml_output = yaml.dump_all(configs, default_flow_style=False, allow_unicode=True)
5656
return Response(yaml_output, mimetype='text/yaml')
5757
except Exception as e:
58-
return jsonify({'error': f'Failed to parse generated YAML: {str(e)}', 'response': ai_response, 'yaml_content': yaml_content})
58+
return jsonify({'error': f'LLM generated invalid YAML: {str(e)}'})
5959

6060
# Try to parse the output directly
6161
try:
@@ -64,7 +64,7 @@ def query():
6464
yaml_output = yaml.dump_all(configs, default_flow_style=False, allow_unicode=True)
6565
return Response(yaml_output, mimetype='text/yaml')
6666
except Exception as e:
67-
return jsonify({'error': f'Failed to parse generated YAML: {str(e)}', 'response': ai_response, 'yaml_content': ai_response})
67+
return jsonify({'error': f'LLM generated invalid YAML: {str(e)}'})
6868

6969
@app.route('/health', methods=['GET'])
7070
def health():

0 commit comments

Comments
 (0)