Skip to content

Commit

Permalink
fixed more stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
xssdoctor committed Feb 24, 2024
1 parent ea7460d commit 7c1b819
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions installer/client/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def streamMessage(self, input_data: str, context=""):
Raises:
FileNotFoundError: If the pattern file is not found.
"""

wisdomFilePath = os.path.join(
config_directory, f"patterns/{self.pattern}/system.md"
)
Expand All @@ -83,8 +84,8 @@ def streamMessage(self, input_data: str, context=""):
return
else:
if context:
user_message += {role: "system", content: context}
messages = [user_message]
messages = [
{"role": "system", "content": context}, user_message]
else:
messages = [user_message]
try:
Expand Down Expand Up @@ -149,8 +150,8 @@ def sendMessage(self, input_data: str, context=""):
return
else:
if context:
user_message += {'role': 'system', 'content': context}
messages = [user_message]
messages = [
{'role': 'system', 'content': context}, user_message]
else:
messages = [user_message]
try:
Expand Down

0 comments on commit 7c1b819

Please sign in to comment.