Skip to content

Commit

Permalink
feat: Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Simatwa committed Apr 30, 2024
1 parent 2522972 commit b79e5d0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
8 changes: 7 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -524,4 +524,10 @@ For instance:
**What's new?**

- feat: Override chat intro.
- Other minor fixes.
- Other minor fixes.

## v0.6.7

**What's new?**

- fix: Failure to include intro in chat history - from `v0.6.6`
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

setup(
name="python-tgpt",
version="0.6.7",
version="0.6.8",
license="MIT",
author="Smartwa",
maintainer="Smartwa",
Expand Down
4 changes: 3 additions & 1 deletion src/pytgpt/gpt4free/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ def main(
# Create a progress bar
total = len(self.working_providers)
with Progress() as progress:
self.__log(20, f"Testing {total} providers : {', '.join(self.working_providers)}")
self.__log(
20, f"Testing {total} providers : {', '.join(self.working_providers)}"
)
task = progress.add_task(
f"[cyan]Testing...[{self.test_at_once}]",
total=total,
Expand Down
6 changes: 3 additions & 3 deletions src/pytgpt/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ def __trim_chat_history(self, chat_history: str, intro: str = None) -> str:
new_chat_history = chat_history[truncate_at:]
self.chat_history = intro + "\n... " + new_chat_history
# print(len(self.chat_history))
return self.chat_history
# print(len(chat_history))
return chat_history
else:
self.chat_history = intro + chat_history
return self.chat_history

def gen_complete_prompt(self, prompt: str, intro: str = None) -> str:
"""Generates a kinda like incomplete conversation
Expand Down

0 comments on commit b79e5d0

Please sign in to comment.