summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Theb.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g4f/Provider/Theb.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/g4f/Provider/Theb.py b/g4f/Provider/Theb.py
index c37cc4b7..72fce3ac 100644
--- a/g4f/Provider/Theb.py
+++ b/g4f/Provider/Theb.py
@@ -22,10 +22,8 @@ class Theb(BaseProvider):
messages: list[dict[str, str]],
stream: bool, **kwargs: Any) -> CreateResult:
- conversation = ''
- for message in messages:
- conversation += '%s: %s\n' % (message['role'], message['content'])
- conversation += 'assistant: '
+ conversation = "\n".join(f"{message['role']}: {message['content']}" for message in messages)
+ conversation += "\nassistant: "
auth = kwargs.get("auth", {
"bearer_token":"free",