Skip to content

Commit 8c63f51

Browse files
authored
Merge pull request #167 from NPC-Worldwide/chris/mac_b_fix
fixed the b issue on mac
2 parents 07b34f4 + 9084937 commit 8c63f51

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

npcpy/memory/knowledge_graph.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def extract_mistakes(
168168
"""
169169

170170
response = get_llm_response(
171-
prompt + f"\n\nText: {text}",
171+
prompt + f"\n\nHERE BEGINS THE TEXT TO INVESTIGATE:\nText: {text}",
172172
model=model,
173173
provider=provider,
174174
format="json",
@@ -234,7 +234,7 @@ def extract_lessons_learned(
234234
"""
235235

236236
response = get_llm_response(
237-
prompt + f"\n\nText: {text}",
237+
prompt + f"\n\nHERE BEGINS THE TEXT TO INVESTIGATE\n\nText: {text}",
238238
model=model,
239239
provider=provider,
240240
format="json",
@@ -388,7 +388,7 @@ def extract_facts(
388388
"""
389389

390390
response = get_llm_response(
391-
prompt + f"\n\nText: {text}",
391+
prompt + f"HERE BEGINS THE TEXT TO INVESTIGATE:\n\nText: {text}",
392392
model=model,
393393
provider=provider,
394394
format="json",
@@ -413,6 +413,8 @@ def breathe(
413413
Returns:
414414
Dict[str, Any]: The response from the LLM.
415415
"""
416+
if len(messages) == 0:
417+
return {"output": {}, "messages": []}
416418

417419
facts = extract_facts(
418420
str(messages),
@@ -433,7 +435,8 @@ def breathe(
433435
provider=provider,
434436
)
435437
# execute slash command will handle updating database
436-
return {"output": {'facts': facts, 'mistakes': mistakes, 'lessons': lessons}, "messages": []}
438+
return {"output": {'facts': facts, 'mistakes': mistakes, 'lessons': lessons},
439+
"messages": []}
437440

438441

439442
def find_similar_groups(

npcpy/modes/npcsh.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,15 +234,15 @@ def setup_readline() -> str:
234234

235235
readline.set_history_length(1000)
236236
readline.parse_and_bind("set enable-bracketed-paste on")
237-
readline.parse_and_bind(r'"\e[A": history-search-backward')
238-
readline.parse_and_bind(r'"\e[B": history-search-forward')
237+
#readline.parse_and_bind('"\e[A": history-search-backward')
238+
#readline.parse_and_bind('"\e[B": history-search-forward')
239239
readline.parse_and_bind(r'"\C-r": reverse-search-history')
240-
readline.parse_and_bind(r'\C-e: end-of-line')
241-
readline.parse_and_bind(r'\C-a: beginning-of-line')
242-
if sys.platform == "darwin":
243-
readline.parse_and_bind("bind ^I rl_complete")
244-
else:
245-
readline.parse_and_bind("tab: complete")
240+
readline.parse_and_bind(r'"\C-e": end-of-line')
241+
readline.parse_and_bind(r'"\C-a": beginning-of-line')
242+
#if sys.platform == "darwin":
243+
# readline.parse_and_bind("bind ^I rl_complete")
244+
#else:
245+
# readline.parse_and_bind("tab: complete")
246246

247247
return READLINE_HISTORY_FILE
248248

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def package_files(directory):
8383

8484
setup(
8585
name="npcpy",
86-
version="1.0.14",
86+
version="1.0.15",
8787
packages=find_packages(exclude=["tests*"]),
8888
install_requires=base_requirements, # Only install base requirements by default
8989
extras_require={

0 commit comments

Comments
 (0)