cyber_query_ai.helpers

Helper methods for the CyberQueryAI application.

Functions

clean_json_response(response_text)

Clean common JSON formatting issues from LLM responses.

get_rag_tools_path()

Get the rag tools file path.

sanitize_text(prompt)

Sanitize user input and LLM output for security.

cyber_query_ai.helpers.get_rag_tools_path()[source]

Get the rag tools file path.

Return type:

Path

cyber_query_ai.helpers.clean_json_response(response_text)[source]

Clean common JSON formatting issues from LLM responses.

Return type:

str

cyber_query_ai.helpers.sanitize_text(prompt)[source]

Sanitize user input and LLM output for security.

Return type:

str