MCPcopy
hub / github.com/AI-Citizen/SolidGPT / load_from_text

Function load_from_text

solidgpt/src/util/util.py:75–81  ·  view source on GitHub ↗
(filename, path = "", extension = ".md")

Source from the content-addressed store, hash-verified

73
74
75def load_from_text(filename, path = "", extension = ".md") -> str:
76 full_path = os.path.join(path, filename)
77 full_path = add_extension_if_not_exist(full_path, extension)
78 with open(full_path, "r", encoding='utf-8') as md_file:
79 content = md_file.read()
80 logging.info(f"Information loaded from {full_path}")
81 return content
82
83def add_extension_if_not_exist(input_string, extension):
84 if not input_string.endswith(extension):

Callers 14

__summary_fileMethod · 0.90
_read_inputMethod · 0.90
__get_input_contentMethod · 0.85
_read_inputMethod · 0.85
_read_inputMethod · 0.85
__get_input_contentMethod · 0.85
__get_history_contextMethod · 0.85
__summary_fileMethod · 0.85
_read_inputMethod · 0.85
_read_inputMethod · 0.85
__get_history_contextMethod · 0.85
__get_history_contextMethod · 0.85

Calls 2

readMethod · 0.80

Tested by

no test coverage detected