Skip to content

Commit

Permalink
Added new default to system chat messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jpal91 committed Oct 2, 2023
1 parent 8f20263 commit 0ba6487
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion tests/xontrib_chatgpt/test_chatgpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def test_alias_creation(xession):


def test_defualt_attribs(xession, chat):
assert chat.base == [{"role": "system", "content": "You are a helpful assistant."}]
assert chat.messages == []
assert chat._tokens == []
assert chat._max_tokens == 3000
Expand Down
3 changes: 2 additions & 1 deletion xontrib_chatgpt/chatgpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ def __init__(self, alias: str = "") -> None:

self.alias = alias
self.base: list[dict[str, str]] = [
{"role": "system", "content": "You are a helpful assistant."}
{"role": "system", "content": "You are a helpful assistant."},
{"role": "system", "content": "If your responses include code, make sure to wrap it in a markdown code block with the appropriate language. \n Example: \n ```python \n print('Hello World!') \n ```"},
]
self.messages: list[dict[str, str]] = []
self._tokens: list = []
Expand Down

0 comments on commit 0ba6487

Please sign in to comment.